Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-9470

JDBC statement.getConnection() fails from org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService.doStatementMethod

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: EAP_EWP 5.1.2
    • Fix Version/s: EAP_EWP 5.2.0
    • Component/s: JCA
    • Labels:
      None
    • Affects:
      Release Notes
    • Release Notes Text:
      Hide
      The <systemitem>org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService.doStatementMethod</systemitem> method did not return a proxied connection. Consequently, when the <systemitem>statement.getConnection()</systemitem> JDBC API method was called from an application, the following exception was thrown:

      <screen>
      Caused by: java.lang.IllegalAccessException: Method=public abstract java.sql.Connection java.sql.Statement.getConnection() throws java.sql.SQLException does not return Serializable
      at org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService.doStatementMethod(WrapperDataSourceService.java:422)
      at org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService.invoke(WrapperDataSourceService.java:227)
      at sun.reflect.GeneratedMethodAccessor165.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      </screen>

      With this update, a proxied connection is returned, which eliminates the above mentioned exception and enables successful calls of the <systemitem>statement.getConnection()</systemitem> method.
      Show
      The <systemitem>org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService.doStatementMethod</systemitem> method did not return a proxied connection. Consequently, when the <systemitem>statement.getConnection()</systemitem> JDBC API method was called from an application, the following exception was thrown: <screen> Caused by: java.lang.IllegalAccessException: Method=public abstract java.sql.Connection java.sql.Statement.getConnection() throws java.sql.SQLException does not return Serializable at org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService.doStatementMethod(WrapperDataSourceService.java:422) at org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService.invoke(WrapperDataSourceService.java:227) at sun.reflect.GeneratedMethodAccessor165.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) </screen> With this update, a proxied connection is returned, which eliminates the above mentioned exception and enables successful calls of the <systemitem>statement.getConnection()</systemitem> method.
    • Release Notes Docs Status:
      Documented as Resolved Issue
    • Docs QE Status:
      NEW

      Description

      When JDBC API statement.getConnection() is called from an application (in this case a standalone app), the following stack trace is encountered:

      Caused by: java.lang.IllegalAccessException: Method=public abstract java.sql.Connection java.sql.Statement.getConnection() throws java.sql.SQLException does not return Serializable
      at org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService.doStatementMethod(WrapperDataSourceService.java:422)
      at org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService.invoke(WrapperDataSourceService.java:227)
      at sun.reflect.GeneratedMethodAccessor165.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      Looking at org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService code in method "doStatementMethod", it does not return a proxied connection. A proxied connection should be returned like the following:

      if( value instanceof Connection )

      { value = createConnectionProxy(value); }

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jeff.zhang Jeff Zhang
                Reporter:
                dchia David Chia
                Writer:
                Petr Penicka
              • Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: