If there is an empty user variable defined (maybe someone click the add button without filling name and value for example), an exception is raised by the JDBC Request component : jmeter.threads.JMeterThread: Error while processing sampler 'JDBC Request' : java.lang.ClassCastException: java.lang.String cannot be cast to org.apache.avalon.excalibur.datasource.DataSourceComponent at org.apache.jmeter.protocol.jdbc.config.DataSourceElement.getConnection(DataSourceElement.java:137) at org.apache.jmeter.protocol.jdbc.sampler.JDBCSampler.sample(JDBCSampler.java:176) at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:411) at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:297) at java.lang.Thread.run(Thread.java:662) Components shouldn't use undefined variables Believe me, it was hard to find the cause of this issue ...
Date: Sat Mar 17 21:41:10 2012 New Revision: 1302018 URL: http://svn.apache.org/viewvc?rev=1302018&view=rev Log: Bug 52916 - JDBC Exception if there is an empty user defined variable Modified: jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java jmeter/trunk/xdocs/changes.xml
Thank you.
please help me, when i am trying to import data from .txt or .csv file to sqlserver through JDBC from JMeter, it is showing the following Error: "java.lang.String cannot be cast to org.apache.avalon.excalibur.datasource.DataSourceComponent" But it is taking the request correctly as like below "[Select Statement] insert into new values ('shatrughun')" but not exporting to database. please do the needful help.
Hello, Can you attach a simple test plan showing the issue ? Thank you
Last reported Bug was related to error in variable naming which will be easier to detect now with: https://issues.apache.org/bugzilla/show_bug.cgi?id=53844 I close issue as fixed.
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2781