You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Sriram Narayanan <sr...@yahoo.com> on 2001/11/02 14:37:03 UTC

Classes in webapps not loaded udring deserialization of objects

Hi,

I'm developing this web based application that makes use of several serializable objects, all of a particular Serializable class.

I've kept this class along with other classes in the application's web-inf/classes folder.
During the workflow of the application, I have to store and retrieve the objects from the database.

I am able to serialize my Objects to the database, but when I try to read back the Objects, I get a ClassNotFoundException.

I also tried to store the Objects to a file, and then read them back, and faced the same problem.

I've solved (?) this by placing a copy of the class in the tomcat/classes folder.

My question is, is there any way to make my app's seriazable classes visible, without having to place them in the tomcat/classes folder ?

Here's my configuration:

Windows NT 4.0 SP6
Tomcat 3.2.3
Sun's JDK 1.3
MySQL/NT 3.23.39
MySQL JDBC driver mm.mysql-2.0.4-bin.jar

Here is the starting part of the stackTrace that I get
--- begin ---
java.sql.SQLException: Class not found: java.lang.ClassNotFoundException: com.objectedge.applicationauthorization.core.ApplicationAuthorizationKeyImpl while 
reading serialized object
	at org.gjt.mm.mysql.ResultSet.getObject(ResultSet.java:1146)
	at com.objectedge.applicationauthorization.core.ApplicationAuthorization.applicationKeyFrom(ApplicationAuthorization.java)
	at com.objectedge.applicationauthorization.core.ApplicationAuthorization.populateKeys(ApplicationAuthorization.java)
	(more app specific stuff here...)
--- end ---

I've just got my hands on the tomcat documentation, and would like pointers to other sources of information on Classloading.

Thanks

Sriram


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>