Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Unable to load the jdbc driver while upgrading from 2.6 to 3.7
Laewoon
I'm trying to upgrade the version of my birt-viewer on my tomcat server, but it seems that I have an error with the loading of the jdbc driver :<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>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.mysql.jdbc.Driver</pre>
<br />
My case is a bit special, as I don't know if I did it correcly. I explain myself.<br />
<br />
I have some reports that are designed with BIRT 2.6 and some others that are designed with BIRT 3.7. What I've done on my tomcat server is that I created two repositories :<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>birt-viewer/
birt-viewer3.7/</pre>
<br />
I put the .jar file in :<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>birt-viewer3.7/WEB-INF/lib/</pre>
<br />
But I still have the error. I also tried to put it in :<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>birt-viewer3.7/WEB-INF/platform/plugins/</pre>
<br />
But the errors remains the same.<br />
<br />
First of all : is it possible to make two versions of the birt-viewer coexist ?<br />
<br />
If it's possible, how can I do to solve this driver problem ?<br />
<br />
Thanks.
Find more posts tagged with
Comments
mwilliams
Yes, you can have multiple version of BIRT deployed. I have like 8 deployed to the same Tomcat server.
In 3.7, you just need the driver jar in your classpath/build path, which WEB-INF/lib/ should definitely qualify for. Are you able to still call report from the original deployment?
Can you look in the log file and post the entire error stack?
If you're using a connection profile, you might want to look at this:
http://wiki.eclipse.org/Birt_3.7_Migration_Guide#Connection_Profiles
Laewoon
Sure, here's the full error :<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>exception.error ( 1 time(s) )
detail : org.eclipse.birt.report.engine.api.EngineException: 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.mysql.jdbc.Driver. (Element ID:1351)
at org.eclipse.birt.report.engine.executor.ExecutionContext.addException(ExecutionContext.java:1237)
at org.eclipse.birt.report.engine.executor.ExecutionContext.addException(ExecutionContext.java:1216)
at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:96)
at org.eclipse.birt.report.engine.executor.TableItemExecutor.execute(TableItemExecutor.java:62)
at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)
at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:34)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:65)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.resumeLayout(HTMLInlineStackingLM.java:111)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.layoutNodes(HTMLInlineStackingLM.java:160)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLTableLM.layoutChildren(HTMLTableLM.java:132)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:92)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:180)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(ReportEngineService.java:929)
at org.eclipse.birt.report.service.BirtViewerReportService.runAndRenderReport(BirtViewerReportService.java:973)
at org.eclipse.birt.report.service.actionhandler.BirtRunAndRenderActionHandler.__execute(BirtRunAndRenderActionHandler.java:76)
at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:90)
at org.eclipse.birt.report.presentation.aggregation.layout.EngineFragment.doService(EngineFragment.java:318)
at org.eclipse.birt.report.presentation.aggregation.AbstractBaseFragment.service(AbstractBaseFragment.java:76)
at org.eclipse.birt.report.servlet.BirtEngineServlet.__doGet(BirtEngineServlet.java:120)
at org.eclipse.birt.report.servlet.BaseReportEngineServlet.doGet(BaseReportEngineServlet.java:185)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.eclipse.birt.report.servlet.BaseReportEngineServlet.service(BaseReportEngineServlet.java:116)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerFilter.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.eclipse.birt.report.data.adapter.api.AdapterException: 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.mysql.jdbc.Driver.
at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.execute(DataRequestSessionImpl.java:644)
at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:158)
at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:267)
at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1939)
at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:80)
... 47 more
Caused by: org.eclipse.birt.data.engine.odaconsumer.OdaDataException: 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.mysql.jdbc.Driver.
at org.eclipse.birt.data.engine.odaconsumer.ExceptionHandler.newException(ExceptionHandler.java:54)
at org.eclipse.birt.data.engine.odaconsumer.ConnectionManager.openConnection(ConnectionManager.java:177)
at org.eclipse.birt.data.engine.executor.DataSource.newConnection(DataSource.java:224)
at org.eclipse.birt.data.engine.executor.DataSource.open(DataSource.java:212)
at org.eclipse.birt.data.engine.impl.DataSourceRuntime.openOdiDataSource(DataSourceRuntime.java:217)
at org.eclipse.birt.data.engine.impl.QueryExecutor.openDataSource(QueryExecutor.java:407)
at org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:317)
at org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(PreparedQuery.java:455)
at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.produceQueryResults(PreparedDataSourceQuery.java:190)
at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.execute(PreparedDataSourceQuery.java:178)
at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery.execute(PreparedOdaDSQuery.java:145)
at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.execute(DataRequestSessionImpl.java:624)
... 51 more
Caused by: org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot load JDBC Driver class: com.mysql.jdbc.Driver.
at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.findDriver(JDBCDriverManager.java:836)
at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.loadAndRegisterDriver(JDBCDriverManager.java:941)
at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.loadAndRegisterDriver(JDBCDriverManager.java:918)
at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.doConnect(JDBCDriverManager.java:266)
at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.getConnection(JDBCDriverManager.java:232)
at org.eclipse.birt.report.data.oda.jdbc.Connection.connectByUrl(Connection.java:243)
at org.eclipse.birt.report.data.oda.jdbc.Connection.open(Connection.java:162)
at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaConnection.open(OdaConnection.java:250)
at org.eclipse.birt.data.engine.odaconsumer.ConnectionManager.openConnection(ConnectionManager.java:165)
... 61 more</pre>
<br />
I still tried to put the mysql jar file into the WEB-INF/lib/ folder but it seems it doesn't find it
mwilliams
Are you still able to call reports from your original deployment? Have you tried only deploying the new version, to see if there is some reason that having both is not working? Also, does your report run properly from the 3.7 designer?
Laewoon
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="97602" data-time="1331651530" data-date="13 March 2012 - 08:12 AM"><p>
Are you still able to call reports from your original deployment? Have you tried only deploying the new version, to see if there is some reason that having both is not working? Also, does your report run properly from the 3.7 designer?<br /></p></blockquote>
<br />
Yes my reports with BIRT 2.6 are still available.<br />
<br />
I didn't tried to deploy only the 3.7 version yet, I'll try tonight to see if it's working. If I do so, do my 2.6 reports will work with the 3.7 viewer ?<br />
<br />
I have no errors with the 3.7 designer.
mwilliams
Your 2.6 reports should work on the 3.7 viewer, but I'd test them all to make sure, before committing to it!
Another thing to check is if the 3.7 viewer you have downloaded can run a report made with the sample database. Cause if you're putting the correct driver jar where you say you are and you're not using a connection profile, I'm not certain why you're getting that error.