title: Ant Build - taskdef cannot be found
body: <p>I am attempting to perform an Ant build to build a web service from a WSDL file for a Weblogic web application. However, I am receiving the following error upon attempting the build:</p>
  
  <pre><code>BUILD FAILED 
  /&lt;path&gt;/build.xml:19: taskdef class weblogic.wsee.tools.anttasks.WsdlcTask cannot be found 
  using the classloader AntClassLoader[]
  </code></pre>
  
  <p>The taskdefs in the <code>build/xml</code> look like this:</p>
  
  <pre><code>&lt;taskdef name="wsdlc"
           classname="weblogic.wsee.tools.anttasks.WsdlcTask"/&gt;
  &lt;taskdef name="jwsc"
    classname="weblogic.wsee.tools.anttasks.JwscTask" /&gt;
  &lt;taskdef name="clientgen"
    classname="weblogic.wsee.tools.anttasks.ClientGenTask" /&gt;
  &lt;taskdef name="wldeploy"
    classname="weblogic.ant.taskdefs.management.WLDeploy"/&gt;
  </code></pre>
  
  <p>I have also tried to explicitly define the classpath in these taskdefs as follows, with no success:</p>
  
  <pre><code>&lt;taskdef name="wsdlc"
             classname="weblogic.wsee.tools.anttasks.WsdlcTask"
             classpath="/WebContent/WEB-INF/lib/weblogic.jar"/&gt;
  </code></pre>
  
  <p>And this is the classpath of the build.xml file:</p>
  
  <p><a href="https://i.stack.imgur.com/FiAWO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FiAWO.png" alt="classpath of build.xml"></a></p>
  
  <p>I have no clue why I get a "class cannot be found" error... I'm following instructions from <a href="https://docs.oracle.com/en/middleware/fusion-middleware/weblogic-server/12.2.1.4/wsget/jax-ws-setenv.html#GUID-0EF675E0-F707-4223-9AD8-C31F123D59B7" rel="nofollow noreferrer">Oracle docs - Building a Web Application from an WSDL file</a> for the format of the build.xml file.</p>
  
  <p>Notes:
  I am <strong>NOT</strong> executing this build.xml file from the same location the Weblogic server is being run from, as the Weblogic server does not have Ant installed. I am attempting to build it locally, in order to get the web service created, to finally deploy it in an EAR bundle of the WAR file + web service through the Weblogic console.</p>