4 Replies Latest reply on Jul 11, 2012 11:29 AM by newway

    Problems connecting to Oracle DB - A result of memory usage configuration

    newway

      Hello All,

       

      I am trying to find a solution (or leads for where to look for a solution) for the following problem:

       

      • I have 2 machines - one is Win2008 the other is win2008R2 - both are 64 bit
      • both  are using java 32bit
      • both of the machines have - 8GB RAM

       

      I supply jboss the following switches that are memory related at startup:

       

      -XX:MaxPermSize=128m -Xms64m -Xmx1500m

       

      on the R2 machine the jboss manages to start without problems

       

      on the other machine - I see that jboss is not able to connect to the DB, I get the errors below, and if I reduce the Xmx to 1024m the connection to the DB is successful.

      note that below is not the full stack trace since it is very long - I pasted the part taken after I switched 'org.jboss.jca' to report in debug

       

       

      28/06/2012 12:56:00,791 DEBUG [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] DefaultDS: getConnection(null, null) [0/200]
      28/06/2012 12:56:00,791 WARN  [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] IJ000604: Throwable while attempting to get a new connection: null: javax.resource.ResourceException: Could not create connection
                at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:277)
                at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:235)
                at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:761)
                at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:343)
                at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:397)
                at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:365)
                at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:329)
                at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:368)
                at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464)
                at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:129)
                at com.oblicore.util.logging.handlers.OracleConnectionHandler.getConnection(OracleConnectionHandler.java:46)
                at com.oblicore.util.logging.DataSourceHandler.publish(DataSourceHandler.java:156)
                at org.jboss.logmanager.handlers.AsyncHandler$AsyncTask.run(AsyncHandler.java:186) [jboss-logmanager-1.2.2.GA.jar:1.2.2.GA]
                at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_16]
      Caused by: java.sql.SQLException: Internal Error: Fetch error message failed!
                at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:757)
                at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:414)
                at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
                at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:162)
                at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:53)
                at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
                at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:249)
                ... 13 more
      
      

       

       

       

      I tried reading around, switched from using encrypted password to plain text password - but got nothing - any ideas?

       

      Thanks,

      Noa

        • 1. Re: Problems connecting to Oracle DB - A result of memory usage configuration
          jbertram

          It's hard to say what is going wrong here because the underlying exception is coming from the Oracle JDBC driver:

           

          Caused by: java.sql.SQLException: Internal Error: Fetch error message failed!

                    at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:757)

                    at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:414)

                    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)

                    at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:162)

                    at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:53)

                    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)

                    at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:249)

                    ... 13 more

           

          Have you researched this exception or asked about it on Oracle-related forums?

          • 2. Re: Problems connecting to Oracle DB - A result of memory usage configuration
            newway

            I tried in Oracle related areas - but looks like I need to try harder - because switching from using the OCI driver to the thin driver solves the problem

             

            So I need to find what is the problem with the OCI.

             

            Thanks,

            Noa

            • 3. Re: Problems connecting to Oracle DB - A result of memory usage configuration
              erce

              It may be that the OCI jar library you are using des not match the oracle OCI client installation, but it is strage that that reducing the max heap would solve this.

              When the versions are not correct, it usually gives problems while you still can connect with the thin driver without any problems.

              I would check on that.

              • 4. Re: Problems connecting to Oracle DB - A result of memory usage configuration
                newway

                just to update - It was related to the oracle configuration on the machine, apparently there were several ORACLE_HOMEs and definitions were clashing.

                 

                don't really understand how the memory definitions worked in one case but not the other

                1 of 1 people found this helpful