Hi list,
I'm having a very odd problem with tomcat 3.3.1 on windows today,
suddenly, and for no apparent reason, tomcat's classloader is having
problems accessing (public) methods in any of my beans. All the code I'm
working on has been running fine for over a month.
here's the stacktrace:
javax.servlet.ServletException: Cannot create bean of class DbUtilities
at index_10._jspService(index_10.java:80)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at
org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:536)
Root cause:
java.lang.ClassNotFoundException: class DbUtilities :
java.lang.IllegalAccessException: Class java.beans.Beans can not access a
member of class DbUtilities with modifiers "public"
at java.beans.Beans.instantiate(Beans.java:208)
at java.beans.Beans.instantiate(Beans.java:48)
at index_10._jspService(index_10.java:78)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at
org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:536)
In this instance the bean in question is DBUtilities, but I get the same
result for all other beans in any of the web apps I'm running.
I found this on sun's site regarding the IllegalAccessException:
Thrown when an application tries to load in a class through its string name
using:
The forName method in class Class.
The findSystemClass method in class ClassLoader.
The loadClass method in class ClassLoader.
but the currently executing method does not have access to the definition of
the specified class, because the class is not public and in another package.
None of these cases are relevant, especially since up until an hour ago teh
code had been running fine, and the ClassLoader was fiding my beans without
any problems.
The directory in which the beans are stored (mywebapp\web-inf\classes) is in
my classpath, hte beans arn't packaged (this is tomcat 3x). The class in
question is imported into a jsp via a jsp:Usebean tag. As I said, this is
now happenning with all my beans in all my webapps. All have the correct
public no-argument consrtuctors. I havn't changed anything in my tomcat
config. Previously the code was running fine.
Posts regarding this Exception in the archive seem to be mainly package or
JNDI related, not the case here.
Any ideas anyone?
thanks,
Paul
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>