Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Report Viewer JDBC Connection Issue (Access Denied)(Can't Access Database with valid username/password and jar)
Report Viewer JDBC Connection Issue (Access Denied) [message #1355851] Wed, 14 May 2014 22:43 Go to next message
John Bergant is currently offline John BergantFriend
Messages: 6
Registered: August 2013
Junior Member
Hi,

I recently setup BIRT Viewer 4.3.2 with Tomcat 8.0.5 on a Windows 2012 Server Machine. I have setup a very simple test RPTDesign that pulls a single field from a table in my MariaDB database.

Inside the Report Designer this RPTDesign works and I'm able to connect to the database on my Windows Machine. When I try to view the report through the WebViewer I get the following Error:

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: Failed to get connection.
SQL error #1:Access denied for user 'webuser'@'10.3.2.50' (using password: YES)
;
java.sql.SQLException: Access denied for user 'webuser'@'10.3.2.50' (using password: YES)
   at org.eclipse.birt.report.engine.executor.ExecutionContext.addException(ExecutionContext.java:1245)
   at org.eclipse.birt.report.engine.executor.ExecutionContext.addException(ExecutionContext.java:1224)
   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.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)
   at org.eclipse.birt.report.engine.internal.executor.emitter.ReportItemEmitterExecutor.execute(ReportItemEmitterExecutor.java:46)
   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.HTMLPageLM.layout(HTMLPageLM.java:92)
   at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)
   at org.eclipse.birt.report.engine.presentation.ReportDocumentBuilder.build(ReportDocumentBuilder.java:249)
   at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:269)
   at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask.java:86)
   at org.eclipse.birt.report.service.ReportEngineService.runReport(ReportEngineService.java:1325)
   at org.eclipse.birt.report.service.BirtViewerReportService.runReport(BirtViewerReportService.java:158)
   at org.eclipse.birt.report.service.actionhandler.BirtRunReportActionHandler.__execute(BirtRunReportActionHandler.java:81)
   at org.eclipse.birt.report.service.actionhandler.BirtGetPageActionHandler.__checkDocumentExists(BirtGetPageActionHandler.java:58)
   at org.eclipse.birt.report.service.actionhandler.AbstractGetPageActionHandler.prepareParameters(AbstractGetPageActionHandler.java:118)
   at org.eclipse.birt.report.service.actionhandler.AbstractGetPageActionHandler.__execute(AbstractGetPageActionHandler.java:103)
   at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:90)
   at org.eclipse.birt.report.soapengine.processor.AbstractBaseDocumentProcessor.__executeAction(AbstractBaseDocumentProcessor.java:47)
   at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.executeAction(AbstractBaseComponentProcessor.java:143)
   at org.eclipse.birt.report.soapengine.processor.BirtDocumentProcessor.handleGetPage(BirtDocumentProcessor.java:87)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:483)
   at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.process(AbstractBaseComponentProcessor.java:112)
   at org.eclipse.birt.report.soapengine.endpoint.BirtSoapBindingImpl.getUpdatedObjects(BirtSoapBindingImpl.java:66)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:483)
   at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
   at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
   at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
   at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
   at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
   at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
   at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
   at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
   at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
   at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doPost(BirtSoapMessageDispatcherServlet.java:265)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
   at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
   at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:122)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:301)
   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:239)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:74)
   at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1017)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:652)
   at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:277)
   at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2451)
   at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2440)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at java.lang.Thread.run(Thread.java:745)
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: Failed to get connection.
SQL error #1:Access denied for user 'webuser'@'10.3.2.50' (using password: YES)
;
java.sql.SQLException: Access denied for user 'webuser'@'10.3.2.50' (using password: YES)
   at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.execute(DataRequestSessionImpl.java:657)
   at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:152)
   at org.eclipse.birt.report.engine.data.dte.DataGenerationEngine.doExecuteQuery(DataGenerationEngine.java:83)
   at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:275)
   at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1947)
   at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:80)
... 70 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: Failed to get connection.
SQL error #1:Access denied for user 'webuser'@'10.3.2.50' (using password: YES)
;
java.sql.SQLException: Access denied for user 'webuser'@'10.3.2.50' (using password: YES)
   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:435)
   at org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:322)
   at org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(PreparedQuery.java:463)
   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:178)
   at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.execute(DataRequestSessionImpl.java:637)
... 75 more
Caused by: org.eclipse.birt.report.data.oda.jdbc.JDBCException: Failed to get connection.
SQL error #1:Access denied for user 'webuser'@'10.3.2.50' (using password: YES)
;
java.sql.SQLException: Access denied for user 'webuser'@'10.3.2.50' (using password: YES)
   at org.eclipse.birt.report.data.oda.jdbc.Connection.connectByUrl(Connection.java:263)
   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)
... 85 more
Caused by: java.sql.SQLException: Access denied for user 'webuser'@'10.3.2.50' (using password: YES)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1084)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:926)
   at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1748)
   at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1288)
   at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2506)
   at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2539)
   at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2321)
   at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:832)
   at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:46)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
   at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
   at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:417)
   at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:344)
   at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.doConnect(JDBCDriverManager.java:306)
   at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.getConnection(JDBCDriverManager.java:235)
   at org.eclipse.birt.report.data.oda.jdbc.Connection.connectByUrl(Connection.java:252)
... 88 more


I'm able to see the default report that comes with the Web Viewer package and I have
verified that the MariaDB Driver was added to the RPTDesign via the manage drivers interface. The MariaDB JAR is also located in the WEB-INF/lib directory.
Re: Report Viewer JDBC Connection Issue (Access Denied) [message #1370120 is a reply to message #1355851] Tue, 20 May 2014 22:05 Go to previous messageGo to next message
John Bergant is currently offline John BergantFriend
Messages: 6
Registered: August 2013
Junior Member
I was able to solve my problem by setting up a JNDI Connection, I posted my solution on stackoverflow.

[Updated on: Tue, 20 May 2014 22:06]

Report message to a moderator

Re: Report Viewer JDBC Connection Issue (Access Denied) [message #1371746 is a reply to message #1370120] Wed, 21 May 2014 14:23 Go to previous messageGo to next message
Kristopher Clark is currently offline Kristopher ClarkFriend
Messages: 130
Registered: January 2013
Senior Member
John Bergant wrote:
> I was able to solve my problem by setting up a JNDI Connection, I posted
> my solution on stackoverflow but can't link to it due to not having
> enough posts just search for this path
> (questions/23702449/user-access-denied-when-viewing-birt-report).

Just wondering...what version of Java were you running?
Re: Report Viewer JDBC Connection Issue (Access Denied) [message #1372115 is a reply to message #1371746] Wed, 21 May 2014 17:42 Go to previous message
John Bergant is currently offline John BergantFriend
Messages: 6
Registered: August 2013
Junior Member
I pointed the Tomcat MSI to the java jdk 1.8.0_05 directory.
Previous Topic:language pack unavailability
Next Topic:BIRT exclude null labels from chart and legend
Goto Forum:
  


Current Time: Thu Nov 27 08:50:28 GMT 2014

Powered by FUDForum. Page generated in 0.11425 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software