« Return to Thread: multiple report generation causing mysql driver failure

multiple report generation causing mysql driver failure

by johnrellis :: Rate this Message:

Reply to Author | View in Thread

Hi all,

Sorry if anyone on the Birt-Dev list got this already as i posted in the wrong forum and i apologise!

I have wrote a Java class to deploy a birt report to a specified directory in html format. It is pretty much a carbon copy of that found on the BIRT Eclipse wiki. The class will work fine when i run it once, however if i put it within a for loop and run it more than once within the loop, all but the first one fails with the exception:

"03-Jun-2008 10:38:08 org.eclipse.birt.report.data.oda.jdbc.JDBCDriverMa nager findDriver
WARNING: Failed to load JDBC driver class: com.mysql.jdbc.Driver
03-Jun-2008 10:38:08 org.eclipse.birt.data.engine.odaconsumer.Connectio nManager openConnection
SEVERE: Cannot open connection.
org.eclipse.birt.report.data.oda.jdbc.JDBCExceptio n: Cannot load JDBC Driver class: com.mysql.jdbc.Driver"

The fact that the database driver is found first time suggests to me that all is set up correctly on my machine, i could be suffering from code blindness as i have read over the class so many times but i cant see anything wrong. I have attached the class and a test report that uses the classic models database that should reproduce the error. If anyone could take a look and give me some feedback that would be great. Any help is as always greatly appreciated! I have comments in the main method that hopefully make it easy to run!
Thanks,
John
(p.s. Birt 2.2.2)
new_report.rptdesign
testerclass.txt

 « Return to Thread: multiple report generation causing mysql driver failure