apache problem

Hello All,

When i submit the HTML file (to connection/SetConnection) I get an exception report from apache

my context path is: connection

project: connection

package: connection

I have included the report below and my web.xml file, i am using NetBeans IDE to deploy

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 connection.SetConnection

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:856)

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)

org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

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(Thread.java:619)

root cause

java.lang.IllegalAccessException: Class org.apache.catalina.core.StandardWrapper can not access a member of class connection.SetConnection with modifiers ""

sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)

java.lang.Class.newInstance0(Class.java:349)

java.lang.Class.newInstance(Class.java:308)

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:856)

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)

org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

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(Thread.java:619)

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

<?xml version="1.0" encoding="UTF-8"?>

<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

<servlet>

<servlet-name>SetConnection</servlet-name>

<servlet-class>connection.SetConnection</servlet-class>

</servlet>

<servlet-mapping>

<servlet-name>SetConnection</servlet-name>

<url-pattern>/SetConnection</url-pattern>

</servlet-mapping>

<session-config>

<session-timeout>

30

</session-timeout>

</session-config>

<welcome-file-list>

<welcome-file>

index.jsp

</welcome-file>

</welcome-file-list>

</web-app>

My class name is SetConnection and the file name is SetConnection.java

Thnx very much

Message was edited by:

paulchwd

[3480 byte] By [paulchwda] at [2007-11-27 10:01:02]
# 1

From the javaDocs for IllegalAccessException:

"An IllegalAccessException is thrown when an application tries to reflectively create an instance (other than an array), set or get a field, or invoke a method, but the currently executing method does not have access to the definition of the specified class, field, method or constructor."

So my guess is that you did not properly extend the HttpServlet class wjhen you created the SetConnection class. Please post the source code for SetConnection so it can be verified.

tolmanka at 2007-7-13 0:33:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...