You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Daniel John Debrunner (JIRA)" <ji...@apache.org> on 2008/01/09 23:44:34 UTC

[jira] Commented: (DERBY-3068) testImportExportProcedureNegative(org.apache.derbyTesting.functionTests.tests.tools.ImportExportProcedureTest)junit.framework.ComparisonFailure: Unexpected SQL state. expected:<38000> but was:

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

Daniel John Debrunner commented on DERBY-3068:
----------------------------------------------

I think this could be the fact that the file input is not closed if a failure exists during an import.

In ImportAbstract and Import class where ever this code exists:

    } catch (Exception ex) {
		throw LoadError.unexpectedError(ex);
	}

instead there should probably be something like:

    } catch (Exception ex) {
		throw importError(ex);
	}

and a new importError method that does something like:

SQLException importError(Exception ex) {
    if (importReadData != null)
	   importReadData.closeStream(); // << need to add try/catch block here.
    throw LoadError.unexpectedError(ex);
    
}

> testImportExportProcedureNegative(org.apache.derbyTesting.functionTests.tests.tools.ImportExportProcedureTest)junit.framework.ComparisonFailure: Unexpected SQL state. expected:<38000> but was:<XIE0S>
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3068
>                 URL: https://issues.apache.org/jira/browse/DERBY-3068
>             Project: Derby
>          Issue Type: Bug
>          Components: Regression Test Failure
>    Affects Versions: 10.4.0.0
>         Environment: Windows XP IBM 1.5
>            Reporter: Kathey Marsden
>
> 1) testImportExportProcedureNegative(org.apache.derbyTesting.functionTests.tests.tools.ImportExportProcedureTest)junit.framework.ComparisonFailure: Unexpected SQL state. expected:<38000> but was:<XIE0S>
> 	at org.apache.derbyTesting.junit.BaseJDBCTestCase.assertSQLState(BaseJDBCTestCase.java:668)
> 	at org.apache.derbyTesting.junit.BaseJDBCTestCase.assertSQLState(BaseJDBCTestCase.java:717)
> 	at org.apache.derbyTesting.junit.BaseJDBCTestCase.assertStatementError(BaseJDBCTestCase.java:898)
> 	at org.apache.derbyTesting.functionTests.tests.tools.ImportExportProcedureTest.testImportExportProcedureNegative(ImportExportProcedureTest.java:1933)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:95)
> 	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.SQLException: The export operation was not performed, because the specified output file (extinout/t1.dat) already exists. Export processing will not overwrite an existing file, even if the process has permissions to write to that file, due to security concerns, and to avoid accidental file damage. Please either change the output file name in the export procedure arguments to specify a file which does not exist, or delete the existing file, then retry the export operation.
> 	at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
> 	at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
> 	at org.apache.derby.client.am.PreparedStatement.execute(Unknown Source)
> 	at org.apache.derbyTesting.junit.BaseJDBCTestCase.assertStatementError(BaseJDBCTestCase.java:893)
> 	... 45 more
> Caused by: org.apache.derby.client.am.SqlException: The export operation was not performed, because the specified output file (extinout/t1.dat) already exists. Export processing will not overwrite an existing file, even if the process has permissions to write to that file, due to security concerns, and to avoid accidental file damage. Please either change the output file name in the export procedure arguments to specify a file which does not exist, or delete the existing file, then retry the export operation.
> 	at org.apache.derby.client.am.Statement.completeExecute(Unknown Source)
> 	at org.apache.derby.client.net.NetStatementReply.parseEXCSQLSTTreply(Unknown Source)
> 	at org.apache.derby.client.net.NetStatementReply.readExecuteCall(Unknown Source)
> 	at org.apache.derby.client.net.StatementReply.readExecuteCall(Unknown Source)
> 	at org.apache.derby.client.net.NetStatement.readExecuteCall_(Unknown Source)
> 	at org.apache.derby.client.am.Statement.readExecuteCall(Unknown Source)
> 	at org.apache.derby.client.am.PreparedStatement.flowExecute(Unknown Source)
> 	at org.apache.derby.client.am.PreparedStatement.executeX(Unknown Source)
> 	... 47 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.