Monday, January 12, 2009

NetBeans 6.5: Problems building WSDL Java apps after upgrade from 6.1

I recently updated to NetBeans 6.5 and a WEB Services client stopped working. At build time I got the following error message:

C:\myproject\JavaApplication29\nbproject\jaxws-build.xml:10: taskdef A class needed by class com.sun.tools.ws.ant.WsImport cannot be found: com/sun/istack/tools/ProtectedTask

I fixed the problem by adding:
   <classpath path="${libs.jaxb.classpath}"/>
to jaxws-build.xml

 <target name="wsimport-init" depends="init">
  <mkdir dir="${build.generated.dir}/wsimport/client"/>
  <mkdir dir="${build.generated.dir}/wsimport/binaries"/>
  <taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
    <classpath path="${libs.jaxws21.classpath}"/>

    <classpath path="${libs.jaxb.classpath}"/>
  </taskdef>
 </target>



6 comments:

Shoumo said...

What is the value of both ${libs.jaxws21.classpath}

and
${libs.jaxb.classpath}

John Sawyer said...

I don't have that information Shoumo. Apologies.

Although I don't remember having to change anything else though...

Anonymous said...

It really works.
Thank you very much for your post.

Suzanne Byington said...

That didn't work for me. Anyone have any tips?

Anonymous said...

It helped me to fix my isuue too.

loudsight said...

@Suzanne
Slightly more information here