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.
Creating web app for netbeans (server tomcat 6) Adding the web service Adding operation on build the followinf response -------------------------------- init: deps-module-jar: deps-ear-jar: deps-jar: library-inclusion-in-archive: library-inclusion-in-manifest: wsgen-init-nonJSR109: wsgen-CalculatorWS-nonJSR109: java.lang.IllegalAccessError: tried to access class com.sun.tools.ws.Invoker from class com.sun.tools.ws.ant.WrapperTask BUILD FAILED (total time: 0 seconds) ------------------------------------ On the Sun application server is everything O.K.
My guess is that Tomcat does not support this kind of WS out of the box. Reassigning to Milan, who is more knowledgeable in the WS area.
It can be, but in previous verison of NB (5.5) I succeed BTW the tutorial "Web Services (JAX-WS) in Java EE 5" uses Tomcat 5.5 as an option.
I cannot reproduce this issue (neither with Netbeans 5.5.1 nor with Nb 6.0 Milestone 10). What version of JDK are you running on ? If using jdk6.0 JAX-WS APIs must be copied to tomcat60/endorsed directory ? Can you reproduce the issue with Nb6.0 where Tomcat6.0 should be supported ? You can download 6.0 M10 from : http://dlc.sun.com/netbeans/download/6.0/milestones/m10/ If yes, kindly, reopen the issue.
I'd only notice that if you copy all jars from JAX-WS 2.1 into some endorsed dir, it might cause problem you encountered. Try to make sure that only APIs (jaxws-api.jar and jaxb-api.jar) are in the endorsed dir.
still the same (with NB 6.0 M10) tomcat\lib: 05.05.2007 03:42 10˙478 annotations-api.jar 05.05.2007 03:42 47˙524 catalina-ant.jar 05.05.2007 03:42 117˙853 catalina-ha.jar 05.05.2007 03:42 220˙005 catalina-tribes.jar 05.05.2007 03:42 1˙101˙631 catalina.jar 15.09.2006 09:58 1˙209˙104 db2jcc.jar 15.09.2006 09:59 1˙013 db2jcc_license_cu.jar 19.05.2007 12:21 296˙047 derbyclient.jar 19.07.2007 15:59 0 dir.txt 05.05.2007 03:42 27˙398 el-api.jar 19.07.2007 15:55 <DIR> endorsed 05.05.2007 03:42 101˙456 jasper-el.jar 05.05.2007 03:42 1˙375˙531 jasper-jdt.jar 05.05.2007 03:42 509˙332 jasper.jar 05.05.2007 03:42 80˙772 jsp-api.jar 03.05.2007 14:57 4˙250˙591 jt400.jar 15.05.2007 19:38 527˙090 mysql-connector-java-5.0.6-bin.jar 05.05.2007 03:42 88˙537 servlet-api.jar 05.05.2007 03:42 726˙890 tomcat-coyote.jar 05.05.2007 03:42 172˙732 tomcat-dbcp.jar 05.05.2007 03:42 36˙414 tomcat-i18n-es.jar 05.05.2007 03:42 33˙610 tomcat-i18n-fr.jar 05.05.2007 03:42 39˙719 tomcat-i18n-ja.jar tomcal\lib\endorsed 10.06.2007 06:36 25˙872 dom.jar 18.07.2007 17:25 78˙254 jaxb-api.jar 18.07.2007 17:25 36˙005 jaxws-api.jar 10.06.2007 06:36 95˙983 sax.jar 10.06.2007 06:36 3˙171˙421 xalan.jar 05.03.2007 08:26 1˙207˙073 xercesImpl.jar 05.03.2007 08:26 195˙119 xml-apis.jar JDK 1.6 (in project set Source level 1.5) JN
tomcal/lib/endorsed is incorrect The right one should be the "tomcat/endorsed". Please put the following jars to "tomcat/endorsed" : jaxb-api.jar jaxws-api.jar jsr173_api.jar jsr181-api.jar saaj-api.jar Are you getting still the same (java.lang.IllegalAccessError) error ?
yes: message from NB6.0 init: deps-module-jar: deps-ear-jar: deps-jar: library-inclusion-in-archive: library-inclusion-in-manifest: wsgen-init-nonJSR109: wsgen-CalculatorWS-nonJSR109: C:\Documents and Settings\nemec\Dokumenty\NetBeansProjects\CalculatorWSApp\nbproject\jaxws-build.xml:29: java.lang.IllegalAccessError: tried to access class com.sun.tools.ws.Invoker from class com.sun.tools.ws.ant.WrapperTask line 29 of the file jaxws-build.xml: <?xml version="1.0" encoding="UTF-8"?> <project xmlns:xalan="http://xml.apache.org/xslt" xmlns:webproject2="http://www.netbeans.org/ns/web-project/2" xmlns:jaxws="http://www.netbeans.org/ns/jax-ws/1"> <!-- =================== JAX-WS WSIMPORT SECTION =================== --> <target name="wsgen-init" depends="init"> <mkdir dir="${build.generated.dir}/wsgen/service"/> <mkdir dir="${build.classes.dir.real}"/> <taskdef name="wsgen" classname="com.sun.tools.ws.ant.WsGen"> <classpath path="${j2ee.platform.wsgen.classpath}"/> </taskdef> </target> <target name="wsgen-CalculatorWS" depends="wsgen-init, compile"> <wsgen sourcedestdir="${build.generated.dir}/wsgen/service" resourcedestdir="${build.generated.dir}/wsgen/service" keep="false" genwsdl="true" sei="org.me.calculator.CalculatorWS"> <classpath path="${java.home}/../lib/tools.jar:${build.classes.dir.real}:${j2ee.platform.wsgen.classpath}:${javac.classpath}"/> </wsgen> </target> <target name="wsgen-init-nonJSR109" depends="init, -do-compile"> <mkdir dir="${build.generated.dir}/wsgen/service"/> <mkdir dir="${build.generated.dir}/wsgen/binaries"/> <mkdir dir="${build.classes.dir.real}"/> <taskdef name="wsgen" classname="com.sun.tools.ws.ant.WsGen"> <classpath path="${java.home}/../lib/tools.jar:${build.classes.dir.real}:${j2ee.platform.wsgen.classpath}:${javac.classpath}"/> </taskdef> </target> <target name="wsgen-CalculatorWS-nonJSR109" depends="wsgen-init-nonJSR109"> -- line 29 <wsgen fork="true" xendorsed="true" sourcedestdir="${build.generated.dir}/wsgen/service" resourcedestdir="${build.generated.dir}/wsgen/service" destdir="${build.generated.dir}/wsgen/binaries" keep="true" genwsdl="true" sei="org.me.calculator.CalculatorWS"> -- line 29 <classpath path="${java.home}/../lib/tools.jar:${build.classes.dir.real}:${j2ee.platform.wsgen.classpath}:${javac.classpath}"/> <jvmarg value="-Djava.endorsed.dirs=${jaxws.endorsed.dir}"/> </wsgen> </target> <target name="wsgen-service-compile" depends="wsgen-CalculatorWS-nonJSR109"> <webproject2:javac srcdir="${build.generated.dir}/wsgen/service" classpath="${j2ee.platform.wsimport.classpath}:${javac.classpath}" destdir="${build.classes.dir.real}"/> </target> </project>
just to be precise: environment variables: JAVAEE_HOME=c:\sun\sdk JAVA_HOME=C:\Program Files\Java\Jdk1.6.0 JAVA_ENDORSED_DIRS=C:\Program Files\Java\jdk1.6.0\jre\lib\endorsed directory "C:\Program Files\Java\jdk1.6.0\jre\lib\endorsed" contains jaxb-api.jar jaxws-api.jar jsr173_api.jar jsr181-api.jar saaj-api.jar (same as c:\Program Files\Apache Software Foundation\Tomcat 6.0\endorsed)
So after some time I found out, that I used JDK_1.6.0 - reinstallation to 1.6.0_02 and uploading endorsed dir solved the problem ... thanx for help.