>The JDBC worked Ok for me, though I am having other problems (I
>can't start test, stop, and then start again under certain conditions, but
>that has to do with other things, not JDBC).
Me neither. Ctrl-C will kill it though. Also, it would be nice to be able to
load a different test plan without having to close down and re-start. I know
that you are actively working on this stuff, so this is just a comment. The
drag-n-drop stuff is pretty cool.
>Can you be more specific about your problem?
By adding debug statements, I was able to see that the user parameters
were not getting to the DBConnectionManager. The problem seemed to
be that these values were not getting set in the JDBCSampler. I thought
that something like the following might be the problem:
diff -u JDBCSampler.java JDBCSampler.java_wip
--- JDBCSampler.java Tue May 28 14:20:03 2002
+++ JDBCSampler.java_wip Thu May 23 15:26:07 2002
@@ -100,8 +100,9 @@
public void addCustomTestElement(TestElement element)
{
+ System.out.println("JDBCSampler element = " + element);
if(element instanceof SqlConfig || element instanceof
PoolConfig ||
- element instanceof DbConfig)
+ element instanceof DbConfig || element instanceof
ConfigTestElement)
{
this.mergeIn(element);
}
(I tried an FTP test plan, which also had problems with
the user parameters)
Here's a partial stack trace (the test plan is attached):
martin@living:~/JMeter/jakarta-jmeter/bin> ./jmeter
log4j:ERROR No appenders could be found for category
(org.apache.jmeter.util.ClassFinder).
log4j:ERROR Please initialize the log4j system properly.
Running the test!
found 1 threadgroups
notifying test listeners: 3
(No such file or directory)
number of threads = 1
starting a thread:tree list = [org.apache.jmeter.threads.ThreadGroup@d9e279]
Thread Thread Group1 started
Something unusual has occured to cause the driver to fail. Please report this
exception: Exception: java.sql.SQLException: No Postgres username specified
in startup packet.
Stack Trace:
java.sql.SQLException: No Postgres username specified in startup packet.
at org.postgresql.Connection.openConnection(Connection.java:170)
at org.postgresql.Driver.connect(Driver.java:122)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at
org.apache.jmeter.protocol.jdbc.util.DBConnectionManager.setup(DBConnectionManager.java:152)
at
org.apache.jmeter.protocol.jdbc.util.DBConnectionManager.getKey(DBConnectionManager.java:124)
at
org.apache.jmeter.protocol.jdbc.sampler.JDBCSampler.getKey(JDBCSampler.java:263)
at
org.apache.jmeter.protocol.jdbc.sampler.JDBCSampler.sample(JDBCSampler.java:149)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:114)
at java.lang.Thread.run(Thread.java:536)
End of Stack Trace
at org.postgresql.Driver.connect(Driver.java:131)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at
org.apache.jmeter.protocol.jdbc.util.DBConnectionManager.setup(DBConnectionManager.java:152)
at
org.apache.jmeter.protocol.jdbc.util.DBConnectionManager.getKey(DBConnectionManager.java:124)
at
org.apache.jmeter.protocol.jdbc.sampler.JDBCSampler.getKey(JDBCSampler.java:263)
at
org.apache.jmeter.protocol.jdbc.sampler.JDBCSampler.sample(JDBCSampler.java:149)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:114)
at java.lang.Thread.run(Thread.java:536)
ConnectionObject: e=Something unusual has occured to cause the driver to
fail. Please report this exception: Exception: java.sql.SQLException: No
Postgres username specified in startup packet.
<?xml version="1.0" encoding="UTF-8"?>
<node>
<testelement class="org.apache.jmeter.testelement.TestPlan">
<property name="TestElement.test_class">org.apache.jmeter.testelement.TestPlan</property>
<property name="TestElement.name">Test Plan</property>
<collection name="TestPlan.thread_groups" class="java.util.LinkedList"/>
<property name="TestElement.gui_class">org.apache.jmeter.control.gui.TestPlanGui</property>
</testelement>
<node>
<testelement class="org.apache.jmeter.threads.ThreadGroup">
<property name="TestElement.name">Thread Group</property>
<property name="TestElement.test_class">org.apache.jmeter.threads.ThreadGroup</property>
<testelement name="ThreadGroup.main_controller" class="org.apache.jmeter.control.LoopController">
<property name="TestElement.test_class">org.apache.jmeter.control.LoopController</property>
<property name="TestElement.name">Loop Controller</property>
<property name="LoopController.continue_forever">false</property>
<property name="LoopController.loops">5</property>
<property name="TestElement.gui_class">org.apache.jmeter.control.gui.LoopControlPanel</property>
</testelement>
<property name="ThreadGroup.num_threads">1</property>
<property name="ThreadGroup.ramp_time">1</property>
<property name="TestElement.gui_class">org.apache.jmeter.threads.gui.ThreadGroupGui</property>
</testelement>
<node>
<testelement class="org.apache.jmeter.protocol.jdbc.sampler.JDBCSampler">
<property name="TestElement.name">JDBC Request</property>
<property name="TestElement.test_class">org.apache.jmeter.protocol.jdbc.sampler.JDBCSampler</property>
<property name="JDBCSampler.url">jdbc:postgresql:mydb</property>
<property name="ConfigTestElement.username">martin</property>
<property name="JDBCSampler.driver">org.postgresql.Driver</property>
<collection name="AbstractSampler.assertions" class="java.util.ArrayList"/>
<property name="JDBCSampler.query">select * from Stocks;</property>
<property name="JDBCSampler.connections">1</property>
<property name="JDBCSampler.maxuse">50</property>
<property name="ConfigTestElement.password">mypass</property>
<property name="TestElement.gui_class">org.apache.jmeter.protocol.jdbc.control.gui.JdbcTestSampleGui</property>
</testelement>
</node>
<node>
<testelement class="org.apache.jmeter.reporters.ResultCollector">
<property name="TestElement.test_class">org.apache.jmeter.reporters.ResultCollector</property>
<property name="TestElement.name">View Results in Table</property>
<property name="AbstractListenerElement.listener">Show the samples in a table</property>
<property name="TestElement.gui_class">org.apache.jmeter.visualizers.TableVisualizer</property>
</testelement>
</node>
</node>
</node>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>