Home
Analytics
DB error connection object closed
Avinash02
Hi all,
Plz help me with this error i tried many things to remove this error but everything in vain
And this error is coming in production.
The following error comes when i am trying to run the report with JNDI datasource DB is MSSQL 2005
driver is sqljdbc4.jar
ReportDesign (id = 1):
+ An exception occurred during processing. Please see the following message for details:
exception.error
Error happens when create hierarchy:Group2.NewTabularHierarchy2.
Failed to prepare the query execution for the data set: Set1
Failed to prepare the following query for the data set type (org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet).
[SELECT
*
FROM
MR_ORDERS MRO
]
Error preparing SQL statement.
SQL error #1: Invalid state, the Connection object is closed.
I tried to shutdown the server & start it again , while running for first time it gives the out put but as soon as i tried to run it again it gives me the above error.
plz help as soon as possible.
Thanks & Regards,
Avi
Find more posts tagged with
Comments
mwilliams
Hi Avi,
Can you click the '+' and expand the error and attach the stack in here?
Avinash02
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="84092" data-time="1318531247" data-date="13 October 2011 - 11:40 AM"><p>
Hi Avi,<br />
<br />
Can you click the '+' and expand the error and attach the stack in here?<br /></p></blockquote>
<br />
Hi Micheal,<br />
<br />
Below is the stack trace.... Also 1 more info i want to share is that JNDI consist of URL,USERNAME,PASSWORD<br />
& URL is something like - jdbc:jtds:sqlserver://machine1:1433/mydb;useCursors=true<br />
I don't understand why that extra parameter(useCursors) is used.<br />
<br />
<br />
<br />
org.eclipse.birt.report.engine.api.EngineException: An exception occurred during processing. Please see the following message for details:<br />
Failed to prepare the query execution for the data set: Set1<br />
Failed to prepare the following query for the data set type (org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet). <br />
[SELECT<br />
*<br />
<br />
FROM MR_ORDERS MRO <br />
]<br />
Error preparing SQL statement.<br />
SQL error #1: Invalid state, the Connection object is closed.<br />
<br />
at org.eclipse.birt.report.engine.executor.ExecutionContext.addException(ExecutionContext.java:1215)<br />
at org.eclipse.birt.report.engine.executor.ExecutionContext.addException(ExecutionContext.java:1179)<br />
at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:96)<br />
at org.eclipse.birt.report.engine.executor.TableItemExecutor.execute(TableItemExecutor.java:62)<br />
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)<br />
at org.eclipse.birt.report.engine.internal.executor.emitter.ReportItemEmitterExecutor.execute(ReportItemEmitterExecutor.java:46)<br />
at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43)<br />
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:65)<br />
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:90)<br />
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:99)<br />
at org.eclipse.birt.report.engine.presentation.ReportDocumentBuilder.build(ReportDocumentBuilder.java:258)<br />
at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:252)<br />
at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask.java:85)<br />
at org.eclipse.birt.report.service.ReportEngineService.runReport(ReportEngineService.java:1307)<br />
at org.eclipse.birt.report.service.BirtViewerReportService.runReport(BirtViewerReportService.java:158)<br />
at org.eclipse.birt.report.service.actionhandler.BirtRunReportActionHandler.__execute(BirtRunReportActionHandler.java:81)<br />
at org.eclipse.birt.report.service.actionhandler.BirtChangeParameterActionHandler.runReport(BirtChangeParameterActionHandler.java:58)<br />
at org.eclipse.birt.report.service.actionhandler.AbstractChangeParameterActionHandler.__execute(AbstractChangeParameterActionHandler.java:53)<br />
at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:90)<br />
at org.eclipse.birt.report.soapengine.processor.AbstractBaseDocumentProcessor.__executeAction(AbstractBaseDocumentProcessor.java:47)<br />
at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.executeAction(AbstractBaseComponentProcessor.java:143)<br />
at org.eclipse.birt.report.soapengine.processor.BirtDocumentProcessor.handleChangeParameter(BirtDocumentProcessor.java:100)<br />
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br />
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br />
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br />
at java.lang.reflect.Method.invoke(Method.java:585)<br />
at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.process(AbstractBaseComponentProcessor.java:112)<br />
at org.eclipse.birt.report.soapengine.endpoint.BirtSoapBindingImpl.getUpdatedObjects(BirtSoapBindingImpl.java:66)<br />
at sun.reflect.GeneratedMethodAccessor352.invoke(Unknown Source)<br />
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br />
at java.lang.reflect.Method.invoke(Method.java:585)<br />
at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)<br />
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)<br />
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)<br />
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)<br />
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)<br />
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)<br />
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)<br />
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)<br />
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)<br />
at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doPost(BirtSoapMessageDispatcherServlet.java:265)<br />
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)<br />
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)<br />
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)<br />
at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:122)<br />
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)<br />
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<br />
at org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerFilter.java:68)<br />
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)<br />
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<br />
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)<br />
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)<br />
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<br />
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)<br />
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)<br />
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)<br />
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)<br />
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)<br />
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)<br />
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)<br />
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)<br />
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)<br />
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)<br />
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)<br />
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)<br />
at java.lang.Thread.run(Thread.java:595)<br />
Caused by: org.eclipse.birt.report.data.adapter.api.AdapterException: An exception occurred during processing. Please see the following message for details:<br />
Failed to prepare the query execution for the data set: Set1<br />
Failed to prepare the following query for the data set type (org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet). <br />
[SELECT<br />
*<br />
<br />
FROM MR_ORDERS MRO <br />
]<br />
Error preparing SQL statement.<br />
SQL error #1: Invalid state, the Connection object is closed.<br />
<br />
at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.execute(DataRequestSessionImpl.java:580)<br />
at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:152)<br />
at org.eclipse.birt.report.engine.data.dte.DataGenerationEngine.doExecuteQuery(DataGenerationEngine.java:74)<br />
at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:265)<br />
at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1875)<br />
at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:80)<br />
... 63 more<br />
Caused by: org.eclipse.birt.data.engine.core.DataException: Failed to prepare the query execution for the data set: Set1<br />
Failed to prepare the following query for the data set type (org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet). <br />
[SELECT<br />
*<br />
<br />
FROM MR_ORDERS MRO <br />
]<br />
Error preparing SQL statement.<br />
SQL error #1: Invalid state, the Connection object is closed.<br />
<br />
at org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:343)<br />
at org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(PreparedQuery.java:448)<br />
at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.produceQueryResults(PreparedDataSourceQuery.java:190)<br />
at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.execute(PreparedDataSourceQuery.java:178)<br />
at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery.execute(PreparedOdaDSQuery.java:145)<br />
at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.execute(DataRequestSessionImpl.java:560)<br />
... 68 more<br />
Caused by: org.eclipse.birt.data.engine.core.DataException: Failed to prepare the following query for the data set type (org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet). <br />
[SELECT<br />
*<br />
<br />
FROM MR_ORDERS MRO <br />
]<br />
Error preparing SQL statement.<br />
SQL error #1: Invalid state, the Connection object is closed.<br />
<br />
at org.eclipse.birt.data.engine.odaconsumer.Connection.throwDataException(Connection.java:363)<br />
at org.eclipse.birt.data.engine.odaconsumer.Connection.prepareOdaQuery(Connection.java:308)<br />
at org.eclipse.birt.data.engine.odaconsumer.Connection.prepareStatement(Connection.java:204)<br />
at org.eclipse.birt.data.engine.executor.DataSource.prepareStatement(DataSource.java:268)<br />
at org.eclipse.birt.data.engine.executor.DataSourceQuery.prepare(DataSourceQuery.java:274)<br />
at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery$OdaDSQueryExecutor.prepareOdiQuery(PreparedOdaDSQuery.java:413)<br />
at org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:339)<br />
... 73 more<br />
Caused by: org.eclipse.birt.report.data.oda.jdbc.JDBCException: Error preparing SQL statement.<br />
SQL error #1: Invalid state, the Connection object is closed.<br />
;<br />
java.sql.SQLException: Invalid state, the Connection object is closed.<br />
at org.eclipse.birt.report.data.oda.jdbc.Statement.prepare(Statement.java:146)<br />
at org.eclipse.birt.report.data.oda.jdbc.bidi.BidiStatement.prepare(BidiStatement.java:52)<br />
at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaQuery.doPrepare(OdaQuery.java:229)<br />
at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaQuery.prepare(OdaQuery.java:186)<br />
at org.eclipse.birt.data.engine.odaconsumer.Connection.prepareOdaQuery(Connection.java:300)<br />
... 78 more<br />
Caused by: java.sql.SQLException: Invalid state, the Connection object is closed.<br />
at net.sourceforge.jtds.jdbc.ConnectionJDBC2.checkOpen(ConnectionJDBC2.java:1699)<br />
at net.sourceforge.jtds.jdbc.ConnectionJDBC2.prepareStatement(ConnectionJDBC2.java:2439)<br />
at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.doPrepareStatement(BaseWrapperManagedConnection.java:449)<br />
at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.prepareStatement(BaseWrapperManagedConnection.java:444)<br />
at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:243)<br />
at org.eclipse.birt.report.data.oda.jdbc.Statement.prepare(Statement.java:142)<br />
... 82 more
mwilliams
Do you have any issues accessing your database from any other tools? Is this only an issue in BIRT? Based on the error, it would seem that your server is timing out or something. You don't write any code to connect to you database right, you're simply using a JDBC dataSource? Let me know.