File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do i correct this error

 
shelly sharma
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am learning to devlop a web service using axis and tomcat4.0 . I had done all the settings but when i tried to run happyaxis.jsp which comes with axis like as instructions given in axis documentation i get the following error. Can anybody help me for correcting this error.
Apache Tomcat/4.0.6 - HTTP Status 500 - Internal Server Error
--------------------------------------------------------------------------------
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: javax/xml/soap/SOAPException
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471)
at org.apache.jsp.happyaxis$jsp._jspService(happyaxis$jsp.java:391)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:484)

root cause
java.lang.NoClassDefFoundError: javax/xml/soap/SOAPException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at org.apache.jsp.happyaxis$jsp.classExists(happyaxis$jsp.java:44)
at org.apache.jsp.happyaxis$jsp.probeClass(happyaxis$jsp.java:87)
at org.apache.jsp.happyaxis$jsp.needClass(happyaxis$jsp.java:147)
at org.apache.jsp.happyaxis$jsp._jspService(happyaxis$jsp.java:272)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:484)
--------------------------------------------------------------------------------
 
shelly sharma
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also want to say that after starting tomcat i am able to get the axis home page by typing the url http://localhost:8080/axis/index.html. But when i click on administer axis i get the following error. How can i correct this:"
Apache Tomcat/4.0.6 - HTTP Status 404 - /axis/servlet/AdminServlet
--------------------------------------------------------------------------------
type Status report
message /axis/servlet/AdminServlet
description The requested resource (/axis/servlet/AdminServlet) is not available.
--------------------------------------------------------------------------------
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Two suggestions!..
check wherther you have all the lib in your webcontext that provided by axis.
if not download the axis package again and reinstall it.
 
shelly sharma
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, i have all the libraries provided by axis but still the above error is coming that the requested resource is not available. I had also set all the classpaths and the axis home page is coming. What should i do now. Should i reinstall axis.
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shelly,
Two questions here, then I'll try 2 answers, even if I've never installed Axis on Tomcat.
Question 1: Server 500
java.lang.NoClassDefFoundError: javax/xml/soap/SOAPException
Even if you think you've got all the libs needed in your classpath, Tomcat seems to disagree on that point. The SOAPException can't be loaded. Double check you've got the saaj.jar in your webapp classpath

Question 2 : http 404
axis/servlet/AdminServlet
I don't really understand why a web app from Axis could be broken but...
My understanding is hat in your web.xml, you should have a servlet mapping like :

Do you have it in your DD ?
Can the reference to the appropriate servlet be resolved when the Web App is loaded ??
My 2 cents.
[ November 05, 2003: Message edited by: Jean-Louis Marechaux ]
 
shelly sharma
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jean,
Thanks for your reply.The answer to your both questions is that:
1) saaj.jar is there in the classpath.
2) In the web.xml, the servlet mapping for admin servlet is not there.

What should i do? Should I manually put the Adminservlet mapping in the web.xml file?
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by shelly sharma:
Hi Jean,
Thanks for your reply.The answer to your both questions is that:
What should i do? Should I manually put the Adminservlet mapping in the web.xml file?

Yes you can, below is the complete web.xml of axis1.1(final public version), use this conf. and see whether its works.
 
shelly sharma
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Balaji
I modified the web.xml file but nothing happens.Also i wanted to know that
i compiled a client code.It is compiled well.But when i run that client code then a error is coming:

INFO: Mapping Exception to AxisFault
AxisFault
faultCode: {http://xml.apache.org/axis/}Server.userException
faultString: org.xml.sax.SAXParseException: Content is not allowed in prolog.
faultActor: null
faultDetail:
stackTrace: org.xml.sax.SAXParseException: Content is not allowed in pro
log.
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContextImpl.parse(Deserializa
tionContextImpl.java:213)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:457)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:362)
at org.apache.axis.client.Call.invokeEngine(Call.java:2046)
at org.apache.axis.client.Call.invoke(Call.java:2016)
at org.apache.axis.client.Call.invoke(Call.java:1786)
at org.apache.axis.client.Call.invoke(Call.java:1711)
at org.apache.axis.client.Call.invoke(Call.java:1251)
at HelloWorldClient.main(HelloWorldClient.java:33)

org.xml.sax.SAXParseException: Content is not allowed in prolog.
at org.apache.axis.AxisFault.makeFault(AxisFault.java:117)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:462)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:362)
at org.apache.axis.client.Call.invokeEngine(Call.java:2046)
at org.apache.axis.client.Call.invoke(Call.java:2016)
at org.apache.axis.client.Call.invoke(Call.java:1786)
at org.apache.axis.client.Call.invoke(Call.java:1711)
at org.apache.axis.client.Call.invoke(Call.java:1251)
at HelloWorldClient.main(HelloWorldClient.java:33)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContextImpl.parse(Deserializa
tionContextImpl.java:213)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:457)
... 7 more
Caught an exception: org.xml.sax.SAXParseException: Content is not allowed in pr
olog.
How can i correct this error
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by shelly sharma:
Hi Balaji
Caught an exception: org.xml.sax.SAXParseException: Content is not allowed in prolog.
How can i correct this error

If i'm right, then this problem has something to do with parsers, check whether you have the latest verion of xalan jar and Xerces on your webcontext or lib folder.
After modifying the web.xml, is your Adminservlet & happyaxis.jar working fine.
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shelly.
Let's go first with the HTTP 404 error (AdminServlet).
Well, if you have miodified the web.xml exactly as Balaji told you, then the Axis Admin won't work because the servlet mapping is commented

Remove <!-- and --> from the web.xml, restart the web app, and retest it. It should work.

Please, do not post so many questions in the same thread. It's harder to help you.
So if you create a new question for each problem, with a title indicating the nature of the problem. First of all, it will help to focus on a specific issue, and then it will be easier for the JRanchers to find relevant information when they are facing the same kind of problem.
Thanks
[ November 06, 2003: Message edited by: Jean-Louis Marechaux ]
 
shelly sharma
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Happyaxis.jsp is working, but admin servlet is not working, even after removing the commenting <!-- and -->.
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by shelly sharma:
Happyaxis.jsp is working, but admin servlet is not working, even after removing the commenting <!-- and -->.

Do you still have the HTTP 404 once the comments had been remove, or is the error a bit different ??
(any log ?)
 
shelly sharma
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I still have the same error HTTP 404.
 
li tian
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this web.xml is in axis/WEB-INF , can i change the web.xml in my project as it?
 
li tian
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am in the same trouble , this web.xml is in axis/WEB-INF , can i change the web.xml in my project as it?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic