Skip to main content

Problem building wsit-jaxws-fromjava on Linux Fedora core 6

2 replies [Last post]
Joined: 2007-01-30

I would appreciate any help understanding possible causes of the following build error.

[root@mc2a-1 wsit-jaxws-fromjava]# ant -Duse.tomcat=true server
Buildfile: build.xml
Trying to override old definition of task apt



[delete] Deleting directory /root/Desktop/WSIT/wsit/wsit/docs/howto/wsit-jaxws-fromjava/build

[mkdir] Created dir: /root/Desktop/WSIT/wsit/wsit/docs/howto/wsit-jaxws-fromjava/build
[mkdir] Created dir: /root/Desktop/WSIT/wsit/wsit/docs/howto/wsit-jaxws-fromjava/build/classes
[mkdir] Created dir: /root/Desktop/WSIT/wsit/wsit/docs/howto/wsit-jaxws-fromjava/build/war

[apt] Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/tools/apt/Main
[apt] Command invoked: apt /usr/java/jdk1.5.0_09/jre/bin/java -classpath /usr/local/tomcat/shared/lib/webservices-tools.jar:/usr/local/tomcat/shared/lib/webservices.jar:/root/Desktop/WSIT/wsit/wsit/docs/howto/wsit-jaxws-fromjava/src -d /root/Desktop/WSIT/wsit/wsit/docs/howto/wsit-jaxws-fromjava/build/classes -s /root/Desktop/WSIT/wsit/wsit/docs/howto/wsit-jaxws-fromjava/build/classes -sourcepath /root/Desktop/WSIT/wsit/wsit/docs/howto/wsit-jaxws-fromjava/src -g:none -target 1.5 -Ar=/root/Desktop/WSIT/wsit/wsit/docs/howto/wsit-jaxws-fromjava/build /root/Desktop/WSIT/wsit/wsit/docs/howto/wsit-jaxws-fromjava/src/fromjava/server/ /root/Desktop/WSIT/wsit/wsit/docs/howto/wsit-jaxws-fromjava/src/fromjava/server/ /root/Desktop/WSIT/wsit/wsit/docs/howto/wsit-jaxws-fromjava/src/fromjava/server/

/root/Desktop/WSIT/wsit/wsit/docs/howto/wsit-jaxws-fromjava/build.xml:226: The following error occurred while executing this line:
/root/Desktop/WSIT/wsit/wsit/docs/howto/wsit-jaxws-fromjava/build.xml:150: apt failed

Total time: 1 second
[root@mc2a-1 wsit-jaxws-fromjava]#

I have installed J2SE 5.0 (JDK 1.5.0_09), Sun compatibility package, Tomcat 5.5, Netbeans 5.5, and WSIT Milestone 2 (source from CVS) on a Fedora core 6 laptop (following fc6 caveats - install java from RPM, use "alternatives" utility to select correct java)....


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-06-25

Hi it looks like the build process is not finding 'tools.jar', which is where 'Apt' lives. If you look in the sample's 'build.xml' file, you'll see that it is looking for it in

I'm guessing that either the directory & file layout is not what is expected or java.home is not set correctly.

I'd start by confirming the location of 'tools.jar' in your install. Also you can check the 'java.home' value by adding a line like this one

Just below the start of the 'server' target, which looks like this...

Let us know what you find and we'll be glad to help you get further.

Ken Hofsass
WSIT Development Team
Sun Microsystems, Inc.

Joined: 2007-01-30


That was the help I needed. Turns out I had modified that tag to remove the .. reference because I was using a path that was actually a series of symbolic links to the real jdk home. I figured that would work. What I failed to catch was that the last of the symbolic links was a relative path and that I think was the real problem. Anyway, the second look did the trick. I was able to build server and client, run the client, and deploy the service to tomcat and pull up the wsdl in a browser. Next step is to use the wsdl and svcutil on the Windows side to generate a Windows client and test access to the service that way.

Thanks again!