db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramin Moazeni" <rmoaz...@gmail.com>
Subject Re: [jira] Created: (DERBY-2925) Prevent export from overwriting existing files
Date Mon, 30 Jul 2007 17:38:56 GMT
Hi,

Thanks for the email Kathey.
To answer your questions:
The only test that is failing is tools/ImportExportProcedureTest.java
and it always fails at testImportExportProcedureNegative method.
The failure is at this line
cSt = prepareCall(
            "call SYSCS_UTIL.SYSCS_EXPORT_TABLE ('IEP', 'T1' , "
            + "'extout/nodir/t1.dat' , null, null, null) ");
where I get (java.io.FilePermission extout/nodir/t1.dat read):
java.security.AccessControlException'.

I think the problem is in suites.All and the order in which the tests
are being executed...I wonder if the order really matters?

if I make the following change, the suite.All test will finish without
any error:
+++ java/testing/org/apache/derbyTesting/functionTests/suites/AllPackages.java
(working copy)
@@ -50,12 +50,12 @@
     public static Test suite() throws Exception {

         TestSuite suite = new TestSuite("AllPackages");
-
+
+       suite.addTest(org.apache.derbyTesting.functionTests.tests.tools._Suite.suite());
         suite.addTest(org.apache.derbyTesting.functionTests.tests.derbynet._Suite.suite());
         suite.addTest(org.apache.derbyTesting.functionTests.tests.lang._Suite.suite());
         suite.addTest(org.apache.derbyTesting.functionTests.tests.jdbcapi._Suite.suite());
         suite.addTest(org.apache.derbyTesting.functionTests.tests.store._Suite.suite());
-        suite.addTest(org.apache.derbyTesting.functionTests.tests.tools._Suite.suite());

Does some of these tests change security parameters that will cause failure
for the DERBY-2925 patch? I wonder if the above change is ok?

Please note that both derbyall and suites.All finished without failure after the
above change.

Thanks
Ramin



On 7/27/07, Kathey Marsden <kmarsdenderby@sbcglobal.net> wrote:
> Ramin Moazeni wrote:
> > After making the above change, when I run junit test for the
> > individual test or _Suite, the test passes without any failures.
> > However, suites.All still fails with the same error messages as below.
> >
> >
> Just some random thoughts/questions on this...
> Is this the only test that is failing after your changes? Is it only
> with network server that it fails?  If it fails with embedded, do you
> have the embedded trace? There is a policy file util/nwsvr.policy.  I
> thought that wasn't used anymore, but maybe it is for network server?
>
> My only idea was that we might need:
> permission java.io.FilePermission "${user.dir}${/}extout", "read,write";
>
> to read whether the directory extout/nodir existed, but you mentioned to
> me on IRC that that didn't work, so I don't have any other ideas just
> yet.  I hope someone else does.
>
> Kathey
>
>
> > I wonder if someone has seen this or might have any recommendations?
> >
> > Thanks
> > Ramin
> >
> >
> > testImportExportProcedureNegative(org.apache.derbyTesting.functionTests.tests.tools.ImportExportProcedureTest)junit.framework.ComparisonFailure:
> > Unexpected SQL state. expected:<...IE0I> but was:<...J001>
> >        at org.apache.derbyTesting.junit.BaseJDBCTestCase.assertSQLState(BaseJDBCTestCase.java:624)
> >        at org.apache.derbyTesting.junit.BaseJDBCTestCase.assertSQLState(BaseJDBCTestCase.java:659)
> >        at org.apache.derbyTesting.junit.BaseJDBCTestCase.assertSQLState(BaseJDBCTestCase.java:673)
> >        at org.apache.derbyTesting.junit.BaseJDBCTestCase.assertStatementError(BaseJDBCTestCase.java:854)
> >        at org.apache.derbyTesting.functionTests.tests.tools.ImportExportProcedureTest.testImportExportProcedureNegative(ImportExportProcedureTest.java:1923)
> >        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: Java exception: 'Access denied
> > (java.io.FilePermission extout/nodir/t1.dat read):
> > java.security.AccessControlException'.
> >        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.SqlException.getSQLException(Unknown
> > Source)
> >        at org.apache.derby.client.am.PreparedStatement.execute(Unknown Source)
> >        at org.apache.derbyTesting.junit.BaseJDBCTestCase.assertStatementError(BaseJDBCTestCase.java:849)
> >        ... 45 more
> > Caused by: org.apache.derby.client.am.SqlException: Java exception:
> > 'Access denied (java.io.FilePermission extout/nodir/t1.dat read):
> > java.security.AccessControlException'.
> >        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.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)
> >
>
>
>

Mime
View raw message