Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Error : Invalid operation: Statement is closed. ERRORCODE=-4470, SQLSTATE=null

    SomeTimes I get this error in my application

    Code:
    2013-11-28 07:20:41,237 - ERROR - q.g.m.e.w.d.CustodyIssueItemDetailDMI - 171 - fetch - -4470
    com.ibm.db2.jcc.am.SqlException: [jcc][10120][10287][4.14.126] Invalid operation: Statement is closed. ERRORCODE=-4470, SQLSTATE=null
    	at com.ibm.db2.jcc.am.ed.a(ed.java:661) ~[db2jcc4.jar:na]
    	at com.ibm.db2.jcc.am.ed.a(ed.java:60) ~[db2jcc4.jar:na]
    	at com.ibm.db2.jcc.am.ed.a(ed.java:103) ~[db2jcc4.jar:na]
    	at com.ibm.db2.jcc.am.fb.d(fb.java:166) ~[db2jcc4.jar:na]
    	at com.ibm.db2.jcc.am.fb.getColumnLabel(fb.java:701) ~[db2jcc4.jar:na]
    	at com.isomorphic.sql.SQLTransform.toAttributeMap(SQLTransform.java:78) ~[isc_isomorphic_sql.jar:na]
    	at com.isomorphic.sql.SQLTransform.toListOfMapsOrBeans(SQLTransform.java:722) ~[isc_isomorphic_sql.jar:na]
    	at com.isomorphic.sql.SQLTransform.toListOfMapsOrBeans(SQLTransform.java:532) ~[isc_isomorphic_sql.jar:na]
    	at com.isomorphic.sql.SQLTransform.toListOfMapsOrBeans(SQLTransform.java:526) ~[isc_isomorphic_sql.jar:na]
    	at com.isomorphic.sql.SQLTransform.toListOfMapsOrBeans(SQLTransform.java:513) ~[isc_isomorphic_sql.jar:na]
    	at com.isomorphic.sql.SQLDataSource.executeWindowedSelect(SQLDataSource.java:2362) ~[isc_isomorphic_sql.jar:na]
    	at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1540) ~[isc_isomorphic_sql.jar:na]
    	at com.isomorphic.sql.SQLDataSource.processRequest(SQLDataSource.java:408) ~[isc_isomorphic_sql.jar:na]
    	at com.isomorphic.sql.SQLDataSource.executeFetch(SQLDataSource.java:352) ~[isc_isomorphic_sql.jar:na]
    	at com.isomorphic.datasource.DataSource.execute(DataSource.java:1447) ~[isc_isomorphic_core_rpc.jar:na]
    	at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:723) ~[isc_isomorphic_core_rpc.jar:na]
    	at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658) ~[isc_isomorphic_core_rpc.jar:na]
    	at com.isomorphic.application.AppBase.execute(AppBase.java:491) ~[isc_isomorphic_core_rpc.jar:na]
    	at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:2431) [isc_isomorphic_core_rpc.jar:na]
    	at qa.gov.moi.erp.web.dmi.CustodyIssueItemDetailDMI.fetch(CustodyIssueItemDetailDMI.java:155) ~[classes/:na]
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0]
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48) ~[na:1.6.0]
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0]
    	at java.lang.reflect.Method.invoke(Method.java:600) ~[na:1.6.0]
    	at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:973) [isc_isomorphic_core_rpc.jar:na]
    	at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:416) [isc_isomorphic_core_rpc.jar:na]
    	at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:64) [isc_isomorphic_core_rpc.jar:na]
    	at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:2427) [isc_isomorphic_core_rpc.jar:na]
    	at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:215) [isc_isomorphic_core_rpc.jar:na]
    	at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:172) [isc_isomorphic_core_rpc.jar:na]
    	at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:137) [isc_isomorphic_core_rpc.jar:na]
    	at com.isomorphic.servlet.IDACall.doPost(IDACall.java:73) [isc_isomorphic_core_rpc.jar:na]
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:738) [javax.j2ee.servlet.jar:na]
    	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152) [isc_isomorphic_core_rpc.jar:na]
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) [javax.j2ee.servlet.jar:na]
    	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1661) [com.ibm.ws.webcontainer.jar:na]
    	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1602) [com.ibm.ws.webcontainer.jar:na]
    	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:149) [com.ibm.ws.webcontainer.jar:na]
    	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:260) [isc_isomorphic_core_rpc.jar:na]
    	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190) [com.ibm.ws.webcontainer.jar:na]
    	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:125) [com.ibm.ws.webcontainer.jar:na]
    	at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:80) [com.ibm.ws.webcontainer.jar:na]
    	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908) [com.ibm.ws.webcontainer.jar:na]
    	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:939) [com.ibm.ws.webcontainer.jar:na]
    	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:507) [com.ibm.ws.webcontainer.jar:na]
    	at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181) [com.ibm.ws.webcontainer.jar:na]
    	at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91) [com.ibm.ws.webcontainer.jar:na]
    	at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:878) [com.ibm.ws.webcontainer.jar:na]
    	at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592) [com.ibm.ws.webcontainer.jar:na]
    	at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:191) [com.ibm.ws.webcontainer.jar:na]
    	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:453) [com.ibm.ws.runtime.jar:na]
    	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:515) [com.ibm.ws.runtime.jar:na]
    	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:306) [com.ibm.ws.runtime.jar:na]
    	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:277) [com.ibm.ws.runtime.jar:na]
    	at com.ibm.ws390.channel.xmem.XMemConnLink.ready(XMemConnLink.java:858) [com.ibm.ws.runtime.ws390.jar:na]
    	at com.ibm.ws390.channel.xmem.XMemInboundChannel.handleRequest(XMemInboundChannel.java:340) [com.ibm.ws.runtime.ws390.jar:na]
    	at com.ibm.ws390.xmem.XMemSRBridgeImpl.httpinvoke(XMemSRBridgeImpl.java:104) [com.ibm.ws.runtime.ws390.jar:na]
    	at com.ibm.ws390.xmem.XMemSRCppUtilities.httpinvoke(XMemSRCppUtilities.java:74) [com.ibm.ws.runtime.ws390.jar:na]
    	at com.ibm.ws390.orb.ServerRegionBridge.httpinvoke(ServerRegionBridge.java:215) [com.ibm.ws.runtime.ws390.jar:na]
    	at com.ibm.ws390.orb.ORBEJSBridge.httpinvoke(ORBEJSBridge.java:281) [com.ibm.ws.runtime.ws390.jar:na]
    	at sun.reflect.GeneratedMethodAccessor93.invoke(Unknown Source) ~[na:na]
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0]
    	at java.lang.reflect.Method.invoke(Method.java:600) ~[na:1.6.0]
    	at com.ibm.ws390.orb.parameters.HTTPInvoke.HTTPInvokeParmSetter(HTTPInvoke.java:101) [bootstrapws390.jar:WAS70.SERV1 [cf291321.01]]
    	at com.ibm.ws390.orb.CommonBridge.nativeRunApplicationThread(Native Method) [com.ibm.ws.runtime.ws390.jar:na]
    	at com.ibm.ws390.orb.CommonBridge.runApplicationThread(CommonBridge.java:472) [com.ibm.ws.runtime.ws390.jar:na]
    	at com.ibm.ws.util.ThreadPool$ZOSWorker.run(ThreadPool.java:1864) [com.ibm.ws.runtime.jar:na]

    As per some IBM references, the following is the reason for this error

    Code:
    Attempted to perform an operation on a Statement object that is already closed. Retrieve a new instance of the Statement object on which to perform the operation.
    it looks like the connection object is closed by a thread and still another thread is trying to use, My solution for this is to change my datasource configuration to make it unsharable instead of sharable then different threads will not use the same connection object

    any comment from your side or any other solution for this issue

    #2
    DataSources are not thread-safe per the documentation, so it sounds like you have implemented the correct fix.

    Comment


      #3
      hello there , can you have a look at the attached logs regarding the same problem (Invalid operation: Statement is closed. ERRORCODE)

      for sizing limitation i divided the log in four files, acually i got this error when I opened my listgrid, this error is not always there but sometimes it appears.
      Attached Files

      Comment


        #4
        From the look of these logs, you are using WebSphere, and allowing it to manage database connections with its own pooling implementation. But SmartClient database connection pooling also seems to be on, so we guess the problem here is that the two pooling strategies are interacting. Since you have a full Java EE server managing connections, you should switch off SmartClient connection pooling by adding this line to your server.properties file:
        Code:
        sql.pool.enabled: false
        You may also wish to review the documentation

        Comment


          #5
          hopefully this will resolve this , thanks for your reply

          Comment

          Working...
          X