Derby
  1. Derby
  2. DERBY-6349

DaylightSavingTest - java.security.AccessControlException

    Details

      Description

      Seeing this test failure because of an intentional security change in TimeZone.setDefault(). Therefore need to wrap Timezone.setDefault in a priv block in the test.

      1) DaylightSavingTestjava.security.AccessControlException:
      Access denied ("java.util.PropertyPermission" "user.timezone"
      "write")
      at
      java.security.AccessController.throwACE(AccessController.java:10
      0)
      at <unknown class>.<unknown method>(Unknown
      Source)
      at
      java.lang.SecurityManager.checkPermission(SecurityManager.java:5
      49)
      at java.util.TimeZone.hasPermission(TimeZone.java:756)
      at java.util.TimeZone.setDefault(TimeZone.java:778)
      at
      org.apache.derbyTesting.junit.TimeZoneTestSetup.setUp(TimeZoneTe
      stSetup.java:59)
      at
      junit.extensions.TestSetup$1.protect(TestSetup.java:22)
      at junit.extensions.TestSetup.run(TestSetup.java:27)
      at
      org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.ja
      va:57)

        Issue Links

          Activity

          Hide
          Kathey Marsden added a comment -

          Attaching a patch for this issue. Wraps TimeZone.setDefault in a priv block.

          Show
          Kathey Marsden added a comment - Attaching a patch for this issue. Wraps TimeZone.setDefault in a priv block.
          Hide
          ASF subversion and git services added a comment -

          Commit 1524579 from Kathey Marsden in branch 'code/trunk'
          [ https://svn.apache.org/r1524579 ]

          DERBY-6349 DaylightSavingTest - java.security.AccessControlException

          Show
          ASF subversion and git services added a comment - Commit 1524579 from Kathey Marsden in branch 'code/trunk' [ https://svn.apache.org/r1524579 ] DERBY-6349 DaylightSavingTest - java.security.AccessControlException
          Hide
          ASF subversion and git services added a comment -

          Commit 1525671 from Kathey Marsden in branch 'code/branches/10.10'
          [ https://svn.apache.org/r1525671 ]

          DERBY-6349 - DaylightSavingTest - java.security.AccessControlException

          Show
          ASF subversion and git services added a comment - Commit 1525671 from Kathey Marsden in branch 'code/branches/10.10' [ https://svn.apache.org/r1525671 ] DERBY-6349 - DaylightSavingTest - java.security.AccessControlException
          Hide
          Mamta A. Satoor added a comment - - edited

          Not sure if the following failure on 10.9 with IBM jdk 1.6 is related to this jira. This failure is on 10.9 codeline(1540252) where the fix for this jira has not been backported.
          http://people.apache.org/~myrnavl/derby_test_results/v10_9/windows/testlog/ibm16/1539514-suites.All_diff.txt
          http://people.apache.org/~myrnavl/derby_test_results/v10_9/windows/testlog/ibm16/1540252-suites.All_diff.txt

          1) DaylightSavingTestjava.security.AccessControlException: Access denied (java.util.PropertyPermission user.timezone write)
          at java.security.AccessController.throwACE(AccessController.java:100)
          at <unknown class>.<unknown method>(Unknown Source)
          at java.lang.SecurityManager.checkPermission(SecurityManager.java:544)
          at java.util.TimeZone.hasPermission(TimeZone.java:676)
          at java.util.TimeZone.setDefault(TimeZone.java:698)
          at org.apache.derbyTesting.junit.TimeZoneTestSetup.setUp(TimeZoneTestSetup.java:59)
          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)

          Show
          Mamta A. Satoor added a comment - - edited Not sure if the following failure on 10.9 with IBM jdk 1.6 is related to this jira. This failure is on 10.9 codeline(1540252) where the fix for this jira has not been backported. http://people.apache.org/~myrnavl/derby_test_results/v10_9/windows/testlog/ibm16/1539514-suites.All_diff.txt http://people.apache.org/~myrnavl/derby_test_results/v10_9/windows/testlog/ibm16/1540252-suites.All_diff.txt 1) DaylightSavingTestjava.security.AccessControlException: Access denied (java.util.PropertyPermission user.timezone write) at java.security.AccessController.throwACE(AccessController.java:100) at <unknown class>.<unknown method>(Unknown Source) at java.lang.SecurityManager.checkPermission(SecurityManager.java:544) at java.util.TimeZone.hasPermission(TimeZone.java:676) at java.util.TimeZone.setDefault(TimeZone.java:698) at org.apache.derbyTesting.junit.TimeZoneTestSetup.setUp(TimeZoneTestSetup.java:59) 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)
          Hide
          Kathey Marsden added a comment -

          Note: Commit 1525671 is the correct 10.10 commit for this issue. 1526486 was for another issue with an incorrect comment (now corrected in svn), but cannot delete the comment in this issue.

          Show
          Kathey Marsden added a comment - Note: Commit 1525671 is the correct 10.10 commit for this issue. 1526486 was for another issue with an incorrect comment (now corrected in svn), but cannot delete the comment in this issue.
          Hide
          ASF subversion and git services added a comment -

          Commit 1540805 from Kathey Marsden in branch 'code/branches/10.9'
          [ https://svn.apache.org/r1540805 ]

          DERBY-6349 DaylightSavingTest - java.security.AccessControlException
          merge revision 1525671 from 10.10 branch

          Show
          ASF subversion and git services added a comment - Commit 1540805 from Kathey Marsden in branch 'code/branches/10.9' [ https://svn.apache.org/r1540805 ] DERBY-6349 DaylightSavingTest - java.security.AccessControlException merge revision 1525671 from 10.10 branch
          Hide
          ASF subversion and git services added a comment -

          Commit 1540812 from Kathey Marsden in branch 'code/branches/10.8'
          [ https://svn.apache.org/r1540812 ]

          DERBY-6349 DaylightSavingTest - java.security.AccessControlException
          merge revision 1525671 from 10.10 branch

          Show
          ASF subversion and git services added a comment - Commit 1540812 from Kathey Marsden in branch 'code/branches/10.8' [ https://svn.apache.org/r1540812 ] DERBY-6349 DaylightSavingTest - java.security.AccessControlException merge revision 1525671 from 10.10 branch
          Hide
          ASF subversion and git services added a comment -

          Commit 1540817 from Kathey Marsden in branch 'code/branches/10.7'
          [ https://svn.apache.org/r1540817 ]

          DERBY-6349 DaylightSavingTest - java.security.AccessControlException
          merge revision 1525671 from 10.10 branch

          Show
          ASF subversion and git services added a comment - Commit 1540817 from Kathey Marsden in branch 'code/branches/10.7' [ https://svn.apache.org/r1540817 ] DERBY-6349 DaylightSavingTest - java.security.AccessControlException merge revision 1525671 from 10.10 branch
          Hide
          ASF subversion and git services added a comment -

          Commit 1540820 from Kathey Marsden in branch 'code/branches/10.6'
          [ https://svn.apache.org/r1540820 ]

          DERBY-6349 DaylightSavingTest - java.security.AccessControlException
          merge revision 1525671 from 10.10 branch

          Show
          ASF subversion and git services added a comment - Commit 1540820 from Kathey Marsden in branch 'code/branches/10.6' [ https://svn.apache.org/r1540820 ] DERBY-6349 DaylightSavingTest - java.security.AccessControlException merge revision 1525671 from 10.10 branch
          Hide
          Kathey Marsden added a comment -

          backported to 10.6. Test does not exist in older branches.

          Show
          Kathey Marsden added a comment - backported to 10.6. Test does not exist in older branches.
          Hide
          Knut Anders Hatlen added a comment -

          I deleted the comment with the incorrect commit message for revision 1526486 (which should have gone to DERBY-5610) to avoid confusion.

          Show
          Knut Anders Hatlen added a comment - I deleted the comment with the incorrect commit message for revision 1526486 (which should have gone to DERBY-5610 ) to avoid confusion.

            People

            • Assignee:
              Kathey Marsden
              Reporter:
              Kathey Marsden
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development