This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 57969 - wscompile - NoClassDefFoundError: com/sun/xml/rpc/tools/wscompile/Main
Summary: wscompile - NoClassDefFoundError: com/sun/xml/rpc/tools/wscompile/Main
Status: CLOSED WONTFIX
Alias: None
Product: webservices
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Milan Kuchtiak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-18 04:47 UTC by bradmac
Modified: 2006-03-24 13:00 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bradmac 2005-04-18 04:47:37 UTC
1. installed nb 4.1
2. created web project
3. created hello world web service
4. right clicked on project node, then run
5. received error..
(path omitted)\build-impl.xml:224: taskdef class
com.sun.xml.rpc.tools.ant.Wscompile cannot be found

relevant part of build-impl.xml follows...

    <target name="wscompile-init">
        <taskdef classname="com.sun.xml.rpc.tools.ant.Wscompile" name="wscompile">
            <classpath path="${wscompile.classpath}"/>
        </taskdef>
        <mkdir dir="${build.web.dir.real}/WEB-INF/wsdl"/>
        <mkdir dir="${web.docbase.dir}/WEB-INF/wsdl"/>
        <mkdir dir="${build.classes.dir.real}"/>
        <mkdir dir="${build.generated.dir}/wssrc"/>
    </target>


6. modified build.xml by inserting the following (copied from build-impl.xml and
added classpath)..
    <target name="wscompile-init">
        <echo message="${wscompile.classpath}" />
        <taskdef classname="com.sun.xml.rpc.tools.ant.Wscompile"
name="wscompile">            
            <classpath>
                   <fileset dir="C:/Java/AppServer/lib">
                     <include name="**/*.jar"/>
                   </fileset>
            </classpath>
        </taskdef>
        <mkdir dir="${build.web.dir.real}/WEB-INF/wsdl"/>
        <mkdir dir="${web.docbase.dir}/WEB-INF/wsdl"/>
        <mkdir dir="${build.classes.dir.real}"/>
        <mkdir dir="${build.generated.dir}/wssrc"/>
    </target>

7. The echo statement above output the following..
C:\j2sdk1.4.2_08\jre\..\lib\tools.jar:

8. With the new build.xml I tried to run the project again with the following
output...
generateQuote_wscompile:
command line: wscompile C:\j2sdk1.4.2_08\jre\bin\java.exe -classpath
C:\j2sdk1.4.2_08\lib\tools.jar;C:\Brad\PdfGenerator\build\web\WEB-INF\classes
com.sun.xml.rpc.tools.wscompile.Main -d (path omitted)\build\generated\wssrc
-features:documentliteral -gen:server -keep -mapping (path
omitted)\build\web\WEB-INF\wsdl\generateQuote-mapping.xml -nd (path
omitted)\build\web\WEB-INF\wsdl -verbose -Xprintstacktrace (path
omitted)\src\java\com\practiv\bupa\pdf\generateQuote-config.xml

java.lang.NoClassDefFoundError: com/sun/xml/rpc/tools/wscompile/Main

Exception in thread "main" 

(path omitted)\nbproject\build-impl.xml:233: wscompile failed
Comment 1 Martin Grebac 2005-04-24 13:57:30 UTC
 You should register appserver (Runtime tab -> Server, right-click ... Add
server) when you want to work with web services as it provides the necessary
libraries. 
 The ui shoul not allow or at least warn when creating such broken projects.
Comment 2 Lukas Jungmann 2005-09-09 12:29:13 UTC
   User should not be able to create webservices if there's no application
server registered in IDE (see issue #63919).
Comment 3 Lukas Jungmann 2005-12-01 00:11:26 UTC
v.