Sun Web Services Tutorial Bugs + Hacks

12 AM May 16, 2003

Started on the The Java Web Services Tutorial just tonight. It is a pretty comprehensive guide to the Java Web Services Developer Pack 1.1. A dauntingly large body of technology, the WSDP ships with over 90(!) JAR files.

Diving into the tutorial, you first have to get Tomcat running. Chapter 3 Getting Started with Tomcat guides you through this process by compiling and deploying a tiny application consisting of a single JavaBean and a single JSP. Everything worked fine up to the final step, “ant install”.

At this point I got a FileNotFoundException. Half hour or so of reading the build.xml file and the ant documentation (I am an ant newbie), and I figure out that it means I need to define two properties on the ant command line: “ant -Dusername=blah -Dpassword=blah install”. I’m sure the tutorial could have told me about that. And FileNotFoundException?

With that behind me, it’s on to Chapter 11, Building Web Services With JAX-RPC. Again, everything worked fine up to the final step, “ant run”, which kicks off the client application. Boom!

Exception in thread “main” java.lang.NoClassDefFoundError: javax.xml.transform.Source

After working out what a javax.xml.transform.Source was—thanks Google—I finally traced it back to the build.properties file. Sun had misspelt “jaxp.home” as “jaxp.holme”. Grrrr.

OK, try again. “ant run”. Boom!

Exception in thread “main” java.lang.NoClassDefFoundError: com/sun/net/ssl/HostnameVerifier

Back to Google again. This time it turned out that jsse.jar (whatever that is) was missing from the classpath. A little stuffing around with the unix find command, a little ant debugging with <echo> and it became clear I needed to add ”:${wlib}/jsse.jar” to the end of the wjars variable.

Try again. “ant run”. Success. My computer tells me:

Hello Duke!

So right now I’m pretty happy that I was able to get my computer to say hello to me after only three hours of effort. Pretty happy, even though my name isn’t Duke.

PS: I fired off an email to jwsdp-feedback@sun.com.

By alang | # | Comments (6)
(Posted to Software Development)

Comments

At 13:53, 07 Dec 2003 pranav wrote:

i am having the same error at ant run. can u tell be wat is the wlib path, where i can add this jsse.jar file...

(#)
At 21:07, 09 Dec 2003 Alan Green wrote:

You might grepping through the ant config files for 'wjars'. I seem to recall that I made the change to a properties file, but it was all too long ago for specifics.

By the way, I did get an reply from Sun. They promised to do better in the next version, which is now out.

(#)
At 14:50, 06 Jul 2004 Laura wrote:

Did you ever find where to add the jsse.jar file? Because I've seemed to add it everywhere and it is still not working. I am also working on WindowsXP

Thanks

(#)
At 15:38, 06 Jul 2004 Laura wrote:

Did you ever find where to add the jsse.jar file? Because I've seemed to add it everywhere and it is still not working. I am also working on WindowsXP

Thanks

(#)
At 08:43, 11 Mar 2005 Kamesh.A wrote:

this is cool . ti works fine .

i added jsse.jar to lib folder in my tomcat

(#)
At 08:55, 21 May 2005 Deven wrote:

I am using iPlanet Web Server 6.0 sp 3. I have installed a client web service here wich will connect to my server Sun Java app server 8.1 Web service. But I am getting the same error as you mentioned. I have copied jsee.jar file into WEB_INF/lib folder . But still I am getting the same error. The person who developed the web service gone away. Please any one help me to fix this problem. I am strugling since las 10 days. But the client web service is working fine Sun one apps server 7.1 client.

(#)

Add Comment




(Not displayed)






(Leave blank line between paragraphs. URLs converted to links. HTML stripped. Indented source code will be formatted with <pre> tags.)




© 2003-2006 Alan Green