JMETER DB TestCase

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

JMETER DB TestCase

David Long
Following the example for building a DataBase testcase, I can not get
successful results.  I have installed JMETER 2.0.3.

I am trying to connect to a remote JDBC Datasource (DB2), with a login
id/pw, and attempting to issue a simple SQL Query.  The JMETER log gives
the following result (see "ClassNot Found" below), yet I have placed the
class file (DB2Java.zip) in both the <JMETER>\lib and <JMETER>\lib\ext
directories.  I have verified, using the DB2 Command prompt, that I am
able to connect to this db and run queries, using the same id/pw.

I also am wondering where I would specify the port number, within the
testcase.  Any help is much appreciated.

2005/05/09 14:06:20 ERROR - jmeter.protocol.jdbc.sampler.JDBCSampler:
Error in JDBC sampling
org.apache.jmeter.protocol.jdbc.util.NoConnectionsAvailableException
        at
org.apache.jmeter.protocol.jdbc.util.DBConnectionManager.getConnection(DBConnectionManager.java:183)
        at
org.apache.jmeter.protocol.jdbc.sampler.JDBCSampler.sample(JDBCSampler.java:106)
        at
org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:281)
        at java.lang.Thread.run(Unknown Source)

2005/05/09 14:06:20 INFO  - jmeter.threads.JMeterThread: Thread
SampleJDBCUsers 1-1 is done
2005/05/09 14:06:20 INFO  - jmeter.engine.StandardJMeterEngine: Notifying
listeners of end of test
2005/05/09 14:06:20 INFO  - jmeter.engine.StandardJMeterEngine: Notifying
test listener: org.apache.jmeter.protocol.jdbc.sampler.JDBCSampler
2005/05/09 14:06:20 INFO  - jmeter.engine.StandardJMeterEngine: Notifying
test listener: org.apache.jmeter.reporters.ResultCollector
2005/05/09 14:06:20 INFO  - jmeter.engine.StandardJMeterEngine: Notifying
test listener: org.apache.jmeter.gui.MainFrame
2005/05/09 14:06:20 INFO  - jmeter.gui.util.JMeterMenuBar:
setRunning(false,local)
2005/05/09 14:06:20 INFO  - jmeter.engine.StandardJMeterEngine: Test has
ended
2005/05/09 14:06:53 INFO  - jmeter.engine.StandardJMeterEngine: Running
the test!
2005/05/09 14:06:53 INFO  - jmeter.engine.StandardJMeterEngine: About to
call test listeners
2005/05/09 14:06:53 INFO  - jmeter.engine.StandardJMeterEngine: Notifying
test listener: org.apache.jmeter.protocol.jdbc.sampler.JDBCSampler
2005/05/09 14:06:53 INFO  - jmeter.engine.StandardJMeterEngine: Notifying
test listener: org.apache.jmeter.reporters.ResultCollector
2005/05/09 14:06:53 INFO  - jmeter.engine.StandardJMeterEngine: Notifying
test listener: org.apache.jmeter.gui.MainFrame
2005/05/09 14:06:53 INFO  - jmeter.gui.util.JMeterMenuBar:
setRunning(true,local)
2005/05/09 14:06:53 INFO  - jmeter.engine.StandardJMeterEngine: Starting 1
threads for group SampleJDBCUsers. Ramp up = 0.
2005/05/09 14:06:53 INFO  - jmeter.engine.StandardJMeterEngine: Continue
on error
2005/05/09 14:06:53 INFO  - jmeter.threads.JMeterThread: Thread
SampleJDBCUsers 1-1 started
2005/05/09 14:06:53 ERROR - jmeter.protocol.jdbc.util.DBConnectionManager:
Error registering database driver 'db2java.jar'
java.lang.ClassNotFoundException: db2java.jar
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at
org.apache.jmeter.protocol.jdbc.util.DBConnectionManager.registerDriver(DBConnectionManager.java:224)
        at
org.apache.jmeter.protocol.jdbc.util.DBConnectionManager.getKey(DBConnectionManager.java:102)
        at
org.apache.jmeter.protocol.jdbc.sampler.JDBCSampler.getKey(JDBCSampler.java:185)
        at
org.apache.jmeter.protocol.jdbc.sampler.JDBCSampler.sample(JDBCSampler.java:102)
        at
org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:281)
        at java.lang.Thread.run(Unknown Source)


David Long
[hidden email]
IBM Austin
Reply | Threaded
Open this post in threaded view
|

Re: JMETER DB TestCase

sebb-2-2
JMeter does not look for or inside Zip files - it only looks for jars.

Rename the zip as a jar - or extract the jar from the zip if relevant.

S.
On 5/10/05, David Long <[hidden email]> wrote:
> Following the example for building a DataBase testcase, I can not get
> successful results.  I have installed JMETER 2.0.3.
>
> I am trying to connect to a remote JDBC Datasource (DB2), with a login
> id/pw, and attempting to issue a simple SQL Query.  The JMETER log gives
> the following result (see "ClassNot Found" below), yet I have placed the
> class file (DB2Java.zip) in both the <JMETER>\lib and <JMETER>\lib\ext

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]