jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "BAZLEY, Sebastian" <>
Subject RE: Getting started -- classloading errors / confusion
Date Mon, 13 Oct 2003 15:31:10 GMT
I noticed yesterday that the docs say JMeter uses log4j - but in fact it
doesn't, it uses Avalon logkit as you've noticed ... [documentation bug!]

You need to use:

  transient private static Logger log = LoggingManager.getLoggerForClass();

See one of the other samplers (e.g. FTP) for examples.

[The developer docs are lagging a bit behind - patches welcome!]


You might find the prototype TCP Sampler useful as a base - see bug 23398
( - I'd be
interested to know how that fits with your needs.

Alternatively, the Java Sampler is quite easy to extend, but it is a bit
awkward to use if you need to set lots of parameters.

-----Original Message-----
From: Matt Munz []
Sent: 13 October 2003 16:16
Subject: Getting started -- classloading errors / confusion

Hi all,

  I'm having a little trouble getting started using JMeter.  I dl'd 1.9.1,
and found the docs a bit confusing.  

  Here's what I'm trying to do.  I have a Java application that I would like
to load test (many simultaneous threads).  The part I would like to test is
not HTTP-based, and I'd rather not write an HTML front-end just so I can
load test it.  I'd also like to reuse existing load-testing frameworks
(jmeter), rather than write my own.

  I have written a subclass of AbstractJavaSamplerClient, and I see it show
up in the JavaRequest>Classname pull-down menu.  Nevertheless, when I try to
run it, I get an error.[1]  I did put log4j in the ext dir, but this doesn't
seem to help.  What's the solution here?

  Re: documentation, the "JMeter Extension Scenario"[2] refers to log4j as
the JMeter logging mechanism, although it looks like it really uses logkit.
Other parts of the documentation regarding writing extensions seem out of
date (wrong interfaces).

  Also, is it possible to run JMeter in the standard Java way, by specifying
a classpath, a main class, and a working directory?  Or better yet, is there
an API for starting JMeter programmatically?

  Finally, perhaps JMeter not the best match for my project?  If there's
another framework that might be simpler to set up for what I'm trying to do,
I'd love to hear about it.

java.lang.NoClassDefFoundError: org/apache/log4j/Logger
        at sun.reflect.GeneratedConstructorAccessor12.newInstance(Unknown
        at java.lang.reflect.Constructor.newInstance(
        at java.lang.Class.newInstance0(
        at java.lang.Class.newInstance(


  - Matt Munz

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message