Note that there are some explanatory texts on larger screens.

plurals
  1. POtaskdef class com.sun.tools.ws.ant.WsImport cannot be found Following "The java web services tutorial"
    primarykey
    data
    text
    <p>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 <a href="http://download.oracle.com/docs/cd/E17802_01/webservices/webservices/docs/2.0/tutorial/doc/" rel="noreferrer">The java web services tutorial</a>, which seems at points out of sync,</p> <p>Specially <a href="http://download.oracle.com/docs/cd/E17802_01/webservices/webservices/docs/2.0/tutorial/doc/" rel="noreferrer">here</a>, when I try to compile, I get the following message:</p> <blockquote> <p>C:\javaeetutorial5\examples\jaxws\common\targets.xml:26: taskdef class <strong>com.sun.tools.ws.ant.WsImport</strong> cannot be found</p> </blockquote> <p>I have tried many different combinations of placing jars or changing environment variables, but with no result. Any successful stories?</p> <p>The full build error message is the following:</p> <blockquote> <p>BUILD FAILED</p> <p>C:\javaeetutorial5\examples\jaxws\helloservice\build.xml:4: The following error occurred while executing this line:</p> <p>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</p> <p>using the classloader AntClassLoader[C:\Program Files (x86)\Java\jdk1.6.0_23\lib\tools.jar]</p> <p>Total time: 0 seconds</p> </blockquote> <p>And the corresponding <strong>taskdef</strong>:</p> <pre><code>&lt;taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport"&gt; &lt;classpath refid="jaxws.classpath"/&gt; &lt;/taskdef&gt; </code></pre> <p>Also a peek into the endorsement directory:</p> <pre><code>C:\javaeetutorial5\kschneid&gt;cd %JAVA_HOME% C:\Program Files (x86)\Java\jdk1.6.0_23&gt;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 &lt;DIR&gt; . 25/02/2011 09:34 &lt;DIR&gt; .. 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&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload