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.
[own build from trunk 12/28/2006, IDE running on JDK 6] -create jaxws client in java se project -expand ws client node => following exception is being thrown until one (somehow) quits from the IDE: SEVERE [org.openide.util.RequestProcessor] java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:389) at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:253) at com.sun.tools.xjc.reader.xmlschema.bindinfo.BindInfo.getJAXBContext(BindInfo.java:316) at com.sun.tools.xjc.reader.internalizer.SCDBasedBindingSet.apply(SCDBasedBindingSet.java:195) at com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:502) at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:211) at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:69) at com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:119) at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2156) at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:176) at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:126) at org.netbeans.modules.websvc.api.jaxws.wsdlmodel.WsdlModeler.generateWsdlModel(WsdlModeler.java:185) at org.netbeans.modules.websvc.api.jaxws.wsdlmodel.WsdlModeler.access$000(WsdlModeler.java:46) at org.netbeans.modules.websvc.api.jaxws.wsdlmodel.WsdlModeler$1.run(WsdlModeler.java:69) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:541) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:963) Seems to be related to using JAX-WS 2.1 on JDK 6
Possible "fix" is explained in Vivek's blog, see: http://weblogs.java.net/blog/vivekp/archive/2006/12/webservices_in.html
see also related JDK bugs: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6505140 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6485263 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6503320
I tested setting the "java.endorsed.dirs" property with jdk1.6 in my Linux: netbeans.conf : netbeans_default_options="-J-Xms32m -J-Xmx128m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -J-Dnetbeans.logger.console=true -J-ea -J-Dapple.laf.useScreenMenuBar=true -J-Djava.endorsed.dirs=$progdir/../ide8/modules/ext/jaxws20" and it works. Nevertheless, I don't believe it will work on Windows.
Per phone discussion, reassigning to Milan.
Solution (or at least workaround for now) for this is to: 1) split JAX-WS library into two parts (in different directories): 1st must contain only "jaxws-tools.jar" - say LibA 2nd must contain the rest of jars from this library - say LibB 2) "java.endorsed.dirs" system property must be set during IDE startup and must point to the directory of LibB or the content of this lib. must be copied into $JAVA_HOME/jre/lib/endorsed 3) wsimport task in generated projects' build scripts must be run with 'fork="true"' and following nested element must be added to this task: <jvmarg value="-Djava.endorsed.dirs=${java.endorsed.dirs}"/>
*** Issue 91346 has been marked as a duplicate of this issue. ***
Too complicated workaround. The original problem is in JAX-WS and JDK1.6. I reported an issue to JAX-WS2.1 : https://jax-ws-sources.dev.java.net/issues/show_bug.cgi?id=39
"jaxb-xjc.jar" must be excluded from "LibB" too, because it contains ant tasks definitions (for xjc and schemagen)
*** Issue 92788 has been marked as a duplicate of this issue. ***
JAX-WS team recommends to set java.endorsed.dirs property containing 2 jars: jaxb-api.jar jaxws-api.jar
Fixed partially in websvc/jaxws20 : jaxws-api.jar and jaxb-api.jar moved to a standalone directory: http://websvc.netbeans.org/source/browse/websvc/jaxws20/src/org/netbeans/modules/websvc/jaxws20/jaxws20.xml?r1=1.1.4.3.22.1&r2=1.1.4.3.22.2 http://websvc.netbeans.org/source/browse/websvc/jaxws20/src/org/netbeans/modules/websvc/jaxws20/jaxb20.xml?r1=1.1.2.2&r2=1.1.2.2.22.1 http://websvc.netbeans.org/source/browse/websvc/jaxws20/src/org/netbeans/modules/websvc/jaxws20/Bundle.properties?r1=1.1.4.4&r2=1.1.4.4.14.1 http://websvc.netbeans.org/source/browse/websvc/jaxws20/build.xml?r1=1.1.4.2&r2=1.1.4.2.22.1 http://websvc.netbeans.org/source/browse/websvc/jaxws20/nbproject/project.properties?r1=1.1.4.4.22.1&r2=1.1.4.4.22.2 http://websvc.netbeans.org/source/browse/websvc/jaxws20/nbproject/project.xml?r1=1.1.4.10.18.3&r2=1.1.4.10.18.4
OK, I am working on a patch for shell launcher and netbeans.exe that will pass thiw property (unless there is another definition in netbeans_default_options).
Created attachment 37803 [details] patch for netbeans launcher (trunk version)
Created attachment 37804 [details] rebuilt launcher (trunk)
Created attachment 37805 [details] rebuilt console version of launcher (trunk)
Windows launcher is fixed in trunk. Please test it carefully Checking in netbeans.exe; /shared/data/ccvs/repository/ide/launcher/windows/netbeans.exe,v <-- netbeans.exe new revision: 1.25; previous revision: 1.24 done Checking in nb.exe; /shared/data/ccvs/repository/ide/launcher/windows/nb.exe,v <-- nb.exe new revision: 1.25; previous revision: 1.24 done Checking in netbeans.cpp; /shared/data/ccvs/repository/ide/launcher/windows/netbeans.cpp,v <-- netbeans.cpp new revision: 1.27; previous revision: 1.26 done
Created attachment 37811 [details] rebuilt launcher (release551)
Created attachment 37812 [details] rebuilt console version of launcher (release551)
Created attachment 37813 [details] proposed patch
Fixed also launcher in trunk - /shared/data/ccvs/repository/ide/launcher/unix/netbeans,v <-- netbeans new revision: 1.42; previous revision: 1.41 Now I will prepare patch for 5.5.1
In NB5.5.1 proposed patch works O.K. for Glassfish,however on Tomcat,although web service could be successfully deployed now,it's still deployed stopped,because Tomcat doesn't use endorsed directory,as indicated by exception in Tomcat output tab(the same exception mentioned here).This should be solved maybe in separate issue. Fix for NB6.0 works O.K. on Glassfish - Tomcat is still blocked by issue 92342.
I played with the new launcher (Netbeans6.0). The solution is good for Netbeans running on jdk1.6 but not for jdk1.5. The "java.endorsed.dirs" propery should be setup conditionaly: only if jdk version is 1.6. There is a discussion in JAX-WS team, nowadays, about these inconveniences and JAX-WS team is looking for a solution for the final release of JAX-WS2.1. We will see if they manage to find solution and whether the solution will be found for both jax-ws runtime and for jax-ws ant scripts.
Created attachment 37882 [details] unix launcher patch (release551)
re Milan'c comment about JDK5/6: there is no simple and fast way how to find what version of JDK will be used. Sorry.
I tested thoroughly Radim's changes to NB Launcher. We can set the "java.endorsed.dirs" property to IDE JVM regardless the jdk version. We only need to put the right jar files to endorsed directory. I found that except of jaxws-api.jar and jaxb-api.jar we need to add jsr173_api.jar. According to the discussion with jax-ws team. we don't need to care about jdk version. I am still waiting to the exact list of jars that need to be put to endorsed directory. As for me : Radim's changes are correct and can be integrated to release551 branch. As far as WS running on Tomcat: yes we also need to resolve the issue 92342. Tomcat (running in different JVM) requires setting the JAVA_ENDORSED_DIRS property to the same value as IDE's "java.endorsed.dirs"
Note that after integration to trunk we see approx. 5% startup regression due more JARs on bootclasspath and mainly disabled class data sharing. Manual measurements comparing builds from Jan 29 and Jan 31 on my P3/800MHz/512MB/Linux Ubuntu0610/JDK1.6.0_01-b03 desktop show similar numbers and 6-7% regresion for a cold start.
More files had to be added to endorsed. Final list of all APIs from endorsed directory : jaxb-api.jar jaxws-api.jar jsr173_api.jar jsr181-api.jar saaj-api.jar Changed in trunk: http://websvc.netbeans.org/source/browse/websvc/jaxws20/nbproject/project.xml?r1=1.7&r2=1.8 http://websvc.netbeans.org/source/browse/websvc/jaxws20/nbproject/project.properties?r1=1.8&r2=1.9 http://websvc.netbeans.org/source/browse/websvc/jaxws20/build.xml?r1=1.5&r2=1.6 http://websvc.netbeans.org/source/browse/websvc/jaxws20/src/org/netbeans/modules/websvc/jaxws20/jaxws20.xml?r1=1.7&r2=1.8
*** Issue 90685 has been marked as a duplicate of this issue. ***
Created attachment 38397 [details] Patch to IDE main classloader to filter out JAX-WS 2.0 from JDK 6
I have attached a patch against NB 5.5.1 which filters out JAX-WS 2.0 API classes from the main IDE classloader. This helped somewhat - the functionality works in the IDE and does not throw exceptions. Ant still throws errors (LinkageError), but this may be because of the fact that we don't have the latest Kohsuke's fixes bundled in the IDE.
Petr N. found that there is wrong condition in my patch - /shared/data/ccvs/repository/ide/launcher/unix/netbeans,v <-- netbeans new revision: 1.43; previous revision: 1.42
Petr N. found that there is wrong condition in my patch, fixed and checked that now it is really possible to set this property in netbeans.conf - /shared/data/ccvs/repository/ide/launcher/unix/netbeans,v <-- netbeans new revision: 1.43; previous revision: 1.42 and he also pointed that comment in windows launcher source is wrong /shared/data/ccvs/repository/ide/launcher/windows/netbeans.cpp,v <-- netbeans.cpp new revision: 1.28; previous revision: 1.27
Created attachment 38530 [details] updated launcher patch for 551 (both unix and win)
I hope that Petr now can add his yes to these patches
Yes, the patch is correct now. Thanks.
Launcher part fixed in release551 branch Checking in ide/launcher/unix/netbeans; /shared/data/ccvs/repository/ide/launcher/unix/netbeans,v <-- netbeans new revision: 1.23.2.3.2.6.22.1; previous revision: 1.23.2.3.2.6 done Checking in ide/launcher/windows/nb.exe; /shared/data/ccvs/repository/ide/launcher/windows/nb.exe,v <-- nb.exe new revision: 1.15.2.3.2.5.28.1; previous revision: 1.15.2.3.2.5 done Checking in ide/launcher/windows/netbeans.cpp; /shared/data/ccvs/repository/ide/launcher/windows/netbeans.cpp,v <-- netbeans.cpp new revision: 1.17.2.2.2.6.22.1; previous revision: 1.17.2.2.2.6 done Checking in ide/launcher/windows/netbeans.exe; /shared/data/ccvs/repository/ide/launcher/windows/netbeans.exe,v <-- netbeans.exe new revision: 1.15.2.3.2.5.28.1; previous revision: 1.15.2.3.2.5 done
Changing the resolution to FIXED. I will open another bug to track of 5% performance regression as a result of the endorsed mechanism. Note that this fix is temporary only for beta.
Opened http://www.netbeans.org/issues/show_bug.cgi?id=95741 to keep track of the performance regression
It works as I expect now, thanks => v. (also setting correct TM)