1 Reply Latest reply on Dec 7, 2010 6:41 AM by f_marchioni

    Resultset,statements getting closed issue in jboss-5.1.0.GA

    mallalli

      Hi Experts,

       

      I have exposed my DataSource over JNDI (to an external  JVM) from jboss-5.1.0.GA by setting use-java-context to false. The external  process is multi-threaded and doing a lot of database queries. I am  getting the following exception periodically...

      _________________________

      java.sql.SQLException: Failed to find Statement: 791406078
      at org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService.invoke(WrapperDataSourceService.java:224)
      at sun.reflect.GeneratedMethodAccessor300.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:592)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
      at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:855)
      at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:422)..

      -----------------------------------------------------------------------------------

      Caused by: java.lang.IllegalAccessException: Failed to find ResultSet: 1947115955

      at org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService.invoke(WrapperDataSourceService.java:234)
      at sun.reflect.GeneratedMethodAccessor300.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:592)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
      at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:855)
      at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:422)
      at sun.reflect.GeneratedMethodAccessor299.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ......
      -----------------------------------------------------------------------------------

      also find my DS file

       

      <local-tx-datasource>
          <jndi-name>OracleDS</jndi-name>
          <use-java-context>false</use-java-context>
          <connection-url>******</connection-url>
          <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
          <user-name>******</user-name>
          <password>******</password>
          <min-pool-size>4</min-pool-size>
          <max-pool-size>40</max-pool-size>
          <idle-timeout-minutes>30</idle-timeout-minutes>
          <blocking-timeout-millis>65000</blocking-timeout-millis>
          <set-tx-query-timeout>true</set-tx-query-timeout>
          <track-statements>true</track-statements>
        </local-tx-datasource>

      -----------------------------------------------------------------------------------

      I have checked my java code for cross reference of resultset or statements and there are none. From my java side i am closing all the resultsets and statements with proper try catch and finally blocks.

       

      Is this issue happening because i am using jboss Datasource outside its container?? or Is this a issue with WrapperDataSource giving duplicate id to resultsets and statements so when i close one resultset the other also gets closed ?

       

      Please help me with this.

        • 1. Re: Resultset,statements getting closed issue in jboss-5.1.0.GA
          f_marchioni

          That's an odd error which does not seem related with JNDI.

          Post some more info about the ManagedConnectionPool Mbean (jboss.jca domain). Like the InUseConnectionCount which should be captured with some scripts (hint: use twiddle). As the error should be in the layer between the application server and the database, you should investigate also your thin driver, if it's the correct one for your Oracle version (have a look in the META-INF folder of the driver).

          kind regards,

          Francesco

          jBoss tutorials