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

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

    shivaraj mallalli Newbie

      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.