Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 54739 invoked from network); 2 Jun 2005 16:42:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Jun 2005 16:42:34 -0000 Received: (qmail 86211 invoked by uid 500); 2 Jun 2005 16:42:17 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 86184 invoked by uid 500); 2 Jun 2005 16:42:17 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: 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 86168 invoked by uid 99); 2 Jun 2005 16:42:17 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from net1xans.agns.fr (HELO net1xans.agns.fr) (195.75.30.70) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 02 Jun 2005 09:42:16 -0700 Received: from FRCLIM03.fr.nexans.com (frclim03.fr.nexans.com [159.217.82.54]) by net1xans.agns.fr (8.11.6/8.11.6) with ESMTP id j52GftP31576 for ; Thu, 2 Jun 2005 18:41:57 +0200 Subject: SOLUTION : =?iso-8859-1?Q?R=E9f=2E_=3A_R=E9f=2E_=3A_Re=3A_R=E9f=2E_=3A_Re=3A_?= =?us-ascii?Q?ClassNotFoundException?= in thread To: tomcat-user@jakarta.apache.org X-Mailer: Lotus Notes Release 5.07a May 14, 2001 Message-ID: From: Cyril.ZEKSER@nexans.com Date: Thu, 2 Jun 2005 18:42:00 +0200 X-MIMETrack: Serialize by Router on FRCLIM03/SRV/NEXANS(Release 5.0.11 |July 24, 2002) at 02/06/2005 18:41:57 MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: quoted-printable X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Yeepeh !!! I've found the solution : All I needed to do was changing the loading of the class by : Object jobClass =3D this.getClass().getClassLoader().loadClass( getClassName() ).newInstance(); //Object jobClass =3D Class.forName( getClassName() ).newInstance= (); I guess the OS and the JVM behave differently from HP-UX to Linux, now = the class is found in the Thread. I don't know why the previous code was working in the previous platform... If there is a better wy to write this, please tell me :) Hope this help others people... = =20 Cyril ZEKSER = =20 Pour : "Tomcat Users L= ist" =20 02/06/2005 17:02 cc : = =20 Objet : R=E9f. : Re: R=E9= f. : Re: ClassNotFoundException in thread(Document link: Cyril =20 ZEKSER) = =20 = =20 Thanks for your answer but : > is there a static initialisation code in > com.nexans.statistic.client.model.send.intranet.handler.CreateFileProce= dure > ? or static properties whose values are taken from other methods? > If anything in the static initialisation of class > com.nexans.statistic.client.model.send.intranet.handler.CreateFileProce= dure > throws an Exception, the class wil be considered as non-existent. (wh= ich is > quite normal, sometinh that could not be create does not exist) In fact, there is one static property : private static Logger myLog =3D Logger.getLogger( CreateFileProcedure= .class ); but, as you mentionned in another mail, the Log4j.jar is not in common.= this jar is in WEB-INF/lib (i've double checked ... kindda paranoid no= ? :-) The line that crashed is the following : Object jobClass =3D Class.forName( getClassName() ).newInstance()= ; where getClassName() returns "com.nexans.statistic.client.model.send.intranet.handler.CreateFileProc= edure" The problem is when the Thread try to find the class, because a test JS= P can execute this without Exception. What are the possible changes betw= een the two platforms mentioned regarding threads ? (RHAS4 with JDK 1.4.2= and HP-UX11 with JDK 1.4.1). Java has enough memory, and is started in -server mode with -Xmx512m option. Both config files (from both platform) are identical - except = of course the directories. I've though also of a ISO-xxx encoding instead of UTF-8 that could caus= e the problem, but not... This code is a year old, and was working fine in the old platform - tha= t crashed unfortunately... so I had to migrate. Copying the JAR seems not= enough to work properly. Any other idea for me to explore ? = --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org