File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes deploying JAX-WS webservice on tomcat 5.0 gives 404 error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "deploying JAX-WS webservice on tomcat 5.0 gives 404 error" Watch "deploying JAX-WS webservice on tomcat 5.0 gives 404 error" New topic
Author

deploying JAX-WS webservice on tomcat 5.0 gives 404 error

ratna sargurp
Ranch Hand

Joined: Jan 12, 2010
Posts: 32
Hi:

I have a simple hello world JAX-WS webservice that I am trying to deploy to Tomcat 5.0. But I get an http 404 error.

Here are the steps I tried:

1) I basically tried to repeat the steps as provided in this web site (http://www.mkyong.com/webservices/jax-ws/deploy-jax-ws-web-services-on-tomcat/)

2) I copied all the libraries from the JAX-WS lib folder into /WEB-INF/lib folder

3) I copied the mentioned jars in the website on step1., into the tomcat/shared/lib folder.

4) Generated the WAR file.

5) Copied it under /webapps on tomcat.

6) Added port 8181 on the server.xml

7) Stopped and started tomcat.

I still get the 404 error.

Any help on this is appreciated.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42266
    
  64
What is the exact name of the WAR file? Which URL, exactly, are you trying to access?


Ping & DNS - my free Android networking tools app
K. Gil
Ranch Hand

Joined: Apr 29, 2011
Posts: 75

as far as I can see, with step (5) from documentation you linked, you have to put these dependiences (libs) to your tomcat's lib directory, not as you mentioned:
> 2) I copied all the libraries from the JAX-WS lib folder into /WEB-INF/lib folder
As that's global libraries that have to be available and deployed before tomcat will try to start your application, so WEB-INF/lib is way too late for these.
and that's probably why you're getting 404 for this app, application simply can't be started due to missing dependiences.
ratna sargurp
Ranch Hand

Joined: Jan 12, 2010
Posts: 32
Thank you for your replies. I did copy the jar files into the tomcat/common/lib folder. It did not help.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42266
    
  64
So what are the answers to the questions I asked? And another question: Are there any error messages in the Tomcat log files?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16137
    
  21

One thing that is not going to help is that Tomcat 5.0 is extremely old and no longer supported. If you are trying to mix a recent copy of JAX-WS with Tomcat 5, I cannot predict what the results would be.


Customer surveys are for companies who didn't pay proper attention to begin with.
ratna sargurp
Ranch Hand

Joined: Jan 12, 2010
Posts: 32
The WAR file is called JAXWS-Tmcat-HelloWorld.WAR.

The error message from the log files is:

2013-01-23 09:40:22 StandardContext[/JAXWS-Tmcat-HelloWorld]Error configuring application listener of class com.sun.xml.ws.transport.http.servlet.WSServletContextListener
java.lang.UnsupportedClassVersionError: com/sun/xml/ws/transport/http/servlet/WSServletContextListener (Unsupported major.minor version 50.0)

I have included the jar files from JAX-WS version 2.2 lib folder in the /WEB-INF/lib folder.

Is Tomcat 6 better or 7 to run with JAX-WS? Also, I read somewhere that JAX-WS 2.2 is buggy. I know this question is not relevant in this forum, but if whic version of JAX-WS is better to download?
K. Gil
Ranch Hand

Joined: Apr 29, 2011
Posts: 75

> (Unsupported major.minor version 50.0)

Here you go. incompatible java version.
Probably everything was compiled with 1.7
I would suggest to try Tomcat 7 with JDK 1.7

and as mentioned before, Tomcat 5.0 is pretty old, not supported since a long, long time. There's absolutely no reason to use 5.0 in first place, 5.5 is pretty much 100% compatible but brings a lot of improvements. 5.5 is still old anyway. If you don't have any specific requirements to use old version of tomcat, then you should definitely go with 7.0

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42266
    
  64
> (Unsupported major.minor version 50.0)

Probably everything was compiled with 1.7


Version 50.0 is what's used by Java 6. It sounds if you're using a Java 5 JRE to run this - start by upgrading to Java 6 (at least), Java 5 is way obsolete.

Also, I read somewhere that JAX-WS 2.2 is buggy. I know this question is not relevant in this forum, but if whic version of JAX-WS is better to download?

Unless that is from a very substantive source, I would dismiss that as hearsay. JAX-WS is stable; just download the latest version and you should be fine.
ratna sargurp
Ranch Hand

Joined: Jan 12, 2010
Posts: 32
I installed Tomcat 7 and it worked beautifully!

Thanks everyone for all your help!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: deploying JAX-WS webservice on tomcat 5.0 gives 404 error