14 Replies Latest reply: Jul 25, 2012 9:57 AM by rukbat RSS

    Universal Connection pool exception

    754000

      Hi

      I am having trouble while using UCP on my jboss AS.
      I am using the latest versions of ucp.jar & ojdbc6.jar (11.2.0.1.0)

      Both jars reside on the same lib directory and I ahve no other ojdbc jar on my jboss AS.

      While using the UCP I get the following exception:

      Feb 23, 2010 4:04:16 PM oracle.ucp.jdbc.proxy.PreparedStatementProxyFactory setStatementPooling
      FINER: THROW
      java.lang.IllegalAccessException: Class oracle.ucp.jdbc.proxy.StatementProxyFactory can not access a member of class oracle.jdbc.driver.OraclePreparedStatementWrapper with modifiers "public"


      It looks like some kind of mismatch of classes version between the 2 jars.

      Please help

        • 1. Re: Universal Connection pool exception
          691310
          Can you post the full stack trace? Perhaps it can tell something helpful.
          • 2. Re: Universal Connection pool exception
            tszacon
            Hello,

            Did You resolve this issue ?

            Regards
            Tom

            Edited by: tszacon on Sep 23, 2010 10:49 AM
            • 3. Re: Universal Connection pool exception
              802214
              I have a similar problem. Here is my stack trace. Thanks


              DEBUG oracle.ucp.jdbc.proxy.StatementProxyFactory - THROW
              java.lang.IllegalAccessException: Class oracle.ucp.jdbc.proxy.StatementProxyFactory can not access a member of class oracle.
              jdbc.driver.OraclePreparedStatementWrapper with modifiers "public"
              at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
              at java.lang.reflect.Method.invoke(Method.java:588)
              at oracle.ucp.jdbc.proxy.StatementProxyFactory.setStatementPooling(StatementProxyFactory.java:395)
              at oracle.ucp.jdbc.proxy.StatementProxyFactory.enableStatementPooling(StatementProxyFactory.java:357)
              at oracle.ucp.jdbc.proxy.StatementProxyFactory.checkForStatementPooling(StatementProxyFactory.java:339)
              at oracle.ucp.jdbc.proxy.StatementProxyFactory.<init>(StatementProxyFactory.java:151)
              at oracle.ucp.jdbc.proxy.PreparedStatementProxyFactory.<init>(PreparedStatementProxyFactory.java:83)
              at oracle.ucp.jdbc.proxy.PreparedStatementProxyFactory.createPreparedStatementProxy(PreparedStatementProxyFactory.ja
              va:66)
              at oracle.ucp.jdbc.proxy.ConnectionProxyFactory.proxyInvokeAfterTargetInvoke(ConnectionProxyFactory.java:145)
              at oracle.ucp.jdbc.proxy.JDBCConnectionProxyFactory.invoke(JDBCConnectionProxyFactory.java:266)
              • 4. Re: Universal Connection pool exception
                jschellSomeoneStoleMyAlias
                http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#02_17
                • 5. Re: Universal Connection pool exception
                  821821
                  We are experiencing the same problem, using the most recent jdbc driver and ucp release.
                  I noticed that the exceptions is printed debug logging level. Can we safely ignore the exception?
                  Can we expect that everything will work as it should?

                  Edited by: user3297754 on 07.12.2010 05:33
                  • 6. Re: Universal Connection pool exception
                    jschellSomeoneStoleMyAlias
                    user3297754 wrote:
                    We are experiencing the same problem, using the most recent jdbc driver and ucp release.
                    And what part of the link that I posted did you not understand?
                    • 7. Re: Universal Connection pool exception
                      842088
                      I am planning to use UCP in JBOSS AS 5. Could you please let me know how to configure the datasource file to use UCP?
                      • 8. Re: Universal Connection pool exception
                        850184
                        I have the same issue. No where in my code do I reference the oracle.jdbc.driver package (I checked 5 times) - it's the UCP Proxy calling that class. So how do I fix that then?
                        • 9. Re: Universal Connection pool exception
                          855727
                          This is an internal exception that is caught and logged but does not seem to cause a functional issue from what I can see.
                          The exception (in my case) is not reaching the application code.

                          Thanks
                          • 10. Re: Universal Connection pool exception
                            884827
                            I am running a simple web app under Tomcat 5.5 using ojdbc14.jar (from 10g) and ucp.jar and I am seeing this exception:

                            java.lang.IllegalAccessError: class oracle.jdbc.driver.$Proxy145 cannot access its superinterface oracle.jdbc.driver.ScrollRsetStatement
                                 java.lang.reflect.Proxy.defineClass0(Native Method)
                                 java.lang.reflect.Proxy.getProxyClass(Proxy.java:504)
                                 java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581)
                                 oracle.ucp.jdbc.proxy.CallableStatementProxyFactory.createCallableStatementProxy(CallableStatementProxyFactory.java:63)
                                 oracle.ucp.jdbc.proxy.ConnectionProxyFactory.proxyInvokeAfterTargetInvoke(ConnectionProxyFactory.java:151)
                                 oracle.ucp.jdbc.proxy.JDBCConnectionProxyFactory.invoke(JDBCConnectionProxyFactory.java:221)
                                 $Proxy141.prepareCall(Unknown Source)
                                 xxx.xxx.xxx.FredServlet.doGet(FredServlet.java:42)

                            Both the above jars are in the same directory, $CATALINA_HOME/common/lib and the (trivial) web app code references only Java JDBC classes (so no references to oracle.jdbc or oracle.jdbc.driver).

                            The datasource is configured in Tomcat's server.xml thus:

                            <Resource name="jdbc/xxx" auth="Container"
                            factory="oracle.ucp.jdbc.PoolDataSourceImpl"
                            type="oracle.ucp.jdbc.PoolDataSource"
                            driverClassName="oracle.jdbc.OracleDriver"
                            connectionFactoryClassName="oracle.jdbc.pool.OracleDataSource"
                            url="jdbc:oracle:oci:@xxx"
                            user="xxx"
                            password="xxx"
                            connectionPoolName="xxx"
                            minPoolSize="5"
                            maxPoolSize="50"
                            inactiveConnectionTimeout="600"
                            validateConnectionOnBorrow="true"
                            sqlForValidateConnection="SELECT 1 FROM DUAL"
                            />

                            I have tried different versions of the JVM, I have tried moving the ojdbc14 and ucp jars to $JAVA_HOME/lib/ext, I have tried most things, and I cannot implement a working example of Oracle UCP under Tomcat. Has anybody ever done so, and where did they put these JARs, and were they able to configure the DataSource externally to the web app?
                            • 11. Re: Universal Connection pool exception
                              jschellSomeoneStoleMyAlias
                              881824 wrote:
                              java.lang.IllegalAccessError: class oracle.jdbc.driver.$Proxy145 cannot access its superinterface oracle.jdbc.driver.ScrollRsetStatement
                              On the upside we can be sure that this has nothing to do with the rest of this thread.
                              • 12. Re: Universal Connection pool exception
                                empee
                                Hi,

                                I'm guessing you've probably resolved this issue now, but as I found myself here when I hit this error myself it seems worth adding a comment...

                                The problem is fixed in ucp.jar 11.2.0.2, which can be downloaded from [http://www.oracle.com/technetwork/database/enterprise-edition/downloads/ucp-112010-099129.html]. The readme (downloadable on the same link) covers the problem as "BUG-8883038 java.lang.IllegalAccessException generated when using UCP."

                                Martin
                                • 13. Re: Universal Connection pool exception
                                  gimbal2
                                  Thanks for the effort! If anything this thread which has been hijacked several times can now be put to rest forever :)
                                  • 14. Re: Universal Connection pool exception
                                    Thread locked.
                                    It can now return to its 2010 slumber and not be bothered by resurrection posts again.