jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "BAZLEY, Sebastian" <Sebastian.BAZ...@london.sema.slb.com>
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
(http://issues.apache.org/bugzilla/show_bug.cgi?id=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.

S.
-----Original Message-----
From: Matt Munz [mailto:mmunz@apelon.com]
Sent: 13 October 2003 16:16
To: jmeter-user@jakarta.apache.org
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.

[1]
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
        at
com.apelon.dts.webservice.test.load.TestSampler.<init>(TestSampler.java:12)
        at sun.reflect.GeneratedConstructorAccessor12.newInstance(Unknown
Source)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
torAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at java.lang.Class.newInstance0(Class.java:306)
        at java.lang.Class.newInstance(Class.java:259)
        at
org.apache.jmeter.protocol.java.sampler.JavaSampler.createJavaClient(JavaSam
pler.java:228)
        at
org.apache.jmeter.protocol.java.sampler.JavaSampler.sample(JavaSampler.java:
202)
        at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:277)
        at java.lang.Thread.run(Thread.java:536)

[2]
http://jakarta.apache.org/jmeter/extending/JMeter%20Extension%20Scenario.htm
l

  - Matt Munz

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Mime
View raw message