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 173878 - NullPointerException at javax.xml.bind.ContextFinder.handleClassCastException
Summary: NullPointerException at javax.xml.bind.ContextFinder.handleClassCastException
Status: VERIFIED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: Manager (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Peter Liu
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-06 15:08 UTC by neilyboy
Modified: 2009-12-01 05:44 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 63997


Attachments
stacktrace (1.51 KB, text/plain)
2009-10-06 15:08 UTC, neilyboy
Details
stacktrace (1.51 KB, text/plain)
2009-10-06 15:14 UTC, neilyboy
Details
stacktrace (1.44 KB, text/plain)
2009-11-16 02:39 UTC, Jindrich Sedek
Details
stacktrace (1.43 KB, text/plain)
2009-11-17 04:44 UTC, aldobrucale
Details
stacktrace (1.43 KB, text/plain)
2009-11-18 09:20 UTC, Petr Jiricka
Details
stacktrace (1.44 KB, text/plain)
2009-11-19 05:48 UTC, Andrei Chistiakov
Details
stacktrace (1.43 KB, text/plain)
2009-12-01 05:44 UTC, Anton Chechel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description neilyboy 2009-10-06 15:08:49 UTC
Build: NetBeans IDE 6.7 (Build 200906241340)
VM: Java HotSpot(TM) Client VM, 1.6.0_01-b06, Java(TM) SE Runtime Environment, 1.6.0_01-b06
OS: Windows XP, 5.1, x86

User Comments:
neilyboy: tried to create a new web service client from a URL based WSDL.
Failed because I didn't have JAX-WS in endorsed dir of Java,
restarted NB tried again:
clicked to create client from URL, failed with dialogue box message complaining possibly about namespace clash, nothing in output window as everything WS related seems to clear the output window, so only lates message is visible.

clicked to services to check WS in there, got red icon of death.

Is this because I had created a WS in the Services panel and then tried to create a client from the same URL?

GUEST: Right clicked on Web Services, clicked on "Add service ...", then the failure occurred.

Just in case it is useful to know, at that time, I had MySQL and jetty running.

GUEST: Web Services still do not get displayed anymore after earlier failure trying to add a Web Service URL or a Web Service Group

GUEST: Right clicked on Web Services, added service group, clicked OK, and the error occurred.

GUEST: I had simply exited and re-run NetBeans

GUEST: 
After the Web Services disappeared, I exited and re-ran Net Beans 6.5 developer IDE (NetBeans Dev 200809020201), and the services still did not appear, so I downloaded and installed the latest developer IDE to get these reinstated.



Stacktrace: 
java.lang.NullPointerException
        at javax.xml.bind.ContextFinder.handleClassCastException(ContextFinder.java:96)
        at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:148)
        at javax.xml.bind.ContextFinder.find(ContextFinder.java:299)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)
Comment 1 neilyboy 2009-10-06 15:08:56 UTC
Created attachment 88912 [details]
stacktrace
Comment 2 Exceptions Reporter 2009-10-06 15:09:09 UTC
This issue already has 6 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=63997
Comment 3 neilyboy 2009-10-06 15:14:52 UTC
Build: NetBeans IDE 6.7 (Build 200906241340)
VM: Java HotSpot(TM) Client VM, 1.6.0_01-b06, Java(TM) SE Runtime Environment, 1.6.0_01-b06
OS: Windows XP, 5.1, x86

User Comments: 
after a failed attempt to create a web service client i restarted NB and now cannot get into the web services panel at all. 

Stacktrace: 
java.lang.NullPointerException
        at javax.xml.bind.ContextFinder.handleClassCastException(ContextFinder.java:96)
        at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:148)
        at javax.xml.bind.ContextFinder.find(ContextFinder.java:299)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)
Comment 4 neilyboy 2009-10-06 15:14:55 UTC
Created attachment 88913 [details]
stacktrace
Comment 5 Exceptions Reporter 2009-10-06 15:15:00 UTC
This issue already has 7 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=63997
Comment 6 Jindrich Sedek 2009-11-16 02:39:07 UTC
Created attachment 91068 [details]
stacktrace
Comment 7 Exceptions Reporter 2009-11-16 02:39:14 UTC
This issue already has 9 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=63997
Comment 8 aldobrucale 2009-11-17 04:44:51 UTC
Created attachment 91162 [details]
stacktrace
Comment 9 Exceptions Reporter 2009-11-17 04:44:58 UTC
This issue already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=63997
Comment 10 Petr Jiricka 2009-11-18 09:20:19 UTC
Created attachment 91268 [details]
stacktrace
Comment 11 Petr Jiricka 2009-11-18 09:24:41 UTC
Easily reproducible - just expand the Web Services node in Services tab.
Comment 12 Andrei Chistiakov 2009-11-19 05:48:37 UTC
Created attachment 91334 [details]
stacktrace
Comment 13 Milan Kuchtiak 2009-11-19 09:08:52 UTC
This is pretty serious. The Web Services node in Services Tab is entirely unusable. See the P.Jiricka comment.
Comment 14 Peter Liu 2009-11-19 18:55:34 UTC
It looks like this problem is caused by the addition of jaxb1-impl.jar (implementation library for jaxb v1?) in libs.jaxb library module. The saas module depends jaxb v2 for un/marshalling jaxb models. 

I don't know who added the jar file but I think the solution is to remove it and create a separate jaxb library module for v1.
Comment 15 Milan Kuchtiak 2009-11-20 04:17:42 UTC
According to JAXB expert, the jaxb1-impl.jar is integral part of JAXB 2.2.

The following code in SaasUtil looks strange. Why it is there ?
...
ClassLoader orig = Thread.currentThread().getContextClassLoader();        Thread.currentThread().setContextClassLoader(SaasUtil.class.getClassLoader());
try {
 ...
} finally {
    Thread.currentThread().setContextClassLoader(orig);
}

When I removed those lines, it works.
Comment 16 Martin Grebac 2009-11-20 05:40:53 UTC
This is caused by the change to not put Metro library to IDE's classpath long
time ago and not removing the workaround covering the dual class definition
problem.
Comment 17 Martin Grebac 2009-11-20 06:11:33 UTC
Fixed in web-main:
http://hg.netbeans.org/web-main/rev/ab59a6dd6389
Comment 18 pribyl 2009-11-27 08:27:02 UTC
Product Version: NetBeans IDE 6.8 RC1 (Build 200911252200)
Java: 1.6.0_16; Java HotSpot(TM) Client VM 14.2-b01
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)

Verified
Comment 19 Anton Chechel 2009-12-01 05:44:35 UTC
Created attachment 91916 [details]
stacktrace