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: NetBeans IDE Dev (Build 201305152300) VM: Java HotSpot(TM) 64-Bit Server VM, 23.21-b01, Java(TM) SE Runtime Environment, 1.7.0_21-b11 OS: Windows 7 User Comments: GUEST: Clic on Services > Webservices mkhramov: Expand some nodes in Services panel Stacktrace: java.lang.NullPointerException at javax.xml.bind.ContextFinder.handleClassCastException(ContextFinder.java:129) at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:201) at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:146) at javax.xml.bind.ContextFinder.find(ContextFinder.java:361) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:446) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:409)
Created attachment 134592 [details] stacktrace
This bug already has 5 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=200728
Created attachment 134904 [details] stacktrace Trying to load the web project this build borked.
Created attachment 135038 [details] stacktrace start Java REST Client wizard and open IDE Web Services browser
I tracked down the cause of this issue and it caused by the fix of issue 229426 - reverting #f22c7660c05f resolves this problem. The problem is that javax.xml.bind.ContextFinder calls around line 330 classLoader.getResourceAsStream("META-INF/services/javax.xml.bind.JAXBContext") which returns incorrectly null because of #f22c7660c05f. That causes ContextFinder to fallback on a default factory and that fails because the default factory comes from JDK's jar while API is from jar bundled with the IDE which results into class cast exception. The problem is easy to reproduce: start the IDE and expand "Web Services" node in Services panel. Considering the cause is in the lookup/classloader this is likely P1 as impact might be big. Separately I filed an issue to evaluate whether we still need JAXB library and impl module: issue 230494 - "is dependency on JAXB 2.2 library still needed?"
Thanks for the investigation.
This bug already has 10 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=200728
This should to be fixed for 7.4 Beta.
Created attachment 135419 [details] stacktrace First attempt to open 'Add Web Service' on Web Services node in Services tab
javax.xml.bind.ContextFinder seems to be hard to debug. Can't find sources to match the code in NetBeans (maybe result of bug 230494?). Anyway it seems that ContextFinder is using getResource call, and not getResources. Issue 229426 seems to only support (incorrectly) getResources.
ergonomics#3c770e3ddb4d
(In reply to comment #10) > javax.xml.bind.ContextFinder seems to be hard to debug. Can't find sources to > match the code in NetBeans Yeah, I had the same problem. By default JDK's sources are available for JAXB API but in runtime NetBeans is using instead JAXB from xml.jaxb.api module which is 2.2.6. I had to download 2.2.6 sources (they easiest way was to download it from Maven cenntral repo) and during debugging in Debugger's Sources view disable JDK sources and add downloaded 2.2.6. Then it worked well. > (maybe result of bug 230494?). Removing JAXB 2.2.6 and relying on JDK's JABX will make this easier. Thanks for fixing it Jarda. I will test it on next build.
Integrated into 'main-golden', will be available in build *201306132301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/3c770e3ddb4d User: Jaroslav Tulach <jtulach@netbeans.org> Log: Additional fix to #229426 discovered as bug #229946: Use the same logic as in getResources also for getResource
(In reply to comment #13) > Integrated into 'main-golden', will be available in build *201306132301* on > http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) > Changeset: http://hg.netbeans.org/main-golden/rev/3c770e3ddb4d > User: Jaroslav Tulach <jtulach@netbeans.org> > Log: Additional fix to #229426 discovered as bug #229946: Use the same logic as > in getResources also for getResource So it means : this isn't fixed in Beta !!!???
Fortunately I think it is, see http://bertram2.netbeans.org:8080/job/web-main/changes. It arrived in the web-main repository yesterday (Thursday) at 1am Prague time, i.e. before the beta branching.
(In reply to comment #15) > Fortunately I think it is, see > http://bertram2.netbeans.org:8080/job/web-main/changes. It arrived in the > web-main repository yesterday (Thursday) at 1am Prague time, i.e. before the > beta branching. 7 days after actual fix in ergonomics ? :(