jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Elias Fradelos <frade...@jgsullivan.com>
Subject Database Testing Causing ClassCastException
Date Tue, 10 Apr 2001 17:13:27 GMT
<html>
<br>
I'm am new to JMeter, and I'm running into problems trying to test a
simple database.&nbsp; With the following setup, I will always get a
ClassCastException:<br>
<br>
- Test Plan<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>-
Thread
Group<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>-
Database Testing<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>-
SQL Query<br>
<br>
<br>
<br>
Here is the exeption:<br>
<br>
<font face="Courier, Courier"><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>java.lang.ClassCastException:
org.apache.jmeter.config.LoginConfig<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>at
org.apache.jmeter.protocol.jdbc.sampler.JDBCSampler.sample(JDBCSampler.java:102)<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>at
org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:133)<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>at
java.lang.Thread.run(Thread.java:484)<br>
<br>
<br>
</font>Here is the line that does it (JDBCSampler.java:102):<br>
<br>
<font face="Courier, Courier"><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>DBKey
key = getKey((DbConfig)e.getConfigElement(DbConfig.class),<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>(PoolConfig)e.getConfigElement(PoolConfig.class));<br>
<br>
</font>e.getConfigElement(DbConfig.class) returns a LoginConfig object,
not DbConfig object (which I think is just a sub-class).&nbsp; Is this a
bug, or am I not just setting it up properly?<br>
<br>
<br>
Thanks,<br>
Elias</html>


Mime
View raw message