Derby
  1. Derby
  2. DERBY-4603

test testBuiltinAuthenticationWithConfigurableHash fails from upgradeTests.Changes10_6 with ibm's j9

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.6.1.0
    • Fix Version/s: 10.6.1.0
    • Component/s: Test
    • Labels:
      None
    • Environment:
      ibm's weme6.2 (j2ME/CDC/Foundation 1.1 profile)
    • Bug behavior facts:
      Regression Test Failure

      Description

      With the patch for DERBY-4602 I saw one error with IBM's weme 6.2:

      1) testBuiltinAuthenticationWithConfigurableHash(org.apache.derbyTesting.functionTests.tests.upgradeTests.Changes10_6)java.sql.SQLException: The message digest algorithm 'SHA-256' is not supported by any of the available cryptography providers. Please install a cryptography provider that supports that algorithm, or specify another algorithm in the derby.authentication.builtin.algorithm property.
      at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
      at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:142)
      at org.apache.derby.impl.jdbc.Util.seeNextException(Util.java:278)
      at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:398)
      at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346)
      at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2269)
      at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81)
      at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1321)
      at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java:1673)
      at org.apache.derby.impl.jdbc.EmbedCallableStatement.executeStatement(EmbedCallableStatement.java:117)
      at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(EmbedPreparedStatement.java:1328)
      at org.apache.derbyTesting.functionTests.tests.upgradeTests.Changes10_6.setPasswords(Changes10_6.java:442)
      at org.apache.derbyTesting.functionTests.tests.upgradeTests.Changes10_6.testBuiltinAuthenticationWithConfigurableHash(Changes10_6.java:384)
      at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:195)
      at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:109)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      Caused by: java.sql.SQLException: Java exception: 'SHA-256: java.security.NoSuchAlgorithmException'.
      at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
      at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:142)
      at org.apache.derby.impl.jdbc.Util.javaException(Util.java:299)
      at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:403)
      ... 111 more
      Caused by: java.security.NoSuchAlgorithmException: SHA-256
      at java.lang.Throwable.<init>(Throwable.java:67)
      at java.security.MessageDigest.getInstance(MessageDigest.java:204)
      at org.apache.derby.impl.jdbc.authentication.AuthenticationServiceBase.encryptPasswordConfigurableScheme(AuthenticationServiceBase.java:549)
      at org.apache.derby.impl.jdbc.authentication.AuthenticationServiceBase.encryptUsingDefaultAlgorithm(AuthenticationServiceBase.java:615)
      at org.apache.derby.impl.jdbc.authentication.AuthenticationServiceBase.map(AuthenticationServiceBase.java:411)
      at org.apache.derby.iapi.services.property.PropertyValidation.doValidateApplyAndMap(PropertyValidation.java:81)
      at org.apache.derby.impl.store.access.PropertyConglomerate.validateApplyAndMap(PropertyConglomerate.java:384)
      at org.apache.derby.impl.store.access.PropertyConglomerate.setProperty(PropertyConglomerate.java:513)
      at org.apache.derby.impl.store.access.RAMTransaction.setProperty(RAMTransaction.java:1795)
      at org.apache.derby.iapi.db.PropertyInfo.setDatabaseProperty(PropertyInfo.java:108)
      at org.apache.derby.catalog.SystemProcedures.SYSCS_SET_DATABASE_PROPERTY(SystemProcedures.java:686)
      at org.apache.derby.exe.ac75629305x0127xb63ax3d55xfffff5235db30.g0(Unknown Source)
      at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:195)
      at org.apache.derby.impl.services.reflect.ReflectMethod.invoke(ReflectMethod.java:46)
      at org.apache.derby.impl.sql.execute.CallStatementResultSet.open(CallStatementResultSet.java:75)
      at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:436)
      at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:317)
      at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1232)

      1. upgrade_sha1.diff
        0.9 kB
        Knut Anders Hatlen

        Activity

        Hide
        Myrna van Lunteren added a comment -

        Test passes again with weme 6.2.

        Show
        Myrna van Lunteren added a comment - Test passes again with weme 6.2.
        Hide
        Knut Anders Hatlen added a comment -

        Committed revision 929891.

        Show
        Knut Anders Hatlen added a comment - Committed revision 929891.
        Hide
        Knut Anders Hatlen added a comment -

        The failing upgrade test case explicitly sets the hash algorithm to SHA-256, but for the test it doesn't really matter which algorithm is used, as long as it's not null. The attached patch makes the test use SHA-1 instead, so that it also passes on platforms without built-in support for SHA-256.

        Show
        Knut Anders Hatlen added a comment - The failing upgrade test case explicitly sets the hash algorithm to SHA-256, but for the test it doesn't really matter which algorithm is used, as long as it's not null. The attached patch makes the test use SHA-1 instead, so that it also passes on platforms without built-in support for SHA-256.

          People

          • Assignee:
            Knut Anders Hatlen
            Reporter:
            Myrna van Lunteren
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development