I saw the same issue in many different locations and even after a good portion of googling, I could not resolve it. What I am trying to do (the bigger picture) is to go through The java web services tutorial, which seems at points out of sync,
Specially here, when I try to compile, I get the following message:
C:\javaeetutorial5\examples\jaxws\common\targets.xml:26: taskdef class com.sun.tools.ws.ant.WsImport cannot be found
I have tried many different combinations of placing jars or changing environment variables, but with no result. Any successful stories?
The full build error message is the following:
BUILD FAILED
C:\javaeetutorial5\examples\jaxws\helloservice\build.xml:4: The following error occurred while executing this line:
C:\javaeetutorial5\examples\jaxws\common\targets.xml:26: taskdef A class needed by class com.sun.tools.ws.ant.WsImport cannot be found: org/apache/tools/ant/DynamicConfigurator
using the classloader AntClassLoader[C:\Program Files (x86)\Java\jdk1.6.0_23\lib\tools.jar]
Total time: 0 seconds
And the corresponding taskdef:
<taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
<classpath refid="jaxws.classpath"/>
</taskdef>
Also a peek into the endorsement directory:
C:\javaeetutorial5\kschneid>cd %JAVA_HOME%
C:\Program Files (x86)\Java\jdk1.6.0_23>dir lib\endorsed
Volume in drive C is OSDisk
Volume Serial Number is AAAA-BBBB
Directory of C:\Program Files (x86)\Java\jdk1.6.0_23\lib\endorsed
25/02/2011 09:34 <DIR> .
25/02/2011 09:34 <DIR> ..
25/02/2011 09:34 105,134 jaxb-api.jar
25/02/2011 09:33 54,476 jaxws-api.jar
2 File(s) 159,610 bytes
2 Dir(s) 110,907,056,128 bytes free
C:\Program Files (x86)\Java\jdk1.6.0_23>
You can fix the problem in Netbeans x.y as follows:
where x.y = 7.1, 7.2, 8.0 etc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With