• Post Reply Bookmark Topic Watch Topic
  • New Topic

Can't run Axis2 1.5.1 under Tomcat 5.5 using JDK 1.5?  RSS feed

 
Kelly Powell
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to Apache's website, the requirement for Axis2 1.5.1 is JDK 1.5 and later. However, when I try to run my Web Service under Tomcat 5.5 (using JDK 1.5 as Tomcat's JRE), I always get a java.lang.NoClassDefFoundError: javax/jws/WebService error. I am aware that javax.jws is only available at JDK 1.6. I was able to run my Web Service if my Tomcat's JRE version is 1.6. But if Axis2 is compatible to JDK 1.5, then why is it using a class (javax.jws.WebService) which is not available at JDK 1.5.1? I feel like I'm missing something. Is there anything I can do to make it run under Tomcat using JRE version 1.5? Why am I receiving such error? By the way, I am using Eclipse Helios.

Below is the error message I'm receiving:

 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There may be legal reasons that prevent Apache from distributing certain Sun/Oracle jar files. You can get the JAX-WS API from http://jax-ws.java.net/, though. Just add the various jar files to where all the Axis2 jar file are, and you should be all set.
 
Kelly Powell
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Ulf Dittmer: Thanks! My web service is already working. The problem is due to my carelessness. I am compiling my classes using JDK 1.6 but running it under Tomcat which is using JDK 1.5.
 
Kelly Powell
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry to revive this. Please ignore my last comment. I was trying to delete it, but I can't seem to find the delete button. (Probably because I already marked this topic as resolved.) When I checked my Tomcat server settings on Eclipse, I found out that it's still using JDK 1.6 as its JRE. I don't how it happened but as far as I know I already changed it to JDK 1.5. Oh well. So in the end, I wasn't really able to make it work under JDK 1.5.

@Ulf Dittmer: Thanks for the link! I downloaded JAXWS and was able to find javax.jws.WebService inside jsr181-api.jar. Since I'm also receiving a "java.lang.NoClassDefFoundError: javax/xml/ws/WebServiceProvider" error message I also copied jaxws-api.jar to my lib folder. The 2 jars solve my problem, but I'm just concerned on one thing. The link you provided me is that of Metro. But I'm using Axis2. Does it mean that I'm now using both Axis2 and Metro?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. The page may say Metro, but it's actually the Jax-Ws reference implementation(which is an integral part of Metro, but that's besides the point). So, no, you're not using Metro.
 
Kelly Powell
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Ulf Dittmer: Thank you, as always, for your clarification! I thought it's a customized JAX-WS version of Metro.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!