Bugs item #951248, was opened at 2004-05-10 13:38
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=951248&group_id=22866

Category: JBossMX
Group: v3.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Fabiano C. de Oliveira (fabcipriano)
Assigned to: Nobody/Anonymous (nobody)
Summary: UnifiedClassLoader problem with Class.forName()

Initial Comment:
Running in a :
Windows NT sp 6a
Sun JDK 1.4.2_04
JBoss 3.2.3

We have done a connector package it in a rar file, and
a EJB jar file that use this connector package it in a
jar file.

When JBoss start for the first time We deploy the RAR
and after this the JAR EJB. At this moment all is ok.
The problem happen when we redeploy the RAR and the EJB
bean after this. So we receive a ClassCastException
when we try use the getConection() in the EJB code.

After search for the problem in the end we have
discover that when the connector use Class.forName() to
instance our Connection class it use a previous old
UnifiedClassLoader, because this we receive a
ClassCastException. But when we use a
Thread.currentThread().getContextClassLoader().loadClass()
to load the Connector class all works fine after
redeploy !!!

To simulate this problem we have attached two files. A
foo.jar that have a simple example.Foo class and a
BeanShell that load the example.Foo using
Class.forName() each 10 secunds. To reproduce the problem:
1. deploy foo.jar
2. deploy the beanshell
3. undeploy the foo.jar
4. wait 15 secunds
5. we receive a message log from the bean shell saying
that it have found the Foo class !!! But the correct
should be a ClassNotFound Exception !!!

Is ClassLoader.loadClass is used all works fine. This
is a JBoss or Java VM bug ?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=951248&group_id=22866


-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to 
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to