tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pelle Poluha" <pol...@email.com>
Subject Loading classes dynamically fails
Date Thu, 10 Jan 2002 18:21:33 GMT
Hello!

I have an applet which sends an object to a servlet through serialization.
In the servlet, the object is executed and the result sent back to the
applet. Sounds simple enough. What's complicating things is that the
object's class is not known at design time and is loaded dynamically by the
applet. So the servlet must load the class at run time too. And here it
fails. When reading the object in the servlet, I get a
ClassNotFoundException. I've put the necessary jars in the web-inf/lib of
the application but it seems Tomcat 4 (4.0.1 on WinNT) doesn't recognize
these.

If I put the jar in $JAVA_HOME/jre/lib/ext (which I don't like doing) it
works. Almost. I don't get a ClassNotFoundException for the de-serialized
class(es). But when executing this object (which basically contains a
command name and its parameters) the servlet needs some XML classes. And I
can't put the jar containing these in $JAVA_HOME/jre/lib/ext as this will
create a conflict with Tomcat's XML classes (it won't even start). And there
I'm stuck.

What am I doing wrong here? I'm using only standard classes and those
contained in the jars in web-inf/lib.

Please advice!

Regards,
Pelle Poluha




--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message