axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wade Chandler <hwadechandler-apa...@yahoo.com>
Subject Re: Query Regarding running custom servlet on axis
Date Sat, 17 Dec 2005 16:18:48 GMT
--- anshuk pal chaudhuri <anshuk_p@yahoo.com> wrote:

> Hi,
> 
> I have a doubt.
> I am using axis 1.2 on Tomcat 5.0.28
> 
> 
> I have made my own custom servlet and put that
> inside
> the classes folder of axis.So I have also changed
> the
> web.xml file accordingly.
> I am just trying to print something inside ths
> servlet.Thats it.
> I am trying to run that servlet at 
> 
> http://localhost:8080/axis/servlet/MyServlet
> 
> Now I am getting error 
> exception 
> 
> exception 
> javax.servlet.ServletException: Error allocating a
> servlet instance
> 
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
> 
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> 
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
> 
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
> 
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
> 
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
> 	java.lang.Thread.run(Thread.java:534)
> 
> root cause 
> java.lang.UnsupportedClassVersionError: MyServlet
> Unsupported major.minor version 49.0)
> java.lang.ClassLoader.defineClass0(Native Method)
> 
>
java.lang.ClassLoader.defineClass(ClassLoader.java:537)
> 
>
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
> 
>
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634)
> 
>
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860)
> 
>
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)
> 
>
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
> 
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
> 
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> 
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
> 
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
> 
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
> 
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
> 	java.lang.Thread.run(Thread.java:534)
> 
> 
> So my doubt is whether it is possible to run my
> custom
> servlet on axis or not?Or do I need to put any extra
> jars?
> 
> Please let me know..
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 

This has to do with the fact that you compiled this
servlet using a 1.5 VM and the target VM is 1.4.2 or
some other 1.4 version.  I wouldn't imagine a 1.3 is
your target (I think that version of Tomcat requires
1.4+..may be wrong).  Anyways, to fix it you need to
compile your servlet with the switches -version 1.4
-target 1.4 added to your javac calls (or which ever
version of the VM is the target...the VM version
Tomcat is running inside).  If you are using an IDE
then you'll have to figure out how to make the IDE
pass switches to the VM to cause this to happen.  In
Netbeans (4.1+) you would change you project source to
1.4 instead of 1.5..might have to change your
project.properties file to use javac.target=1.4
javac.source=1.4

Wade

Mime
View raw message