File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Http 500 error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Http 500 error" Watch "Http 500 error" New topic
Author

Http 500 error

meenakshi ahuja
Greenhorn

Joined: Sep 01, 2008
Posts: 1
Hello All
could anyone help me out.
whenever i am trying to run my tomcat server to invoke a servlet,it always displays this error

HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Error instantiating servlet class MyServlet
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Unknown Source)


root cause

java.lang.IllegalAccessException: Class org.apache.catalina.core.StandardWrapper can not access a member of class MyServlet with modifiers ""
sun.reflect.Reflection.ensureMemberAccess(Unknown Source)
java.lang.Class.newInstance0(Unknown Source)
java.lang.Class.newInstance(Unknown Source)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Unknown Source)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.7 logs.


--------------------------------------------------------------------------------

Apache Tomcat/5.5.7
if anyone knows the solution of this please mail me the answer on meenakshi.ahuja02@gmail.com
Bupjae Lee
Ranch Hand

Joined: May 14, 2007
Posts: 107
I think your servlet class or one of its member has wrong access modifier.

I'm not sure what is wrong without viewing your code,
but I think your servlet class and/or its member(s) have package-private (=default) access,
and container is complaining about that.
[ September 02, 2008: Message edited by: Bupjae Lee ]
Nishanth Sivaraman
Greenhorn

Joined: Aug 12, 2008
Posts: 7
check all required class files available and having proper access modifiers
Narendra shah
Ranch Hand

Joined: Feb 28, 2007
Posts: 51
Hi Dear,

From stack trace i can say that your MyServlet servlet have access modifier problem. Please check any default method access modifier, they all need to be public.


Narendra Shah -- SCJP 5
Vivek Kr Agrawal
Ranch Hand

Joined: Sep 08, 2012
Posts: 51

Hello All,
I had a similar problem but the reason which I found out was quite different.I work on the same project from two different locations one from home and other from office through different systems.I am using Eclipse as IDE on both locations. I exported my servlets and jsp from office to home. Then I changed Server Settings(Apache 7) and my servlets were running fine. But when I created a new servlet it failed to instantiate. It was showing the same error code and message as your problem suggests. It took me some time to solve the problem by hit and trial method by when I excluded the earlier version and location of Apache ( Jar file from Java Build Path-Library in Eclipse) the problem solved for me miraculously. I wish it can be useful for you only if you are having same problem scenario.

Thanks
Vivek Agrawal
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Http 500 error
 
Similar Threads
Error in Tomcat
Resource element in Tomcat 5.5 -- help needed
ServletException
Problem in Connecting to database
preparedstatement throws sqlexception