I'm using Eclipse 2.0 with JDK1.4.0_01 on Windows 2000.  I think the difference is I'm 
using the "Java protocol".  I'm trying to find classes in jar files in the lib/ext 
folder.

The current ClassFinder seems to work fine for org.apache.jmeter classes.  It could 
"see" the classes in the lib/ext/*.jar's because it created the list of classes for 
the subclass check.  However, it couldn't load the classes to do the subclass check. 

I have a similar problem in JavaSampler.createJavaclient().  I use the 
Class.forName(classname) to load the selected class for Java protocol.  I had to 
change to use the 
Class.forName(classname, boolean, classloader) method.  (I'll submit this fix as a 
bugzilla report after I do more testing.)

I don't know enough about ClassLoaders to know if this is correct.  I just followed 
the pattern in NewDriver where it creates an URLClassLoader and sets it as the 
ContextClassLoader for the thread.

-----Original Message-----
From: Mike Stover 
Sent: Wednesday, July 17, 2002 5:30 PM
To: Kiewel, Brad; JMeter Developers List
Subject: Re: Class loader for ClassFinder


That's interesting - it might be more correct than what's there currently.  I don't 
have any such problem, so I'm wondering what your setup is?  JDK version?  OS?

-Mike

On 17 Jul 2002 at 15:56, Kiewel, Brad wrote:

> I had a problem in ClassFinder not being able to find classes for subclass checks.  
>ClassFinder could find the classes to put them in the list of all classes, but then 
>couldn't load the classes to do the subclass check.
> 
> I changed any use of Class.forName from:
> 
> c =  Class.forName(strClassName);
> 
> to:
> 
> c =  
>Class.forName(strClassName,false,Thread.currentThread().getContextClassLoader());
> 
> This should use the classloader set at start up, and it does not initialize any new 
>classes.
> 
> Is this fix correct?  The updated ClassFinder.java is attached.
> 
> (I added debug statements to the ignored exceptions, also)
> 
> Brad Kiewel
> Fiserv Advanced Insurance Solutions
> 4200 University, Suite 400
> West Des Moines, IA 50266
> 
> [EMAIL PROTECTED]
> 515.267.6527
> 



--
Michael Stover
[EMAIL PROTECTED]
Yahoo IM: mstover_ya
ICQ: 152975688

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to