Derek,
Glad to see the problem was easily solved. Regarding setting the Threads
ContextClassLoader - I've already done that in the latest CVS. I needed to do it
because of
the way the SAX factory finds a parser implementation.
However, I will look at adding only .jar files - I guess I thought I did that, but
guess I overlooked
it. I would like to see your changes regarding log4j and correct initialization when
/bin is not
the working directory.
-Mike
On 10 Jul 2002 at 22:52, Derek Baum wrote:
> Mike,
>
> Thanks for the info - I hadn't realised that the vizualisers would
> actually create the file!
>
> I've looked further into the NoClassDefFoundException that I was
> getting, and it's my fault :-( I'm using a newer version of log4j, so I
> renamed the existing jars with suffix .XXX and dropped in the new jar.
> However, the 1.7.1 NewDriver.java puts everything in the lib and lib/ext
> directories onto the CLASSPATH, regardless of its extension. The result
> is that I had two different copies of the log4j jar and this caused the
> above exception.
>
> Now that I've fixed that, my test starts to run, but gets a
> ClassCastException in the depths of Jini. This is because RMI is failing
> to load a class using the threads ContextClassLoader, and so it is
> unnecesssarily downloading the class across the net using its own
> ClassLoader. The solution is to set the ContextClassLoader in
> NewDriver.java:
>
> Thread.currentThread().setContextClassLoader(loader);
>
> If this is not done, the ContextClassLoader remains set to the
> ClassLoader that loaded NewDriver.class - which is ApacheJMeter.jar
> which only contains this class! and so you can expect other errors of
> this kind when tests involve RMI or their own custom class loaders.
>
> If you're interested, I can send a diff of NewDriver.java that fixes
> this and log4j initialisation and also allows correct initialisation
> when the working directory is not jakarta-jmeter/bin.
>
> //derek
>
> >
> >Regarding log4j - thanks for the info. Personally, I don't know much about
> >log4j and have no motivation to do so. But I will try your suggestions.
> >The reason I put that there is because it wasn't working anyway, so I
> >thought I'd try setting it explicitly. When that didn't work, I gave up and
> >worked on other things.
> >
> >You mention running your extensions under 1.7.1 - so you converted to the
> >new architecture? What was the class it couldn't find?
> >
> >
>
>
>
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star Internet. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> ________________________________________________________________________
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
--
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]>