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.
-invoke Test method ie on stikeiron -> emailverify -> ... -> getremaining hits => loader constraint violation in interface itable initialization: when resolving method "com.sun.xml.ws.handler.SOAPMessageContextImpl.getHeaders(Ljavax/xml/namespace/QName;Ljavax/xml/bind/JAXBContext;Z)[Ljava/lang/Object;" the class loader (instance of java/net/URLClassLoader) of the current class, com/sun/xml/ws/handler/SOAPMessageContextImpl, and the class loader (instance of ) for interface javax/xml/ws/handler/soap/SOAPMessageContext have different Class objects for the type javax/xml/bind/JAXBContext used in the signature com.sun.xml.ws.handler.ClientSOAPHandlerTube.getContext(ClientSOAPHandlerTube.java:119) ... java.lang.reflect.Method.invoke(Method.java:597) org.netbeans.modules.websvc.saas.ui.wizards.ReflectionHelper.callMethodWithParams(ReflectionHelper.java:735) org.netbeans.modules.websvc.saas.ui.wizards.TestWebServiceMethodDlg$MethodTask.run(TestWebServiceMethodDlg.java:697)
Lukas, does this happen for both jdk 1.5 and 1.6?
I'm now on JDK1.6.0_10-rc-b26 where I would not expect this to happen but let me try... I'll let you know soon...
same happens on jdk1.6.0_03 but on jdk1.5.0_15 there's another exception: Class javax/xml/bind/attachment/AttachmentMarshaller violates loader constraints java.lang.ClassLoader.defineClass1(Native Method) java.lang.ClassLoader.defineClass(ClassLoader.java:620) org.netbeans.JarClassLoader.doLoadClass(JarClassLoader.java:225) org.netbeans.ProxyClassLoader.selfLoadClass(ProxyClassLoader.java:262) org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:226) java.lang.ClassLoader.loadClass(ClassLoader.java:251) java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) com.sun.xml.bind.v2.runtime.XMLSerializer.startDocument(XMLSerializer.java:819) ... java.lang.reflect.Method.invoke(Method.java:585) org.netbeans.modules.websvc.saas.ui.wizards.ReflectionHelper.callMethodWithParams(ReflectionHelper.java:735) org.netbeans.modules.websvc.saas.ui.wizards.TestWebServiceMethodDlg$MethodTask.run(TestWebServiceMethodDlg.java:697) java.lang.Thread.run(Thread.java:595) and IDE suddenly becomes a bit more verbose (not sure if this is related): WARNING [org.netbeans.ProxyClassLoader]: Will not load class com.sun.org.apache.xml.internal.resolver.CatalogManager arbitrarily from one of org.netbeans.StandardModule$OneModuleClassLoader@3f265b[org.netbeans.libs.jaxb] and org.netbeans.StandardModule$OneModuleClassLoader@2264da[org.netbeans.modules.websvc.jaxws21]; see http://wiki.netbeans.org/DevFaqModuleCCE
see desc4
The issue here is the websvc.saas.ui module does not have a dependency on the jaxws21 library module which is required to test the soap services. Therefore, for jdk1.6, the tester is using the jaxws library in the jdk for testing which loaded its own version of JAXBContext which conflicts with the JAXBContext loaded by websvc.saas.ui module classloader. Similarly, for jdk1.5, since jaxws21 library doesn't exists, we get a different type of exception. I tried adding the jaxws21 library to websvc.saas.ui module and was able to get past both exceptions for both jdk 1.5 and 1.6. However, I got the following exception: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357) at java.lang.Class.getConstructor0(Class.java:2671) at java.lang.Class.getDeclaredConstructor(Class.java:1953) at com.sun.xml.bind.v2.model.nav.ReflectionNavigator.hasDefaultConstructor(ReflectionNavigat or.java:464) at com.sun.xml.bind.v2.model.nav.ReflectionNavigator.hasDefaultConstructor(ReflectionNavigat or.java:58) ...... at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:286) at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139) at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:117) .... at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522) at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:220) at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:218) ..... at javax.xml.ws.spi.Provider.provider(Provider.java:83) at javax.xml.ws.Service.<init>(Service.java:56) at com.strikeiron.EmailVerification.<init>(EmailVerification.java:44) Caused: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java: 39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorIm pl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at org.netbeans.modules.websvc.saas.ui.wizards.ReflectionHelper.callMethodWithParams(Reflect ionHelper.java:667) Which is very very strange because looking at the stack trace, javax.xml.bind.JAXBContext is already loaded which means JAXBException should be, too. Anyway, the first thing we need to do is to abstract out all the actions on the web services manager and move the implementation for the test service action to the websvc.manager module.
Above mentioned refactoring is done. Now I see the exception Peter reported ie., java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException at java.lang.Class.getDeclaredConstructors0(Native Method)
*** Issue 141919 has been marked as a duplicate of this issue. ***
FYI, when testing StrikeIron method, I got javax/xml/bind/attachment/AttachmentMarshaller showing up in red (assume exception but there were no details) in my output window. This under 1.6.0_u6. See my attachment to bug http://www.netbeans.org/issues/show_bug.cgi?id=141936.
Since Rico is debugging this issue, assigning to rico.
So by adding a dependency on the jaxb module to the jaxws21api module and adding javax.xml.bind.** to OpenIDE-Module-Hide-Classpath-Packages entry in the manifest file for jaxws21api module as suggested by Milan solves the problem for both jdk 1.5 and 1.6. Fix checked into trunk: http://hg.netbeans.org/main/rev/22bd1349aa67
Integrated into 'main-golden', available in build *200808060201* on http://bits.netbeans.org/dev/nightly/ Changeset: http://hg.netbeans.org/main/rev/22bd1349aa67 User: PeterTLiu@netbeans.org Log: Fix for IZ #141205
v.