I'm trying to get Birt 4.2.0 working on a Tomcat 6.0 server, and I simply can not get it to load the mySql JDBC driver. My report works fine in Eclipse's preview, and it works fine when I feed it to the ReportEngine, but the web viewer keeps spitting out this exception:
SEVERE: DriverClassLoader failed to load class: com.mysql.jdbc.Driver
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at org.eclipse.birt.core.framework.URLClassLoader.findClass1(URLClassLoader.java:188)
at org.eclipse.birt.core.framework.URLClassLoader$1.run(URLClassLoader.java:156)
at org.eclipse.birt.core.framework.URLClassLoader$1.run(URLClassLoader.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.birt.core.framework.URLClassLoader.findClass(URLClassLoader.java:151)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.loadExtraDriver(JDBCDriverManager.java:1024)
at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.findDriver(JDBCDriverManager.java:819)
at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.loadAndRegisterDriver(JDBCDriverManager.java:946)
(followed by about eighty more lines of stacktracing, which I have omitted for brevity)
I have mysql-connector-java-5.1.21-bin.jar, which I've placed in /usr/local/apache-tomcat-6.0.33/webapps/birt/WEB-INF/lib. After a lot of googling, I've also tried putting it in many other places, including /usr/local/apache-tomcat-6.0.33/lib, /usr/local/apache-tomcat-6.0.33/common/lib, and /usr/local/apache-tomcat-6.0.33/webapps/birt/WEB-INF/platform/plugins/org.eclipse.birt.report.data.oda.jdbc_5.1.21/drivers. None had any impact. The data source in my .rptdesign file reads as follows:
<data-sources>
<oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Playrific live" id="49">
<list-property name="privateDriverProperties">
<ex-property>
<name>metadataBidiFormatStr</name>
<value>ILYNN</value>
</ex-property>
<ex-property>
<name>disabledMetadataBidiFormatStr</name>
</ex-property>
<ex-property>
<name>contentBidiFormatStr</name>
<value>ILYNN</value>
</ex-property>
<ex-property>
<name>disabledContentBidiFormatStr</name>
</ex-property>
</list-property>
<property name="odaDriverClass">com.mysql.jdbc.Driver</property>
<property name="odaURL">jdbc:mysql://10.177.134.242:3406/db_playsmrt</property>
<property name="odaUser">[redacted]</property>
<encrypted-property name="odaPassword" encryptionID="base64">[redacted]</encrypted-property>
</oda-data-source>
</data-sources>
At this point, the only thing I can think of is that either mysql-connector-java-5.1.21-bin.jar belongs in yet another location that I haven't tried yet, or there's some environmental variable somewhere that needs to be set, but I can't find anything about what that could be. Does anyone have any idea what's going on?
Update
Annnd a reboot fixed it. I feel stupid now.