5 Replies Latest reply: Jan 26, 2009 11:47 AM by 681698 RSS

    OALL8 is in an inconsistent state


      I am using 9.0.3 app server. I have a datasource with datasource class 'oracle.jdbc.pool.OracleConnectionCacheImpl' and JDBC Driver oracle.jdbc.driver.OracleDriver.

      Our oracle database gets restarted every night, so there will be some staled connections in the pool.. and when I use the application after the database is restarted I get the following error:

      java.sql.SQLException: OALL8 is in an inconsistent state.
           at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)
           at oracle.jdbc.driver.T4C8Oall.init(T4C8Oall.java:308)
           at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:166)
           at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatement.java:661)
           at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:893)
           at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:693)
           at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:988)
           at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2884)
           at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:2925)

      I set the following connection attributes:


      Is n't it automatically remove the staled connections and give fresh connections ?

      Thanks for any inputs, Kiran
        • 1. Re: OALL8 is in an inconsistent state
          Hi Kiran,

          In 9.0.3 we did not have an option of stale pool checking, so if you restart your DB everynight, you will have to bounce the OC4J instance as well. This funcionality has been introduced in 10.1.2.x

          Hope this answers your question.

          • 2. Re: OALL8 is in an inconsistent state
            Thanks Deepak for your response.

            Can I use any other datasource class (like com.evermind.sql.DriverManagerDataSource) which has stale pool checking? Both options, bouncing OC4J or Upgrading to 10.1.3 are not feasible for me.

            • 3. Re: OALL8 is in an inconsistent state
              Hi Kiran,

              I am pretty sure that in 9.0.3 DriverManagerDataSource did not support stale connection checking. and I don't think OracleConnectionCacheImpl does either (at least there is no way through the config files).

              The only option might be through code, i.e. your application checks for stale connections since there is some driver settings that you could modify through code. I would suggest posting your question in the JDBC forum and do mention that you are running on OC4J and is there a way in the driver that you could check for stale connections, through code.

              Hope this helps.

              • 4. Re: OALL8 is in an inconsistent state
                Thanks for your inputs.

                I wrote a patch, that will check the validity of connection before it gets used.. This code will keep getting the connection from the datasource until it gets a good connection.. Though it is not a very elegant solution.. atleast I can live with for now..

                • 5. Re: OALL8 is in an inconsistent state
                  hi, my name is klever, i would like how to control the connection's lost, because it affecst to much to my app, and the users are fourios. please i'll wait your answers.

                  thank you.