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.
build 200605100500 I've got NPE during IDE startup. I had opened one EJB module.
Created attachment 30318 [details] NPE
The same problem (NPE from EjbJarProvider.getModuleVersion()) is preventing the verification hints from working. This issue is blocking me, setting priority to P1 java.lang.RuntimeException: java.lang.NullPointerException at org.netbeans.modules.j2ee.verification.JEEVerificationAnnotationProvider.processDocument(JEEVerificationAnnotationProvider.java:255) at org.netbeans.modules.j2ee.verification.JEEVerificationAnnotationProvider.access$100(JEEVerificationAnnotationProvider.java:68) at org.netbeans.modules.j2ee.verification.JEEVerificationAnnotationProvider$ChangeListener$1.run(JEEVerificationAnnotationProvider.java:344) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:493) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:926) Caused by: java.lang.NullPointerException at org.netbeans.modules.j2ee.ejbjarproject.EjbJarProvider.getModuleVersion(EjbJarProvider.java:245) at org.netbeans.modules.j2ee.verification.ejb.EJBAPIProblemFinder.isApplicable(EJBAPIProblemFinder.java:96) at org.netbeans.modules.j2ee.verification.ejb.EJBAPIProblemFinder.parseDocument(EJBAPIProblemFinder.java:57) at org.netbeans.modules.j2ee.verification.JEEVerificationAnnotationProvider.processDocument(JEEVerificationAnnotationProvider.java:240)
Looks like a problem in the EJB project, I will look at it.
Andrei, the cause of this is missing ejb-jar.xml. Therefore mentioned NPE is being thrown. Similar issue was in appclient project and is fixed now, please check issue 73710.
Caused by Stepan's change of the Java EE 5 programmatic version from "1.5" to "5", which was a planned change. Please change j2ee.platform in your project's project.properties from "1.5" to "5". Closing as invalid.
shouldn't there be something like automatic migration? version synonims? guess another dozen of users will be struggling with this issue
No. Importing projects created in non-FCS versions (e.g., importing projects from beta 1 in beta 2) is not supported.
If you take the customer's hat, this is a real bug... Accepting 1.5 and 5 as valid entries is a must. Or this is the best way to be right, and still piss of the entire community: what do you prefer?
Having NPEs instead of a nice error message saying that this version number is not a valid one is a bug. Reopening. Change the priority to whatever you want (P3 I guess), but all of the properties in project.properties should be validated as this file is user visible. Wrong properties should be nicely reported to the user. For example if your conf dir is not correctly described, you have other npes or hard to detect behaviour.
For this specific field and this specific value (j2ee.platform=1.5) would it be that difficult to add a hook, not sure if it would be on "properties read" or "project open", that automatically converted the 1.5 to a 5 and triggered a save? I have to agree with Ludo that this will be visible enough that we should deal with it, but silently fixing it would be much better than just telling the user to fix it themselves.
Again: Importing projects created in non-FCS versions (e.g., importing projects from beta 1 in beta 2) is not supported. I am willing to treat this as a P3 defect. Let's see how many duplicates we'll get.
Now that the programmatic version has benn rollbacked to 1.5 the issue is not visible anymore. Exceptions caused by invalid properties don't have a big user impact since not many users modify their project.properties file. Downgrading to P4.
*** Issue 80003 has been marked as a duplicate of this issue. ***
*** Issue 80086 has been marked as a duplicate of this issue. ***
Note that you can never get NPE from getModuleVersion() again. See my last comment in issue 77626. And since "the programmatic version has benn rollbacked to 1.5" as Andrei said this is not issue anymore this is actually fixed by 83114. http://j2ee.netbeans.org/source/browse/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/EjbJarProvider.java?r1=1.23.36.6.2.6&r2=1.23.36.6.2.7 Please reopen with better summary if I misunderstand something. Thanks.
v