Discussion:
javax.servlet.ServletException: Cannot allocate servlet instance for path /servlet/HelloWorld
Fabbris Pierluigi
2007-08-02 16:39:56 UTC
Permalink
Hi,
I've a problem with test of Servlet. I created a Hello World Severlet in the directory classes on Tomcat. I've try with: http://localhost:8080/servlet/Helloworld, but I've this Excpetion:

javax.servlet.ServletException: Cannot allocate servlet instance for path /servlet/HelloWorld
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:380)
org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:134)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

*root cause*

java.lang.IllegalAccessException: Class org.apache.catalina.core.StandardWrapper can not access a member of class HelloWorld with modifiers ""
sun.reflect.Reflection.ensureMemberAccess(Unknown Source)
java.lang.Class.newInstance0(Unknown Source)
java.lang.Class.newInstance(Unknown Source)
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:361)
org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:134)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


Why? And how I remove this problem?
Tanks for the help that you give me.
Sincerally yours,
Fabbris Pierluigi


---------------------------------------------------------------------
To start a new topic, e-mail: ***@tomcat.apache.org
To unsubscribe, e-mail: users-***@tomcat.apache.org
For additional commands, e-mail: users-***@tomcat.apache.org
Caldarale, Charles R
2007-08-02 18:06:01 UTC
Permalink
Subject: javax.servlet.ServletException: Cannot allocate
servlet instancefor path /servlet/HelloWorld
java.lang.IllegalAccessException: Class
org.apache.catalina.core.StandardWrapper can not access a
member of class HelloWorld with modifiers ""
You've likely not used the public modifier on your doGet(), etc.,
methods.

If that's not the case, post your servlet code to the list.

- Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: ***@tomcat.apache.org
To unsubscribe, e-mail: users-***@tomcat.apache.org
For additional commands, e-mail: users-***@tomcat.apache.org

Loading...