1 Reply Latest reply: Nov 25, 2005 3:23 PM by Cdelahun-Oracle RSS

    Frequent DB Connection Errrors

    224336
      Hi,

      we are using Toplink 10.1.2 on Oracle 9i DB, the application runs on AS 10g Release 2.

      The project has been running on such a config for 2 years, the Spring integration package has been integrated about 8months ago.

      And we have always been getting random errors on DB connections, except that they have become increasingly frequent..

      We are using an external datasource, bundled in the ear.
      All the errors we are getting are dealing with decrypting /interpreting the user password... quite weird as we are using a datasource, so the login/pass info are not to be provided in the session.xml...

      We might be experiencing random difficulties to connect to the database server (network level) and it might look like these errors are just a side effect bug on toplink's side while trying to reconnect to the DB...

      Any experience or thought on the issue would be appreciated.

      Here are the session.xml and 2 stacks :
      <toplink-configuration>
      <session>
      <name>SessionBTPFOProduits</name>
      <project-xml>project.xml</project-xml>
      <session-type>
      <server-session/>
      </session-type>
      <login>
      <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
      <datasource>jdbc/ODS</datasource>
      <platform-class>oracle.toplink.oraclespecific.Oracle9Platform</platform-class>
      <uses-native-sequencing>false</uses-native-sequencing>
      <sequence-preallocation-size>50</sequence-preallocation-size>
      <sequence-table>TOPLINK_SEQ</sequence-table>
      <sequence-name-field>SEQ_NAME</sequence-name-field>
      <sequence-counter-field>SEQ_VAL</sequence-counter-field>
      <should-bind-all-parameters>false</should-bind-all-parameters>
      <should-cache-all-statements>false</should-cache-all-statements>
      <uses-string-binding>true</uses-string-binding>
      <uses-batch-writing>false</uses-batch-writing>
      <uses-external-connection-pool>true</uses-external-connection-pool>
      <uses-native-sql>true</uses-native-sql>
      <uses-external-transaction-controller>false</uses-external-transaction-controller>
      </login>
      <enable-logging>true</enable-logging>
      <logging-options/>
      </session>
      </toplink-configuration>

      Exception [TOPLINK-7107] (OracleAS TopLink - 10g (9.0.4.5) (Build 040930)): oracle.toplink.exceptions.ValidationException
      Exception Description: Error encountered during string decryption.
      Internal Exception: java.lang.NegativeArraySizeException
           at oracle.toplink.exceptions.ValidationException.errorDecryptingPassword(ValidationException.java:448)
           at oracle.toplink.internal.security.JCEEncryptor.decryptPassword(JCEEncryptor.java:89)
           at oracle.toplink.sessions.DatabaseLogin.prepareProperties(DatabaseLogin.java:1330)
           at oracle.toplink.sessions.DatabaseLogin.connect(DatabaseLogin.java:218)
           at oracle.toplink.internal.databaseaccess.DatabaseAccessor.reconnect(DatabaseAccessor.java:1323)
           at oracle.toplink.internal.databaseaccess.DatabaseAccessor.incrementCallCount(DatabaseAccessor.java:1198)
           at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:633)
           at oracle.toplink.threetier.ServerSession.executeCall(ServerSession.java:506)
           at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java:131)
           at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java:115)
           at oracle.toplink.internal.queryframework.CallQueryMechanism.executeSelectCall(CallQueryMechanism.java:194)
           at oracle.toplink.internal.queryframework.CallQueryMechanism.selectAllRows(CallQueryMechanism.java:565)
           at oracle.toplink.queryframework.ReadAllQuery.execute(ReadAllQuery.java:447)
           at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:493)
           at oracle.toplink.queryframework.ReadQuery.execute(ReadQuery.java:125)
           at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:1958)
           at oracle.toplink.threetier.ServerSession.internalExecuteQuery(ServerSession.java:629)
           at oracle.toplink.threetier.ClientSession.internalExecuteQuery(ClientSession.java:392)
           at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1086)
           at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1055)
           at oracle.toplink.publicinterface.Session.executeQuery(Session.java:956)


      Exception [TOPLINK-7107] (OracleAS TopLink - 10g (9.0.4.5) (Build 040930)): oracle.toplink.exceptions.ValidationException
      Exception Description: Error encountered during string decryption.
      Internal Exception: java.lang.ArrayIndexOutOfBoundsException
           at oracle.toplink.exceptions.ValidationException.errorDecryptingPassword(ValidationException.java:448)
           at oracle.toplink.internal.security.JCEEncryptor.decryptPassword(JCEEncryptor.java:89)
           at oracle.toplink.sessions.DatabaseLogin.prepareProperties(DatabaseLogin.java:1330)
           at oracle.toplink.sessions.DatabaseLogin.connect(DatabaseLogin.java:218)
           at oracle.toplink.internal.databaseaccess.DatabaseAccessor.reconnect(DatabaseAccessor.java:1323)
           at oracle.toplink.internal.databaseaccess.DatabaseAccessor.incrementCallCount(DatabaseAccessor.java:1198)
           at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:633)
           at oracle.toplink.threetier.ServerSession.executeCall(ServerSession.java:506)
           at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java:131)
           at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java:115)
           at oracle.toplink.internal.queryframework.CallQueryMechanism.selectOneRow(CallQueryMechanism.java:586)
           at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectOneRowFromTable(ExpressionQueryMechanism.java:776)
           at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectOneRow(ExpressionQueryMechanism.java:747)
           at oracle.toplink.queryframework.ReadObjectQuery.execute(ReadObjectQuery.java:364)
           at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:493)
           at oracle.toplink.queryframework.ReadQuery.execute(ReadQuery.java:125)
           at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:1958)
           at oracle.toplink.threetier.ServerSession.internalExecuteQuery(ServerSession.java:629)
           at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1086)
           at oracle.toplink.internal.indirection.QueryBasedValueHolder.instantiate(QueryBasedValueHolder.java:52)
           at oracle.toplink.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:63)


      Thank you,
      Best regards

      Olivier Cuzacq
      Software Architect
      Groupe Moniteur
        • 1. Re: Frequent DB Connection Errrors
          Cdelahun-Oracle
          Hello Olivier

          The issue you are running into is related to bugs 4041572, 3975643, and 3927740 all of which are similar (pretty much one bug). Good news is they have been fixed in TopLink 9.0.4.6. Toplink 10.1.2 is really a different name for 9.0.4.5, so you will need to apply the TopLink 9.0.4.6 patch over top. I believe the 10.1.2 patchset can be found on Metalink using 4125642 as a reference number.


          Best Regards,
          Chris Delahunt