tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ademar <ade...@oneonline.it>
Subject ClassNotFoundException in tomcat
Date Sat, 01 Jul 2006 12:14:12 GMT

Hi, Why in tomcat this code launch a ClassNotFoundException ?
     byte[] serialized= rs.getBytes("test");

   ObjectInputStream in = new ObjectInputStream( new ByteArrayInputStream(
serialized ) );

             testbean = (TestBean) in.readObject();
The bold line launch the exception and the class is TestBean. The same code
in a application standard works well.
I develop with NetBeans 5.0,JDK 1.5 update 7, MySql 5.0 using JDBC.
S.O =Windows XP,Server Tomcat last version.

This is a error launched from tomcat:

exception

javax.servlet.ServletException: TestBean

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
	org.apache.jsp.elencatest_jsp._jspService(elencatest_jsp.java:95)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)

root cause

java.lang.ClassNotFoundException: TestBean

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1332)

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
	java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
	java.lang.Class.forName0(Native Method)
	java.lang.Class.forName(Class.java:242)
	java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:584)
	java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1543)
	java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1465)
	java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1698)
	java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1304)
	java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
	TestManagement.TestStorage.TestDB.getTest(TestDB.java:42)
	TestManagement.TestStorage.TestStorage.getTestById(TestStorage.java:25)
	org.apache.jsp.elencatest_jsp._jspService(elencatest_jsp.java:68)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)

-- 
View this message in context: http://www.nabble.com/ClassNotFoundException-in-tomcat-tf1877084.html#a5131892
Sent from the Tomcat - User forum at Nabble.com.


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


Mime
View raw message