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 222953 - NullPointerException at org.netbeans.modules.cloud.oracle.serverplugin.OracleJ2eePlatformImpl2.getJavaEELibrary
Summary: NullPointerException at org.netbeans.modules.cloud.oracle.serverplugin.Oracle...
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Oracle Cloud (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-29 09:09 UTC by Jiri Skrivanek
Modified: 2012-12-08 01:13 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 195840


Attachments
stacktrace (4.93 KB, text/plain)
2012-11-29 09:09 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2012-11-29 09:09:11 UTC
Build: NetBeans IDE Dev (Build 201211290002)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.6-b04, Java(TM) SE Runtime Environment, 1.7.0_10-ea-b15
OS: Windows 7

User Comments:
jskrivanek: - unzipped and started IDE (ergonomics enabled)
- installed plugin Oracle Cloud
- added cloud service
- started to create new web project and while finding feature it throws exception




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.cloud.oracle.serverplugin.OracleJ2eePlatformImpl2.getJavaEELibrary(OracleJ2eePlatformImpl2.java:197)
   at org.netbeans.modules.cloud.oracle.serverplugin.OracleJ2eePlatformImpl2.getLibraries(OracleJ2eePlatformImpl2.java:120)
   at org.netbeans.modules.j2ee.deployment.devmodules.api.J2eePlatform.getLibraries(J2eePlatform.java:381)
   at org.netbeans.modules.j2ee.deployment.devmodules.api.J2eePlatform.<init>(J2eePlatform.java:271)
   at org.netbeans.modules.j2ee.deployment.devmodules.api.J2eePlatform.create(J2eePlatform.java:283)
   at org.netbeans.modules.j2ee.deployment.devmodules.api.ServerInstance.getJ2eePlatform(ServerInstance.java:147)
Comment 1 Jiri Skrivanek 2012-11-29 09:09:13 UTC
Created attachment 128558 [details]
stacktrace
Comment 2 David Konecny 2012-11-29 20:46:22 UTC
Library with ID javaee-api-5.0 is missing. This library is provided by libs.oracle.cloud module. I'm guessing that in your case you manually removed that library from libraries catalogue (ie. Tools->Ant Libraries)?
Comment 3 David Konecny 2012-11-29 20:53:22 UTC
I'm preventing the NPE but without javaee5.jar compilation of project sources will not work. I'm not sure what we can do here.
5185ae6f7cc8
Comment 4 David Konecny 2012-11-30 00:05:55 UTC
You were right Jirka that this is related to ergonomics. I'm able to reproduce it too.
Comment 5 Petr Jiricka 2012-11-30 09:16:32 UTC
> 5185ae6f7cc8

Did you push this David? I don't see it in hg.
Comment 6 David Konecny 2012-12-02 20:10:57 UTC
I have not yet. It was not fixing the real cause. I need to have a one more look at this.
Comment 7 David Konecny 2012-12-03 00:41:49 UTC
One more fix: 3b09b1c6baef

The cause was following: New Web Project wizard aggressively initializes wizard panels and its server page loads all available app servers. When ergonomics enables EE modules and switches back to New Web Project wizard the Ant Libraries manager has not finished enumerating list of available libraries and that's why OracleJ2eePlatformImpl2.getJavaEELibrary fails with NPE for javaee-api-5.0 library. I've added an assert there that javaee-api-5.0 must be available; and I also change server initialization to be lazy which should avoid this issue completely.

Once verified I will integrate in release72 branch, right?
Comment 8 Quality Engineering 2012-12-04 03:15:25 UTC
Integrated into 'main-golden', will be available in build *201212040001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/5185ae6f7cc8
User: David Konecny <dkonecny@netbeans.org>
Log: #222953 - NullPointerException at org.netbeans.modules.cloud.oracle.serverplugin.OracleJ2eePlatformImpl2.getJavaEELibrary
Comment 9 Jiri Skrivanek 2012-12-06 08:16:53 UTC
Verified in 201212050001 build. Please, transplant to release72 branch.
Comment 10 David Konecny 2012-12-07 04:45:14 UTC
Fixed in release72: 815c71343629 and db32d830e70f
Comment 11 Quality Engineering 2012-12-08 01:13:56 UTC
Integrated into 'releases', will be available in build *201212071928* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/815c71343629
User: David Konecny <dkonecny@netbeans.org>
Log: #222953 - NullPointerException at org.netbeans.modules.cloud.oracle.serverplugin.OracleJ2eePlatformImpl2.getJavaEELibrary
(transplanted from 5185ae6f7cc811f509b6d6149d05d45de1ff2c32)