Java

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Class not found in taskdef

    4 answers - 1166 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hi all
    I like to run the com.sun.tools.ws.WsGen tool from the build.xml. For
    that I defined a taskdef in my build.xml:
    <taskdef name="wsgen" classname="com.sun.tools.ws.WsGen">
    <classpath path="wsgen.classpath" />
    </taskdef>
    and the related classpath:
    <path id="wsgen.classpath">
    <pathelement location="${java.home}/lib/tools.jar" />
    <pathelement location="${java.jaxws.home}/lib/jaxws-tools.jar" />
    </path>
    The java.home and java.jaxws.home properties are set.
    When I try now to run ant with this build file, I get an the following
    error:
    taskdef class com.sun.tools.ws.WsGen cannot be found
    command line I could run:
    java -cp
    /
    com.sun.tools.ws.WsGen
    It works. From that I think I've included all necessary libraries in the
    wsgen.classpath. It looks for me, that ant is ignoring the wsgen.classpath.
    Could anyone help me?
    Thanks a lot
    thierry
    To unsubscribe, e-mail: user-unsubscribe (AT) ant (DOT) apache.org
    For additional commands, e-mail: user-help (AT) ant (DOT) apache.org
  • No.1 | | 963 bytes | |

    Thierry Rietsch wrote:
    Hi all

    I like to run the com.sun.tools.ws.WsGen tool from the build.xml. For
    that I defined a taskdef in my build.xml:

    <taskdef name="wsgen" classname="com.sun.tools.ws.WsGen">
    <classpath path="wsgen.classpath" />
    </taskdef>

    and the related classpath:

    <path id="wsgen.classpath">
    <pathelement location="${java.home}/lib/tools.jar" />
    <pathelement location="${java.jaxws.home}/lib/jaxws-tools.jar" />
    </path>

    Hi Thierry
    if you use in the classpath element the attribute refid instead of path
    you will have more success.

    <taskdef name="wsgen" classname="com.sun.tools.ws.WsGen">
    <classpath *refid*="wsgen.classpath"/>
    </taskdef>

    regards Markus

    To unsubscribe, e-mail: user-unsubscribe (AT) ant (DOT) apache.org
    For additional commands, e-mail: user-help (AT) ant (DOT) apache.org
  • No.2 | | 1503 bytes | |

    Hello Thierry,

    you are taskdefing the wrong class, the class you are entering in
    your taskdef does not exist or cannot be used as an ant task (no
    execute method)

    a short search in google tells me this :

    <taskdef name="wsgen" classname="com.sun.tools.ws.ant.WsGen">
    <classpath path="jaxws.classpath"/>
    </taskdef>

    Regards,

    Antoine

    Aug 20, 2006, at 5:52 PM, Thierry Rietsch wrote:

    Hi all

    I like to run the com.sun.tools.ws.WsGen tool from the build.xml. For
    that I defined a taskdef in my build.xml:

    <taskdef name="wsgen" classname="com.sun.tools.ws.WsGen">
    <classpath path="wsgen.classpath" />
    </taskdef>

    and the related classpath:

    <path id="wsgen.classpath">
    <pathelement location="${java.home}/lib/tools.jar" />
    <pathelement location="${java.jaxws.home}/lib/jaxws-tools.jar" />
    </path>

    The java.home and java.jaxws.home properties are set.

    When I try now to run ant with this build file, I get an the following
    error:

    taskdef class com.sun.tools.ws.WsGen cannot be found

    command line I could run:
    java -cp
    /
    tools.jar
    com.sun.tools.ws.WsGen

    It works. From that I think I've included all necessary libraries
    in the
    wsgen.classpath. It looks for me, that ant is ignoring the
    wsgen.classpath.

    Could anyone help me?

    Thanks a lot

    thierry
  • No.3 | | 1503 bytes | |

    Hello Thierry,

    you are taskdefing the wrong class, the class you are entering in
    your taskdef does not exist or cannot be used as an ant task (no
    execute method)

    a short search in google tells me this :

    <taskdef name="wsgen" classname="com.sun.tools.ws.ant.WsGen">
    <classpath path="jaxws.classpath"/>
    </taskdef>

    Regards,

    Antoine

    Aug 20, 2006, at 5:52 PM, Thierry Rietsch wrote:

    Hi all

    I like to run the com.sun.tools.ws.WsGen tool from the build.xml. For
    that I defined a taskdef in my build.xml:

    <taskdef name="wsgen" classname="com.sun.tools.ws.WsGen">
    <classpath path="wsgen.classpath" />
    </taskdef>

    and the related classpath:

    <path id="wsgen.classpath">
    <pathelement location="${java.home}/lib/tools.jar" />
    <pathelement location="${java.jaxws.home}/lib/jaxws-tools.jar" />
    </path>

    The java.home and java.jaxws.home properties are set.

    When I try now to run ant with this build file, I get an the following
    error:

    taskdef class com.sun.tools.ws.WsGen cannot be found

    command line I could run:
    java -cp
    /
    tools.jar
    com.sun.tools.ws.WsGen

    It works. From that I think I've included all necessary libraries
    in the
    wsgen.classpath. It looks for me, that ant is ignoring the
    wsgen.classpath.

    Could anyone help me?

    Thanks a lot

    thierry
  • No.4 | | 2343 bytes | |

    ups, yes that's another failure :-) thanks a lot.

    Antoine Levy-Lambert wrote:

    Hello Thierry,

    you are taskdefing the wrong class, the class you are entering in your
    taskdef does not exist or cannot be used as an ant task (no execute method)

    a short search in google tells me this :

    <taskdef name="wsgen" classname="com.sun.tools.ws.ant.WsGen">
    <classpath path="jaxws.classpath"/>
    </taskdef>

    Regards,

    Antoine

    Aug 20, 2006, at 5:52 PM, Thierry Rietsch wrote:

    >Hi all
    >>

    >I like to run the com.sun.tools.ws.WsGen tool from the build.xml. For
    >that I defined a taskdef in my build.xml:
    >>

    ><taskdef name="wsgen" classname="com.sun.tools.ws.WsGen">
    ><classpath path="wsgen.classpath" />
    ></taskdef>
    >>

    >and the related classpath:
    >>

    ><path id="wsgen.classpath">
    ><pathelement location="${java.home}/lib/tools.jar" />
    ><pathelement location="${java.jaxws.home}/lib/jaxws-tools.jar" />
    ></path>
    >>

    >The java.home and java.jaxws.home properties are set.
    >>

    >When I try now to run ant with this build file, I get an the following
    >error:
    >>

    >taskdef class com.sun.tools.ws.WsGen cannot be found
    >>

    >command line I could run:
    >java -cp
    >/
    >>

    >com.sun.tools.ws.WsGen
    >>

    >It works. From that I think I've included all necessary libraries in the
    >wsgen.classpath. It looks for me, that ant is ignoring the
    >wsgen.classpath.
    >>

    >Could anyone help me?
    >>

    >Thanks a lot
    >>

    >thierry
    >>


    To unsubscribe, e-mail: user-unsubscribe (AT) ant (DOT) apache.org
    For additional commands, e-mail: user-help (AT) ant (DOT) apache.org

Re: Class not found in taskdef


max 4000 letters.
Your nickname that display:
In order to stop the spam: 4 + 3 =
QUESTION ON "Java"

EMSDN.COM