BIRT report with Microsft SQL JDBC Driver stopped working in RTC after upgrade of Websphere to version 9
Hi,
We have CLM 6.0.5 installed in Websphere Application Server 8.5.5.11. To upgrade CLM to version 6.0.6 we installed Websphere Application Server 9.0.0.9 with Java 8.0.5.22 and migrated the profiles.
We are also using BIRT for reporting purpose and BIRT is using Microsft SQL JDBC Driver to access a Database directly. These BIRT reports were working absolutely fine before migration to WAS 9.0.0.9. We had added the Microsoft SQL Server JDBC driver "sqljdbc4.jar" in org.eclipse.birt.report.data.oda.jdbc*.jar in update-sites/plugins folder as mentioned in IBM technote.
After upgraded and migrating profiles to WAS our birt reports stopped working and we started getting following error.
An exception occurred during processing. Please see the following message for details:
Cannot open the connection for the driver: org.eclipse.birt.report.data.oda.jdbc.
org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot load JDBC Driver class: com.microsoft.sqlserver.jdbc.SQLServerDriver.
Cannot open the connection for the driver: org.eclipse.birt.report.data.oda.jdbc.
org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot load JDBC Driver class: com.microsoft.sqlserver.jdbc.SQLServerDriver.
Quick help will be very valuable.
Accepted answer
Hi Ahmed,
A better more robust way to specify the location of the JDBC Driver that would not require any patching of any jars is to add the following to the report initialize method:
reportContext.getAppContext().put("OdaJDBCDriverClassPath", "C:/IBM/JDBC_DatabaseDrivers/DB2");
Use the path where you had placed the JDBC Driver instead of "C:/IBM/JDBC_DatabaseDrivers/DB2".