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 : 20070311 with JDK 1.6 on XP. Created simple Webapplication. Add a webservice with all default values. add an operation which accepts a string and returns a string. Fix javadoc issues in editor. Now compile the web project. Observe the following exception in out put window. Exception in thread "main" java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/G:/downloads/NB6/NetBeans%206.0%20Dev/ide8/modules/ext/jaxws21/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.5.0/docs/guide/standards/) at com.sun.xml.bind.v2.model.impl.ModelBuilder.<clinit>(ModelBuilder.java:135) 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.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:84) at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:86) at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:126) at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:125) at java.security.AccessController.doPrivileged(Native Method) at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:124) at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:63) at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:229) at com.sun.tools.ws.wscompile.WsgenTool.buildModel(WsgenTool.java:185) at com.sun.tools.ws.wscompile.WsgenTool.run(WsgenTool.java:89) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.tools.ws.Invoker.WsgenMain(Invoker.java:115) at com.sun.tools.ws.WsGen.main(WsGen.java:38)
Can you attach build-impl.xml from your project (or whole nbproject dir), please?
In this case IDE is configured with Tomcat only. There is no appserver is configured in runtime.
Created attachment 39490 [details] build-impl.xml
Thanks for the additional steps. Anyway, I still cannot reproduce it. It works fine for me using latest trunk build (the one from http://deadlock.nbextras.org/hudson/) on both platforms (XP, ubuntu) with jdk6u1-b03. My project (webapp w/ simple ws for bundled tomcat) builds correctly and during the deployment I can see following expected message in the output from Tomcat: "... Mar 14, 2007 10:05:41 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized SEVERE: WSSERVLET11: failed to parse runtime descriptor: java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/D:/NetBeansProjects/WebApplication1/build/web/WEB-INF/lib/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.5.0/docs/guide/standards/) **************************************WARNING*************************************** To use JAX-WS 2.1 with JDK 6, newer versions of API jars need to be in bootclasspath before rt.jar. To do this you can use Java endorsed mechanism to override what is in Java platform. The easiest way to do so is to set the system environment variable JAVA_ENDORSED_DIRS=D:\test\netbeans\ide8\modules\ext\jaxws21\api. ************************************************************************************ ..." Can you try the latest bits as well, please?
Also I don't see any important differences in our build scripts, weird. Maybe you don't have jaxws.endorsed.dir property set correctly in project or private properties...
I did not set any properties. Is it necessary to set the property "jaxws.endorsed.dir" to compile a webservice in NetBeans? if so where do I need to set this property and what value I should use for this property.
It should be set automatically by the IDE, you should be able to find it in $PRJ_DIR/nbproject/private/private.properties and it should point to $NB_HOME/ide8/modules/ext/jaxws21/api. If you have it there, try to replace "/" with "\\". BTW: Isn't there a space in path to your NetBeans installation?
My NB installation is : "G:\downloads\NB6\NetBeans 6.0 Dev" . I guess NB Installer creates install path with spaces.
Bingo! The space in path is the cause. I will have a patch for this in a while, hope that Milan will apply it soon ;)
BTW: pcm: thanks for catching this! :)
I'm attaching a patch for this. Note that space in path is handled differently by "compilerarg" nested element of javac task and "jvmarg" nested element of ws{gen|import} tasks therefore I couldn't simply put the value in the properties file into double apostrophes. The same problem is also in 5.5.1 and we should fix this there as well. Rico, Milan please review and eventually apply attached patch. Jardo, please, verify. Thanks.
Created attachment 39586 [details] proposed patch
Created attachment 39589 [details] complete patch for trunk
Created attachment 39590 [details] complete patch for trunk
Please, use the latest patch (the first does not fix all project types, the second has incorrect mime-type), sorry for confusion.
New patch works O.K.
Fixed for 6.0. Thank you for the patch. I used it to implement changes for build-impl.xsl files. However, I used the InstalledFileLocator to resolve endorsed directory in WSUtils:getJaxWsApiDir() method. See : http://websvc.netbeans.org/source/browse/websvc/jaxwsmodel/src/org/netbeans/modules/websvc/api/jaxws/project/WSUtils.java?r1=1.4&r2=1.5 All changes: /cvs/websvc/jaxwsmodel/src/org/netbeans/modules/websvc/api/jaxws/project/WSUtils.java,v <-- WSUtils.java new revision: 1.5; previous revision: 1.4 /cvs/websvc/jaxwsmodel/nbproject/project.xml,v <-- project.xml new revision: 1.6; previous revision: 1.5 /cvs/web/project/src/org/netbeans/modules/web/project/resources/build-impl.xsl,v <-- build-impl.xsl new revision: 1.117; previous revision: 1.116 /cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/resources/build-impl.xsl,v <-- build-impl.xsl new revision: 1.65; previous revision: 1.64 /cvs/j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/resources/build-impl.xsl,v <-- build-impl.xsl new revision: 1.9; previous revision: 1.8 /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl,v <-- build-impl.xsl new revision: 1.84; previous revision: 1.83
Fix looks good. Kindly implement in 5.5.1
Fix caused another problems, line "<compilerarg line="-Djava.endorsed.dirs=${jaxws.endorsed.dir}"/>" in build-impl.xml is missing apostrophes. Reopening. deps-ear-jar: deps-jar: wsimport-init: wsimport-client-check-SearchWS.asmx: wsimport-client-SearchWS.asmx: wsimport-client-generate: wsimport-client-compile: Compiling 6 source files to C:\Documents and Settings\Telco\My Documents\NetBeansProjects\WebApplication11\build\web\WEB-INF\classes javac: invalid flag: Files\NetBeans Usage: javac <options> <source files> use -help for a list of possible options C:\Documents and Settings\Telco\My Documents\NetBeansProjects\WebApplication11\nbproject\build-impl.xml:320: The following error occurred while executing this line: C:\Documents and Settings\Telco\My Documents\NetBeansProjects\WebApplication11\nbproject\build-impl.xml:149: Compile failed; see the compiler error output for details. BUILD FAILED (total time: 0 seconds)
Yes, I applied incorrectly the Lukas Patch. Here is the correction : http://web.netbeans.org/source/browse/web/project/src/org/netbeans/modules/web/project/resources/build-impl.xsl?r1=1.117&r2=1.118
Created attachment 39682 [details] build-impl.xsl from netbeans_home/enterprise3/modules/org-netbeans-modules-web-project.jar
Corrected jar works fine.
Checked into 551 : /cvs/websvc/jaxwsmodel/src/org/netbeans/modules/websvc/api/jaxws/project/WSUtils.java,v <-- WSUtils.java new revision: 1.1.2.17.10.3; previous revision: 1.1.2.17.10.2 /cvs/websvc/jaxwsmodel/nbproject/project.xml,v <-- project.xml new revision: 1.1.2.19.10.1; previous revision: 1.1.2.19 /cvs/web/project/src/org/netbeans/modules/web/project/resources/build-impl.xsl,v <-- build-impl.xsl new revision: 1.100.12.6.2.53.6.2; previous revision: 1.100.12.6.2.53.6.1 /cvs/j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/resources/build-impl.xsl,v <-- build-impl.xsl new revision: 1.1.4.25.8.4; previous revision: 1.1.4.25.8.3 /cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/resources/build-impl.xsl,v <-- build-impl.xsl new revision: 1.49.16.4.2.30.8.2; previous revision: 1.49.16.4.2.30.8.1 /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl,v <-- build-impl.xsl new revision: 1.58.2.5.2.12.6.2; previous revision: 1.58.2.5.2.12.6.1
VERIFIED in 20070320-1724