db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6702) test failure in NSSecurityMechanismTest; The expected SQL state must be five characters long
Date Fri, 05 Sep 2014 07:29:24 GMT

    [ https://issues.apache.org/jira/browse/DERBY-6702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14122549#comment-14122549
] 

Knut Anders Hatlen commented on DERBY-6702:
-------------------------------------------

With the current code, we get the stack trace of the underlying error, because the assert
error has the underlying error in its getCause() chain. With the patch, I think we only get
the error message of the underlying error, and in the case of an XJ001 error, we don't even
get the error message reported, just an assert saying a failure happened. So it seems to me
that we get less information about failures with the patch.

Have you tested that the workaround works? Since the SQLException is generated in Derby code,
I wouldn't expect it to have NativeSeedGenerator in its stack trace. I would expect that you
would have to follow the exception chain till you got the InternalError, and then check the
stack trace of that error.

Maybe also print a message using alarm() if the failure has been ignored, so that we can see
from the test log if this has happened?

> test failure in NSSecurityMechanismTest; The expected SQL state must be five characters
long
> --------------------------------------------------------------------------------------------
>
>                 Key: DERBY-6702
>                 URL: https://issues.apache.org/jira/browse/DERBY-6702
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.12.0.0
>            Reporter: Myrna van Lunteren
>         Attachments: DERBY-6702_tst.diff
>
>
> Saw this in a nightly run against trunk (10.12.0.0 alpha - (1617392)) with jdk 1.8 (not
reported on my public page):
> 1) testNetworkServerSecurityMechanism(org.apache.derbyTesting.functionTests.tests.derbynet.NSSecurityMechanismTest)junit.framework.AssertionFailedError:
The expected SQL state must be five characters long
> 	at org.apache.derbyTesting.junit.BaseJDBCTestCase.assertSQLState(BaseJDBCTestCase.java:873)
> 	at org.apache.derbyTesting.junit.BaseJDBCTestCase.assertSQLState(BaseJDBCTestCase.java:940)
> 	at org.apache.derbyTesting.functionTests.tests.derbynet.NSSecurityMechanismTest.assertConnectionUsingDriverManager(NSSecurityMechanismTest.java:581)
> 	at org.apache.derbyTesting.functionTests.tests.derbynet.NSSecurityMechanismTest.assertConnectionsUsingDriverManager(NSSecurityMechanismTest.java:437)
> 	at org.apache.derbyTesting.functionTests.tests.derbynet.NSSecurityMechanismTest.testNetworkServerSecurityMechanism(NSSecurityMechanismTest.java:291)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:118)
> 	at org.apache.derbyTesting.junit.BaseJDBCTestCase.runBareOverridable(BaseJDBCTestCase.java:440)
> 	at org.apache.derbyTesting.junit.BaseJDBCTestCase.runBare(BaseJDBCTestCase.java:457)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> 	at junit.extensions.TestSetup.run(TestSetup.java:25)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> 	at junit.extensions.TestSetup.run(TestSetup.java:25)
> Caused by: java.sql.SQLException: Java exception: 'Unexpected CryptoAPI failure generating
seed: java.lang.InternalError'.
> 	at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
> 	at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
> 	at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:664)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:270)
> 	at org.apache.derbyTesting.functionTests.tests.derbynet.NSSecurityMechanismTest.assertConnectionUsingDriverManager(NSSecurityMechanismTest.java:541)
> 	... 37 more
> Caused by: ERROR XJ001: Java exception: 'Unexpected CryptoAPI failure generating seed:
java.lang.InternalError'.
> 	at org.apache.derby.client.net.NetConnection.flowConnect(Unknown Source)
> 	at org.apache.derby.client.net.NetConnection.<init>(Unknown Source)
> 	at org.apache.derby.client.net.ClientJDBCObjectFactoryImpl.newNetConnection(Unknown
Source)
> 	... 41 more
> Caused by: java.lang.InternalError: Unexpected CryptoAPI failure generating seed
> 	at sun.security.provider.NativeSeedGenerator.getSeedBytes(NativeSeedGenerator.java:62)
> 	at sun.security.provider.SeedGenerator.generateSeed(SeedGenerator.java:144)
> 	at sun.security.provider.SecureRandom.engineGenerateSeed(SecureRandom.java:128)
> 	at java.security.SecureRandom.generateSeed(SecureRandom.java:522)
> 	at org.apache.derby.client.am.EncryptionManager.generateSeed(Unknown Source)
> 	at org.apache.derby.client.net.NetConnection.initializeClientSeed(Unknown Source)
> 	at org.apache.derby.client.net.NetConnection.flowUSRSSBPWDconnect(Unknown Source)
> 	... 44 more
> This test passed with this jvm on August 6 (with trunk at revision 1616382), but also
failed on August 8 (with trunk at revision 1616916).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message