Return-Path: Delivered-To: apmail-jakarta-jmeter-user-archive@www.apache.org Received: (qmail 50908 invoked from network); 13 Oct 2003 15:33:58 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 13 Oct 2003 15:33:58 -0000 Received: (qmail 95785 invoked by uid 500); 13 Oct 2003 15:33:49 -0000 Delivered-To: apmail-jakarta-jmeter-user-archive@jakarta.apache.org Received: (qmail 95770 invoked by uid 500); 13 Oct 2003 15:33:49 -0000 Mailing-List: contact jmeter-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "JMeter Users List" Reply-To: "JMeter Users List" Delivered-To: mailing list jmeter-user@jakarta.apache.org Received: (qmail 95757 invoked from network); 13 Oct 2003 15:33:49 -0000 Received: from unknown (HELO mail.slb.com) (134.32.26.55) by daedalus.apache.org with SMTP; 13 Oct 2003 15:33:49 -0000 Received: from conversion-daemon.eurmta01.london.eur.slb.com by eurmta01.london.eur.slb.com (iPlanet Messaging Server 5.2 HotFix 1.12 (built Feb 13 2003)) id <0HMP00801CGLLU@eurmta01.london.eur.slb.com> for jmeter-user@jakarta.apache.org; Mon, 13 Oct 2003 15:31:46 +0000 (GMT) Received: from mailrelay2.sema.co.uk (mailrelay2.London.eur.slb.com [157.203.41.14]) by eurmta01.london.eur.slb.com (iPlanet Messaging Server 5.2 HotFix 1.12 (built Feb 13 2003)) with ESMTP id <0HMP00FDBCGDIR@eurmta01.london.eur.slb.com> for jmeter-user@jakarta.apache.org; Mon, 13 Oct 2003 15:31:26 +0000 (GMT) Received: from lones1.sema.co.uk (lones1.London.eur.slb.com [157.203.40.186]) by mailrelay2.sema.co.uk (8.11.6+Sun/8.11.6) with ESMTP id h9DGSGY05619 for ; Mon, 13 Oct 2003 16:28:16 +0000 (GMT) Received: by lones1.sema.co.uk with Internet Mail Service (5.5.2656.59) id <4YJM1CM0>; Mon, 13 Oct 2003 16:31:10 +0100 Content-return: allowed Date: Mon, 13 Oct 2003 16:31:10 +0100 From: "BAZLEY, Sebastian" Subject: RE: Getting started -- classloading errors / confusion To: 'JMeter Users List' Message-id: MIME-version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7BIT X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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.(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