[
https://issues.apache.org/jira/browse/DERBY-6413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13819802#comment-13819802
]
Myrna van Lunteren commented on DERBY-6413:
-------------------------------------------
I worked through the code to add privileged blocks and derby_tests.policy
permissions so that the XMLSuite suite and lang.TriggerTest passed. Running
full suites.All now to make sure I didn't miss any.
But I wonder if this is a lot of changes for an older branch for a problem only
happening with one vendor's jvm? I am wondering if it would be ok to just run
these tests without securityManager (i.e. wrap them in
SecurityManagerSetup.noSecurityManager) instead.
I cannot tell how likely it is for people to run into this apart from the
tests, especially as this does not occur with 10.8 and later. I do think it
would be quite involved for a user to wrap privileged blocks around any code
accessing XML values in the database. So even if we do the noSecurityManager
approach, we should leave this open, in case we need to apply the patch after
all...
Opinions?
> test failure in XML tests and TriggerTests 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
> Attachments: 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)