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 Internal Servlet Error (Error: 500) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Internal Servlet Error (Error: 500)" Watch "Internal Servlet Error (Error: 500)" New topic
Author

Internal Servlet Error (Error: 500)

GeofferyR Durham
Greenhorn

Joined: Oct 17, 2003
Posts: 15
Hi,
I'm using linux. I'm new to using tomcat and apache soap. I get this warning when starting up tomcat;

2003-10-17 17:08:08 - SimpleMapper1: WARNING: Correcting error in web.xml for context "/axis". Mapping for path "servlet/AxisServlet" is missing a leading '/'.
2003-10-17 17:08:08 - SimpleMapper1: WARNING: Correcting error in web.xml for context "/axis". Mapping for path "servlet/AdminServlet" is missing a leading '/'.
EmbededTomcat: Init time 953

More importantly I also get this error when I type in this url http://localhost:8080/axis/HelloWorldService.jws?wsdl
The page displays alright when I type the url in without "?wsdl". Could any one tell me how to solve the problem?
Fault - AxisFault
faultCode: http://xml.apache.org/axis/:Server.generalException
faultString: java.io.FileNotFoundException: /var/tomcat/webapps/axis/HelloWorldService.jws (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:106)
at java.io.FileInputStream.(FileInputStream.java:66)
at java.io.FileReader.(FileReader.java:41)
at org.apache.axis.handlers.JWSProcessor.invokeImpl(JWSProcessor.java:145)
at org.apache.axis.handlers.JWSProcessor.generateWSDL(JWSProcessor.java:241)
at org.apache.axis.SimpleTargetedChain.generateWSDL(SimpleTargetedChain.java:131)
at org.apache.axis.server.AxisServer.generateWSDL(AxisServer.java:411)
at org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:163)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:534)
faultActor: null
faultDetails: null
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
Looks to me like the first error is Tomcat telling you there may be a problem with your web.xml and the second error may be a consequence of that.
Bill
GeofferyR Durham
Greenhorn

Joined: Oct 17, 2003
Posts: 15
Could anybody tell me where the correct web.xml file is located. There is more than one;
tomcat/webapps/Root/doc/appdev/sample/etc
tomcat/webapps/Root/WEB-INF
tomcat/webapps/admin/WEB-INF
tomcat/webapps/examples/WEB-INF
Do you need to install Axis and soap so that there is an enviroment variable that holds the path of each directory?
GeofferyR Durham
Greenhorn

Joined: Oct 17, 2003
Posts: 15
Fixed the problem with the web.xml file. Thanks Bill. Still wondering about whether an environment variable needs to be declared; setting the path to the axis folder.
GeofferyR Durham
Greenhorn

Joined: Oct 17, 2003
Posts: 15
Ok, it looks like the errors are being generated by a problem encountered with the http protocol.
This is a message displayed at the end of a whole lot of java generated error code:
Axis HTTP Servlet
Hi, you've reached the Axis HTTP servlet.Normally you would be hitting this URL with a SOAP client rather than a browser.
In case you're interested, my Axis transport name appears to be 'http'
What is trying to be said when they say this "In case you're interested, my Axis transport name appears to be 'http'". Do I need to change configuration settings in order for soap to be used?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
I have not installed AXIS recently, but it sounds to me like that is normal. SOAP transport with HTTP is what you want. Tomcat 4 ignores CLASSPATH and expects to find library files in a few standard places. Unless the AXIS docs say something different, the only environment variables you need would be JAVA_HOME and CATALINA_HOME. Getting to the Axis HTTP servlet with a browser is a good sign.
Bill
GeofferyR Durham
Greenhorn

Joined: Oct 17, 2003
Posts: 15
Hi Bill,
Thanks for the reply. I gather from what you've said everything is in working order. I'm interested to know what other environments you can use AXIS in other than using http.
It still bothers me that I can't get this url:
http://localhost:8080/axis/HelloWorldService.jws?wsdl
to work, opposed to this url:
http://localhost:8080/axis/HelloWorldService.jws
which does work. Basically this whole exercise is from an example in a book. The code has been written and displays properly using the latter url. The url with "?wsdl" is supposed to display the full WSDL document for a simple java Web Service in a browser. Could the generated error just be an HTTP generated error which means that AXIS is running fine? Of course I'm also working on a Linux based machine and the books example is run in a Windows environment. Where the default browsers respectively would have been Mozilla and IE
[ October 20, 2003: Message edited by: GeofferyR Durham ]
[ October 20, 2003: Message edited by: GeofferyR Durham ]
GeofferyR Durham
Greenhorn

Joined: Oct 17, 2003
Posts: 15
Got everything working. Thanks Bill. Problem with the classpath having to include reference to tool.jar in the jdk directory with tomcat.jar. If you can make sense of that. Thanks again. Cheers.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
With respect to other environments, remember that SOAP is just about passing XML formatted text messages. The fact that most examples use HTTP is due to examples oriented to public web services.
In my SOAP book I demonstrated using the classes in the Apache SOAP library to handle email, Java Message Service and JavaSpaces message passing so I imagine you could do the same with Apache AXIS if you dig around in the source code.
Bill
 
 
subject: Internal Servlet Error (Error: 500)