Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-6224

Issues with latest JDK 8 EA build because of missing SQLPermission

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.11.1.1
    • 10.8.3.3, 10.9.2.2, 10.10.2.0, 10.11.1.1
    • Miscellaneous
    • None
    • java version "1.8.0-ea"
      Java(TM) SE Runtime Environment (build 1.8.0-ea-b89)
      Java HotSpot(TM) 64-Bit Server VM (build 25.0-b31, mixed mode)
    • Release Note Needed

    Description

      With the latest EA build of JDK 8 (build 1.8.0-ea-b89), I see many failures in suites.All. For example:

      1) testStartNetworkServerFalse(org.apache.derbyTesting.functionTests.tests.derbynet.DerbyNetAutoStartTest)java.security.AccessControlException: access denied ("java.sql.SQLPermission" "deregisterDriver")
      at java.security.AccessControlContext.checkPermission(AccessControlContext.java:364)
      at java.security.AccessController.checkPermission(AccessController.java:562)
      at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
      at java.sql.DriverManager.deregisterDriver(DriverManager.java:399)
      at org.apache.derby.jdbc.AutoloadedDriver.unregisterDriverModule(AutoloadedDriver.java:263)
      at org.apache.derby.jdbc.Driver20.stop(Driver20.java:105)
      at org.apache.derby.impl.services.monitor.TopService.stop(TopService.java:443)
      at org.apache.derby.impl.services.monitor.TopService.shutdown(TopService.java:394)
      at org.apache.derby.impl.services.monitor.BaseMonitor.shutdown(BaseMonitor.java:227)
      at org.apache.derby.impl.services.monitor.FileMonitor.shutdown(FileMonitor.java:44)
      at org.apache.derby.impl.services.monitor.BaseMonitor.shutdown(BaseMonitor.java:197)
      at org.apache.derby.impl.services.monitor.FileMonitor.shutdown(FileMonitor.java:44)
      at org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:255)
      at org.apache.derby.jdbc.Driver20.connect(Driver20.java:246)
      at org.apache.derby.jdbc.AutoloadedDriver.connect(AutoloadedDriver.java:145)
      at java.sql.DriverManager.getConnection(DriverManager.java:661)
      at java.sql.DriverManager.getConnection(DriverManager.java:208)
      at org.apache.derbyTesting.junit.DriverManagerConnector.getConnectionByAttributes(DriverManagerConnector.java:204)
      at org.apache.derbyTesting.junit.DriverManagerConnector.shutEngine(DriverManagerConnector.java:171)
      at org.apache.derbyTesting.junit.TestConfiguration.shutdownEngine(TestConfiguration.java:1822)
      at org.apache.derbyTesting.functionTests.tests.derbynet.DerbyNetAutoStartTest.setUp(DerbyNetAutoStartTest.java:82)
      at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:117)
      at org.apache.derbyTesting.junit.BaseJDBCTestCase.runBareOverridable(BaseJDBCTestCase.java:439)
      at org.apache.derbyTesting.junit.BaseJDBCTestCase.runBare(BaseJDBCTestCase.java:456)

      What's new in EA build 89 is that DriverManager.deregisterDriver() now requires an SQLPermission when running under a security manager. Most of suites.All runs under a security manager, and Derby's engine shutdown code calls deregisterDriver(), so this problem probably affects all tests that shut down the engine.

      Attachments

        1. buildbreak-10.10.diff
          2 kB
          Knut Anders Hatlen
        2. buildbreak-10.9.diff
          1 kB
          Knut Anders Hatlen
        3. derby-6224-01-a.diff
          5 kB
          Knut Anders Hatlen
        4. derby-6224-01-b.diff
          7 kB
          Knut Anders Hatlen
        5. derby-6224-02-a.diff
          4 kB
          Knut Anders Hatlen
        6. derby-6224-02-b-with-test.diff
          11 kB
          Knut Anders Hatlen
        7. releaseNote.html
          6 kB
          Knut Anders Hatlen
        8. releaseNote.html
          5 kB
          Knut Anders Hatlen
        9. releaseNote.html
          4 kB
          Knut Anders Hatlen

        Issue Links

          Activity

            People

              knutanders Knut Anders Hatlen
              knutanders Knut Anders Hatlen
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: