[ 
https://issues.apache.org/jira/browse/DERBY-6413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Myrna van Lunteren resolved DERBY-6413.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 10.7.1.4
                   10.6.2.3
                   10.5.3.2
                   10.4.2.1
                   10.3.3.1
         Assignee: Myrna van Lunteren

Implemented the change to run the affected tests without security manager in 
branches 10.7 to 10.3.
With thanks to Knut Anders for fixing up commit messages with muddled JIRA 
numbers. 

It does indeed not make much sense to keep this open because now the tests pass.

If someone finds this affecting them in production upon upgrading to IBM jvm 
1.6 SR15 (and IBM jvm 1.7 SR6, although I think that's untested with older 
derby releases), then they have the following options:
1. move from whatever old release of Derby they're on to a newer version (newer 
than 10.7, preferably of course the latest).
2. 
   a. stay on the old jvm
   b. optionally contact IBM to get a different solution in the JVM for the 
security problem.
3. open a new jira issue and lobby with us to get us to add all the privileged 
blocks of my first patch, *and* modify their application's policy file to add 
the same privileges I added into derby_tests.policy in that patch.

Option 1 strikes me as the most efficient.

> test failure in XML tests, TriggerTests and BooleanValuesTest with ibm 1.6 sr 
> 15 in 10.7 and earlier
> ----------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-6413
>                 URL: https://issues.apache.org/jira/browse/DERBY-6413
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.6.2.3, 10.7.1.4
>         Environment: IBM JVM 1.6 sr 15.
>            Reporter: Myrna van Lunteren
>            Assignee: Myrna van Lunteren
>             Fix For: 10.3.3.1, 10.4.2.1, 10.5.3.2, 10.6.2.3, 10.7.1.4
>
>         Attachments: DERBY-6413.diff_nosecmgr, DERBY-6413.diff_not4commit
>
>
> With the recently release IBM jvm 1.6 SR15 update I see the following 
> failures:
> 1) 
> testTypesInActionStatement(org.apache.derbyTesting.functionTests.tests.lang.TriggerTest)java.sql.SQLException:
>  Java exception: 'Access denied (java.lang.RuntimePermission 
> accessClassInPackage.org.apache.xml.utils): 
> java.security.AccessControlException'.
>       at <unknown class>.<unknown method>(Unknown Source)
>       at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
>       at org.apache.derby.impl.jdbc.Util.javaException(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.execute(Unknown Source)
>       at org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(Unknown 
> Source)
>       at 
> org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypesSetup(TriggerTest.java:958)
>       at 
> org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypeTest(TriggerTest.java:922)
>       at 
> org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.testTypesInActionStatement(TriggerTest.java:906)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
>       at 
> org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:102)
>       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)
> Caused by: java.sql.SQLException: Java exception: 'Access denied 
> (java.lang.RuntimePermission accessClassInPackage.org.apache.xml.utils): 
> java.security.AccessControlException'.
>       at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
>       at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
>  Source)
>       at <unknown class>.<unknown method>(Unknown Source)
>       ... 38 more
> Caused by: java.security.AccessControlException: Access denied 
> (java.lang.RuntimePermission accessClassInPackage.org.apache.xml.utils)
>       at java.security.AccessController.throwACE(AccessController.java:100)
>       at 
> java.security.AccessController.checkPermission(AccessController.java:174)
>       at java.lang.SecurityManager.checkPermission(SecurityManager.java:544)
>       at 
> java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1539)
>       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:643)
>       at java.lang.J9VMInternals.verifyImpl(Native Method)
>       at java.lang.J9VMInternals.verify(J9VMInternals.java:73)
>       at java.lang.J9VMInternals.initialize(J9VMInternals.java:135)
>       at 
> org.apache.derby.impl.sql.compile.UnaryOperatorNode.bindXMLParse(Unknown 
> Source)
>       at 
> org.apache.derby.impl.sql.compile.UnaryOperatorNode.bindExpression(Unknown 
> Source)
>       at 
> org.apache.derby.impl.sql.compile.ResultColumn.bindExpression(Unknown Source)
>       at 
> org.apache.derby.impl.sql.compile.ResultColumnList.bindExpressions(Unknown 
> Source)
>       at 
> org.apache.derby.impl.sql.compile.RowResultSetNode.bindExpressions(Unknown 
> Source)
>       at 
> org.apache.derby.impl.sql.compile.DMLStatementNode.bindExpressions(Unknown 
> Source)
>       at org.apache.derby.impl.sql.compile.InsertNode.bindStatement(Unknown 
> Source)
>       at 
> org.apache.derby.impl.sql.compile.CreateTriggerNode.bindStatement(Unknown 
> Source)
>       at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
>       at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
>       at 
> org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown
>  Source)
>       ... 32 more
> 2) XML Type and Operators Suite
> java.sql.SQLException: Java exception: 'Access denied 
> (java.lang.RuntimePermission accessClassInPackage.org.apache.xml.utils): 
> java.security.AccessControlException'.
>       at <unknown class>.<unknown method>(Unknown Source)
>       at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
>       at org.apache.derby.impl.jdbc.Util.javaException(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.execute(Unknown Source)
>       at org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(Unknown 
> Source)
>       at 
> org.apache.derbyTesting.junit.BaseJDBCTestCase.assertUpdateCount(BaseJDBCTestCase.java:1130)
>       at 
> org.apache.derbyTesting.functionTests.tests.lang.XMLTypeAndOpsTest$XMLTestSetup.setUp(XMLTypeAndOpsTest.java:2692)
>       at junit.extensions.TestSetup$1.protect(TestSetup.java:20)
>       at junit.extensions.TestSetup.run(TestSetup.java:25)
>       at 
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> Caused by: java.sql.SQLException: Java exception: 'Access denied 
> (java.lang.RuntimePermission accessClassInPackage.org.apache.xml.utils): 
> java.security.AccessControlException'.
>       at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
>       at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
>  Source)
>       at <unknown class>.<unknown method>(Unknown Source)
>       ... 25 more
> Caused by: java.security.AccessControlException: Access denied 
> (java.lang.RuntimePermission accessClassInPackage.org.apache.xml.utils)
>       at java.security.AccessController.throwACE(AccessController.java:100)
>       at 
> java.security.AccessController.checkPermission(AccessController.java:174)
>       at java.lang.SecurityManager.checkPermission(SecurityManager.java:544)
>       at 
> java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1539)
>       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:643)
>       at java.lang.J9VMInternals.verifyImpl(Native Method)
>       at java.lang.J9VMInternals.verify(J9VMInternals.java:73)
>       at java.lang.J9VMInternals.initialize(J9VMInternals.java:135)
>       at 
> org.apache.derby.impl.sql.compile.UnaryOperatorNode.bindXMLParse(Unknown 
> Source)
>       at 
> org.apache.derby.impl.sql.compile.UnaryOperatorNode.bindExpression(Unknown 
> Source)
>       at 
> org.apache.derby.impl.sql.compile.ResultColumn.bindExpression(Unknown Source)
>       at 
> org.apache.derby.impl.sql.compile.ResultColumnList.bindExpressions(Unknown 
> Source)
>       at 
> org.apache.derby.impl.sql.compile.RowResultSetNode.bindExpressions(Unknown 
> Source)
>       at 
> org.apache.derby.impl.sql.compile.DMLStatementNode.bindExpressions(Unknown 
> Source)
>       at org.apache.derby.impl.sql.compile.InsertNode.bindStatement(Unknown 
> Source)
>       at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
>       at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
>       at 
> org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown
>  Source)
>       ... 19 more
> 3) XML Binding Suitejava.sql.SQLException: Java exception: 'Access denied 
> (java.lang.RuntimePermission accessClassInPackage.org.apache.xml.utils): 
> java.security.AccessControlException'.
>       at <unknown class>.<unknown method>(Unknown Source)
>       at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
>       at org.apache.derby.impl.jdbc.Util.javaException(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.EmbedPreparedStatement.<init>(Unknown 
> Source)
>       at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown 
> Source)
>       at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown 
> Source)
>       at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown 
> Source)
>       at org.apache.derbyTesting.junit.XML.insertFile(XML.java:180)
>       at 
> org.apache.derbyTesting.functionTests.tests.lang.XMLBindingTest$XBindTestSetup.setUp(XMLBindingTest.java:291)
>       at junit.extensions.TestSetup$1.protect(TestSetup.java:20)
>       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: 'Access denied 
> (java.lang.RuntimePermission accessClassInPackage.org.apache.xml.utils): 
> java.security.AccessControlException'.
>       at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
>       at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
>  Source)
>       at <unknown class>.<unknown method>(Unknown Source)
>       ... 31 more
> Caused by: java.security.AccessControlException: Access denied 
> (java.lang.RuntimePermission accessClassInPackage.org.apache.xml.utils)
>       at java.security.AccessController.throwACE(AccessController.java:100)
>       at 
> java.security.AccessController.checkPermission(AccessController.java:174)
>       at java.lang.SecurityManager.checkPermission(SecurityManager.java:544)
>       at 
> java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1539)
>       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:643)
>       at java.lang.J9VMInternals.verifyImpl(Native Method)
>       at java.lang.J9VMInternals.verify(J9VMInternals.java:73)
>       at java.lang.J9VMInternals.initialize(J9VMInternals.java:135)
>       at 
> org.apache.derby.impl.sql.compile.UnaryOperatorNode.bindXMLParse(Unknown 
> Source)
>       at 
> org.apache.derby.impl.sql.compile.UnaryOperatorNode.bindExpression(Unknown 
> Source)
>       at 
> org.apache.derby.impl.sql.compile.ResultColumn.bindExpression(Unknown Source)
>       at 
> org.apache.derby.impl.sql.compile.ResultColumnList.bindExpressions(Unknown 
> Source)
>       at 
> org.apache.derby.impl.sql.compile.RowResultSetNode.bindExpressions(Unknown 
> Source)
>       at 
> org.apache.derby.impl.sql.compile.DMLStatementNode.bindExpressions(Unknown 
> Source)
>       at org.apache.derby.impl.sql.compile.InsertNode.bindStatement(Unknown 
> Source)
>       at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
>       at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
>       at 
> org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown
>  Source)
>       ... 25 more



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to