Issue Details (XML | Word | Printable)

Key: DERBY-3836
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: John H. Embretsen
Reporter: Kathey Marsden
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Derby

On 10.4 branch JMX tests fail with security exceptions when run against classes

Created: 11/Aug/08 09:11 PM   Updated: 06/May/09 01:25 AM
Return to search
Component/s: Test
Affects Version/s: 10.4.2.0
Fix Version/s: 10.4.2.0

Time Tracking:
Not Specified

Issue Links:
Blocker
 
Duplicate
 

Bug behavior facts: Regression Test Failure
Resolution Date: 26/Aug/08 09:27 AM


 Description  « Hide
I noticed these security exceptions running JMX tests against classes on 10.4. It runs fine with jars. There were 42 failures and all that faiiled with traces similar to the one below.

1) testDerbyJarAttributeAlpha(org.apache.derbyTesting.functionTests.tests.management.VersionMBeanTest)javax.management.RuntimeMBeanException: java.lang.SecurityException: access denied (org.apache.derby.security.SystemPermission engine monitor)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:856)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(DefaultMBeanServerInterceptor.java:869)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:670)
at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:638)
at org.apache.derbyTesting.functionTests.tests.management.MBeanTest$4.run(MBeanTest.java:382)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.derbyTesting.functionTests.tests.management.MBeanTest.getAttribute(MBeanTest.java:379)
at org.apache.derbyTesting.functionTests.tests.management.MBeanTest.checkBooleanAttributeValue(MBeanTest.java:431)
at org.apache.derbyTesting.functionTests.tests.management.VersionMBeanTest.testDerbyJarAttributeAlpha(VersionMBeanTest.java:120)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
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:101)
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)
Caused by: java.lang.SecurityException: access denied (org.apache.derby.security.SystemPermission engine monitor)
at org.apache.derby.iapi.services.info.Version.checkMonitor(Version.java:70)
at org.apache.derby.iapi.services.info.Version.isAlpha(Version.java:121)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:93)
at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:27)
at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208)
at com.sun.jmx.mbeanserver.PerInterface.getAttribute(PerInterface.java:65)
at com.sun.jmx.mbeanserver.MBeanSupport.getAttribute(MBeanSupport.java:216)
at javax.management.StandardMBean.getAttribute(StandardMBean.java:358)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:666)
... 44 more

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #687967 Fri Aug 22 06:20:47 UTC 2008 mamta DERBY-3745 : Backporting revisions 679620, 685674 and 686296 from the trunk into 10.4 codeline

derbyall tests ran fine. I ran junit test suites with classes and with jar files after backporting these changes to my 10.4 client. With classes, I ran into DERBY-3836 but didn't run into DERBY-3836 with jar files. I did run into some out of memory issues but I think it might be local to my machine because of all the other processes running on the machine and probably not enough memory to the junit tests when I specified -Xmx1024m. I will keep an eye on the 10.4 test runs after I commit the changes.
Files Changed
DEL /db/derby/code/branches/10.4/java/engine/org/apache/derby/iapi/util/PrivilegedThreadOps.java
MODIFY /db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/services/timer/SingletonTimerFactory.java
MODIFY /db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java
MODIFY /db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/services/daemon/SingleThreadDaemonFactory.java
MODIFY /db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/services/jmx/JMXManagementService.java

Repository Revision Date User Message
ASF #689008 Tue Aug 26 09:19:13 UTC 2008 johnemb DERBY-3836: On 10.4 branch JMX tests fail with security exceptions when run against classes
 - Backported (cleanly) revision 639721 from trunk:
   'Add permissions to "class" portion of the derby test policy file that were
   added to the jar file section previously.'
   (Added SystemPermissions to the classes domain).
 - Merged by svn merge -r 639720:639721 https://svn.apache.org/repos/asf/db/derby/code/trunk/
 - Original contributor Mike Matrigali
Files Changed
MODIFY /db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy