This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 210852 - NullPointerException at org.netbeans.modules.maven.j2ee.web.AdditionalWebProvider.apiEjbJar
Summary: NullPointerException at org.netbeans.modules.maven.j2ee.web.AdditionalWebProv...
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: Martin Janicek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-07 08:05 UTC by fordfrog
Modified: 2012-04-12 10:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 186053


Attachments
stacktrace (3.25 KB, text/plain)
2012-04-07 08:05 UTC, fordfrog
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fordfrog 2012-04-07 08:05:50 UTC
Build: NetBeans IDE Dev (Build 20120406-unknown-revn)
VM: OpenJDK 64-Bit Server VM, 22.0-b10, OpenJDK Runtime Environment, 1.7.0_03-icedtea-b147
OS: Linux

User Comments:
GUEST: All refactoring fails with this

GUEST: press alt+r to rename class

GUEST: Inline refactoring

GUEST: Trying to use move refactoring

GUEST: Started "Find usages"

GUEST: Any refactoring

fordfrog: tried to delete class in projects panel

GUEST: Selected 'Insert Code...' from the right-button context menu.




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.maven.j2ee.web.AdditionalWebProvider.apiEjbJar(AdditionalWebProvider.java:75)
   at org.netbeans.modules.maven.j2ee.web.AdditionalWebProvider.findEjbJar(AdditionalWebProvider.java:90)
   at org.netbeans.modules.j2ee.ejbjar.ProjectEjbJarProvider.findEjbJar(ProjectEjbJarProvider.java:63)
   at org.netbeans.modules.j2ee.api.ejbjar.EjbJar.getEjbJar(EjbJar.java:109)
   at org.netbeans.modules.j2ee.ejbrefactoring.EjbRefactoringFactory.getRelevantEjbModules(EjbRefactoringFactory.java:161)
   at org.netbeans.modules.j2ee.ejbrefactoring.EjbRefactoringFactory.getEjbJars(EjbRefactoringFactory.java:144)
Comment 1 fordfrog 2012-04-07 08:05:56 UTC
Created attachment 117967 [details]
stacktrace
Comment 2 mutchd 2012-04-10 09:21:24 UTC
I'm a bit surprised this is P3. Pretty much all refactoring is broken for maven projects. Unless someone has a work around this should be P1?
Comment 3 Martin Janicek 2012-04-10 12:23:13 UTC
Guys, does anyone have a reproducible scenario? I've tried to create Maven web project, create a new Java class inside of source packages and rename this class, but no exception occurs. What should I do to reproduce the issue?
Or, could anyone attach problematic project?
Comment 4 mutchd 2012-04-10 12:48:35 UTC
hmm....tried to reproduce using a simple project but works ok. Interestingly this happens to me despite using only j2se projects. Would that give you a clue? Why would this logic be executed for non-j2ee projects?
Comment 5 Martin Janicek 2012-04-10 13:06:10 UTC
Definitely! Thanks for pointing this out. The problem shows up when someone was trying to use refactoring in Maven OSGi bundle project type.
I've fix it in revision web-main #0177bc71a936
Comment 6 Quality Engineering 2012-04-11 09:58:29 UTC
Integrated into 'main-golden', will be available in build *201204110400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/0177bc71a936
User: Martin Janicek <mjanicek@netbeans.org>
Log: #210852 - NullPointerException at org.netbeans.modules.maven.j2ee.web.AdditionalWebProvider.apiEjbJar
Comment 7 Quality Engineering 2012-04-12 10:02:55 UTC
Integrated into 'main-golden', will be available in build *201204120400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/0177bc71a936
User: Martin Janicek <mjanicek@netbeans.org>
Log: #210852 - NullPointerException at org.netbeans.modules.maven.j2ee.web.AdditionalWebProvider.apiEjbJar