[
https://issues.apache.org/jira/browse/DERBY-4804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12914143#action_12914143
]
Myrna van Lunteren edited comment on DERBY-4804 at 9/23/10 2:28 PM:
--------------------------------------------------------------------
Unfortunately, this test did now fail on OS/400 (with ibm 1.6):
1)
testOSReadOnly(org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest)junit.framework.ComparisonFailure:
Unexpected SQL state. expected:<25502> but was:<40XD1>
at java.lang.Throwable.<init>(Throwable.java:196)
at java.lang.Error.<init>(Error.java:49)
at
junit.framework.AssertionFailedError.<init>(AssertionFailedError.java:11)
at junit.framework.ComparisonFailure.<init>(ComparisonFailure.java:19)
at
org.apache.derbyTesting.junit.BaseJDBCTestCase.assertSQLState(BaseJDBCTestCase.java:751)
at
org.apache.derbyTesting.junit.BaseJDBCTestCase.assertSQLState(BaseJDBCTestCase.java:814)
at
org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest.assertExpectedInsertBehaviour(OSReadOnlyTest.java:271)
at
org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest.testOSReadOnly(OSReadOnlyTest.java:146)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:88)
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)
Caused by: java.sql.SQLTransactionRollbackException: Container was opened in
read-only mode.
at java.lang.Throwable.<init>(Throwable.java:218)
at java.lang.Exception.<init>(Exception.java:59)
at java.sql.SQLException.<init>(SQLException.java:218)
at
java.sql.SQLTransactionRollbackException.<init>(SQLTransactionRollbackException.java:148)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown
Source)
at
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown
Source)
at
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown
Source)
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(Unknown
Source)
at
org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest.assertExpectedInsertBehaviour(OSReadOnlyTest.java:267)
... 42 more
Caused by: java.sql.SQLException: Container was opened in read-only mode.
at java.lang.Throwable.<init>(Throwable.java:196)
at java.lang.Exception.<init>(Exception.java:41)
at java.sql.SQLException.<init>(SQLException.java:52)
at org.apache.derby.impl.jdbc.EmbedSQLException.<init>(Unknown Source)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
Source)
... 52 more
Caused by: ERROR 40XD1: Container was opened in read-only mode.
at java.lang.Throwable.<init>(Throwable.java:196)
at java.lang.Exception.<init>(Exception.java:41)
at org.apache.derby.iapi.error.StandardException.<init>(Unknown Source)
at org.apache.derby.iapi.error.StandardException.<init>(Unknown Source)
at org.apache.derby.iapi.error.StandardException.newException(Unknown
Source)
at org.apache.derby.impl.store.raw.data.BaseContainer.use(Unknown
Source)
at
org.apache.derby.impl.store.raw.data.BaseContainerHandle.useContainer(Unknown
Source)
at
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unknown
Source)
at
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unknown
Source)
at org.apache.derby.impl.store.raw.xact.Xact.openContainer(Unknown
Source)
at
org.apache.derby.impl.store.access.conglomerate.OpenConglomerate.init(Unknown
Source)
at org.apache.derby.impl.store.access.heap.Heap.open(Unknown Source)
at
org.apache.derby.impl.store.access.RAMTransaction.openConglomerate(Unknown
Source)
at
org.apache.derby.impl.store.access.RAMTransaction.openCompiledConglomerate(Unknown
Source)
at
org.apache.derby.impl.sql.execute.RowChangerImpl.openForUpdate(Unknown Source)
at org.apache.derby.impl.sql.execute.RowChangerImpl.open(Unknown Source)
at org.apache.derby.impl.sql.execute.RowChangerImpl.open(Unknown Source)
at
org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown
Source)
at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown
Source)
at
org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown
Source)
... 46 more
2)
testOSReadOnly(org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest)junit.framework.ComparisonFailure:
Unexpected SQL state. expected:<25502> but was:<40XD1>
at java.lang.Throwable.<init>(Throwable.java:196)
at java.lang.Error.<init>(Error.java:49)
at
junit.framework.AssertionFailedError.<init>(AssertionFailedError.java:11)
at junit.framework.ComparisonFailure.<init>(ComparisonFailure.java:19)
at
org.apache.derbyTesting.junit.BaseJDBCTestCase.assertSQLState(BaseJDBCTestCase.java:751)
at
org.apache.derbyTesting.junit.BaseJDBCTestCase.assertSQLState(BaseJDBCTestCase.java:814)
at
org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest.assertExpectedInsertBehaviour(OSReadOnlyTest.java:271)
at
org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest.testOSReadOnly(OSReadOnlyTest.java:146)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:88)
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)
Caused by: java.sql.SQLTransactionRollbackException: Container was opened in
read-only mode.
at java.lang.Throwable.<init>(Throwable.java:196)
at java.lang.Exception.<init>(Exception.java:41)
at java.sql.SQLException.<init>(SQLException.java:52)
at
java.sql.SQLTransactionRollbackException.<init>(SQLTransactionRollbackException.java:82)
at
org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.client.am.SqlException.getSQLException(Unknown
Source)
at org.apache.derby.client.am.Statement.executeUpdate(Unknown Source)
at
org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest.assertExpectedInsertBehaviour(OSReadOnlyTest.java:267)
... 51 more
Caused by: org.apache.derby.client.am.SqlException: Container was opened in
read-only mode.
at java.lang.Throwable.<init>(Throwable.java:181)
at java.lang.Exception.<init>(Exception.java:29)
at org.apache.derby.client.am.SqlException.<init>(Unknown Source)
at org.apache.derby.client.am.SqlException.<init>(Unknown Source)
at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
at
org.apache.derby.client.am.Statement.completeExecuteImmediate(Unknown Source)
at
org.apache.derby.client.net.NetStatementReply.parseEXCSQLIMMreply(Unknown
Source)
at
org.apache.derby.client.net.NetStatementReply.readExecuteImmediate(Unknown
Source)
at
org.apache.derby.client.net.StatementReply.readExecuteImmediate(Unknown Source)
at
org.apache.derby.client.net.NetStatement.readExecuteImmediate_(Unknown Source)
at org.apache.derby.client.am.Statement.readExecuteImmediate(Unknown
Source)
at org.apache.derby.client.am.Statement.flowExecute(Unknown Source)
at org.apache.derby.client.am.Statement.executeUpdateX(Unknown Source)
... 53 more
I will try to figure out what's different, but suggestions are welcome.
I am running these tests in the 'qsh', and I remember from past experiences
with read/write experiments on this OS though that it's possible that file/dir
permissions on the OS level prevent modifications in read/write permissions in
the qsh level, so that could be one reason...
was (Author: myrna):
Unfortunately, this test did now fail on OS/400 (with ibm 1.6):
1)
testOSReadOnly(org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest)junit.framework.ComparisonFailure:
Unexpected SQL state. expected:<25502> but was:<40XD1>
at java.lang.Throwable.<init>(Throwable.java:196)
at java.lang.Error.<init>(Error.java:49)
at
junit.framework.AssertionFailedError.<init>(AssertionFailedError.java:11)
at junit.framework.ComparisonFailure.<init>(ComparisonFailure.java:19)
at
org.apache.derbyTesting.junit.BaseJDBCTestCase.assertSQLState(BaseJDBCTestCase.java:751)
at
org.apache.derbyTesting.junit.BaseJDBCTestCase.assertSQLState(BaseJDBCTestCase.java:814)
at
org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest.assertExpectedInsertBehaviour(OSReadOnlyTest.java:271)
at
org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest.testOSReadOnly(OSReadOnlyTest.java:146)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:88)
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)
Caused by: java.sql.SQLTransactionRollbackException: Container was opened in
read-only mode.
at java.lang.Throwable.<init>(Throwable.java:218)
at java.lang.Exception.<init>(Exception.java:59)
at java.sql.SQLException.<init>(SQLException.java:218)
at
java.sql.SQLTransactionRollbackException.<init>(SQLTransactionRollbackException.java:148)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown
Source)
at
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown
Source)
at
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown
Source)
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(Unknown
Source)
at
org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest.assertExpectedInsertBehaviour(OSReadOnlyTest.java:267)
... 42 more
Caused by: java.sql.SQLException: Container was opened in read-only mode.
at java.lang.Throwable.<init>(Throwable.java:196)
at java.lang.Exception.<init>(Exception.java:41)
at java.sql.SQLException.<init>(SQLException.java:52)
at org.apache.derby.impl.jdbc.EmbedSQLException.<init>(Unknown Source)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
Source)
... 52 more
Caused by: ERROR 40XD1: Container was opened in read-only mode.
at java.lang.Throwable.<init>(Throwable.java:196)
at java.lang.Exception.<init>(Exception.java:41)
at org.apache.derby.iapi.error.StandardException.<init>(Unknown Source)
at org.apache.derby.iapi.error.StandardException.<init>(Unknown Source)
at org.apache.derby.iapi.error.StandardException.newException(Unknown
Source)
at org.apache.derby.impl.store.raw.data.BaseContainer.use(Unknown
Source)
at
org.apache.derby.impl.store.raw.data.BaseContainerHandle.useContainer(Unknown
Source)
at
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unknown
Source)
at
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unknown
Source)
at org.apache.derby.impl.store.raw.xact.Xact.openContainer(Unknown
Source)
at
org.apache.derby.impl.store.access.conglomerate.OpenConglomerate.init(Unknown
Source)
at org.apache.derby.impl.store.access.heap.Heap.open(Unknown Source)
at
org.apache.derby.impl.store.access.RAMTransaction.openConglomerate(Unknown
Source)
at
org.apache.derby.impl.store.access.RAMTransaction.openCompiledConglomerate(Unknown
Source)
at
org.apache.derby.impl.sql.execute.RowChangerImpl.openForUpdate(Unknown Source)
at org.apache.derby.impl.sql.execute.RowChangerImpl.open(Unknown Source)
at org.apache.derby.impl.sql.execute.RowChangerImpl.open(Unknown Source)
at
org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown
Source)
at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown
Source)
at
org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown
Source)
... 46 more
2)
testOSReadOnly(org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest)junit.framework.ComparisonFailure:
Unexpected SQL state. expected:<25502> but was:<40XD1>
at java.lang.Throwable.<init>(Throwable.java:196)
at java.lang.Error.<init>(Error.java:49)
at
junit.framework.AssertionFailedError.<init>(AssertionFailedError.java:11)
at junit.framework.ComparisonFailure.<init>(ComparisonFailure.java:19)
at
org.apache.derbyTesting.junit.BaseJDBCTestCase.assertSQLState(BaseJDBCTestCase.java:751)
at
org.apache.derbyTesting.junit.BaseJDBCTestCase.assertSQLState(BaseJDBCTestCase.java:814)
at
org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest.assertExpectedInsertBehaviour(OSReadOnlyTest.java:271)
at
org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest.testOSReadOnly(OSReadOnlyTest.java:146)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:88)
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)
Caused by: java.sql.SQLTransactionRollbackException: Container was opened in
read-only mode.
at java.lang.Throwable.<init>(Throwable.java:196)
at java.lang.Exception.<init>(Exception.java:41)
at java.sql.SQLException.<init>(SQLException.java:52)
at
java.sql.SQLTransactionRollbackException.<init>(SQLTransactionRollbackException.java:82)
at
org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.client.am.SqlException.getSQLException(Unknown
Source)
at org.apache.derby.client.am.Statement.executeUpdate(Unknown Source)
at
org.apache.derbyTesting.functionTests.tests.store.OSReadOnlyTest.assertExpectedInsertBehaviour(OSReadOnlyTest.java:267)
... 51 more
Caused by: org.apache.derby.client.am.SqlException: Container was opened in
read-only mode.
at java.lang.Throwable.<init>(Throwable.java:181)
at java.lang.Exception.<init>(Exception.java:29)
at org.apache.derby.client.am.SqlException.<init>(Unknown Source)
at org.apache.derby.client.am.SqlException.<init>(Unknown Source)
at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
at
org.apache.derby.client.am.Statement.completeExecuteImmediate(Unknown Source)
at
org.apache.derby.client.net.NetStatementReply.parseEXCSQLIMMreply(Unknown
Source)
at
org.apache.derby.client.net.NetStatementReply.readExecuteImmediate(Unknown
Source)
at
org.apache.derby.client.net.StatementReply.readExecuteImmediate(Unknown Source)
at
org.apache.derby.client.net.NetStatement.readExecuteImmediate_(Unknown Source)
at org.apache.derby.client.am.Statement.readExecuteImmediate(Unknown
Source)
at org.apache.derby.client.am.Statement.flowExecute(Unknown Source)
at org.apache.derby.client.am.Statement.executeUpdateX(Unknown Source)
... 53 more
I will try to figure out what's different, but suggestions are welcome.
I am running these tests in the 'qsh', and I remember from past experiences
with read/write experiments on this OS though that instructions re file/dir
access on the 'qsh' level may not always make it through to the OS level, so
that could be interfering...
> Make database used in store.OSReadOnlyTest fully read-only
> ----------------------------------------------------------
>
> Key: DERBY-4804
> URL: https://issues.apache.org/jira/browse/DERBY-4804
> Project: Derby
> Issue Type: Improvement
> Components: Test
> Affects Versions: 10.7.0.0
> Reporter: Kristian Waagan
> Assignee: Kristian Waagan
> Priority: Minor
> Fix For: 10.7.0.0
>
> Attachments: derby-4804-1a-test_change.diff,
> derby-4804-2a-common_file_ops.diff
>
>
> store.OSReadOnlyTest is supposed to emulate running Derby on a read-only
> media, but it turns out the database directory isn't made read-only - only
> the files inside the directories are.
> See http://db.markmail.org/thread/f3qlfx7teg7yk5hr for more details.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.