Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 81853 invoked from network); 10 Jan 2002 18:20:16 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 10 Jan 2002 18:20:16 -0000 Received: (qmail 29511 invoked by uid 97); 10 Jan 2002 18:19:53 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 29475 invoked by uid 97); 10 Jan 2002 18:19:52 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 29463 invoked from network); 10 Jan 2002 18:19:52 -0000 From: "Pelle Poluha" To: Subject: Loading classes dynamically fails Date: Thu, 10 Jan 2002 19:21:33 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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: For additional commands: Troubles with the list: