Derby
  1. Derby
  2. DERBY-1066

database creation with log device as relative path under security manager throws NULL pointer excetpton if there is NO acess permission for user.dir

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.2.1.6
    • Fix Version/s: None
    • Component/s: Services
    • Urgency:
      Normal
    • Issue & fix info:
      Newcomer
    • Bug behavior facts:
      Security

      Description

      To reproduce this :
      run store/logDevice.sql with jars under the security manager.
      and other tests in store which tests with logDeivice.

      ---- I think user.dir permissions are must if logDevice is specified as relative path becuase the full path has to be stored in the databases.

      ---- We might need to add a special policy with user.dir permission for atleast one tests and convert the other tests to use absolute path if that solves the problem.
      .
      — Even if there is no permissions , error should reflect that not an NPE.

      Stack: from logDevice.sql test
      2006-02-28 12:57:53.300 GMT:
      Booting Derby version The Apache Software Foundation - Apache Derby - 10.2.0.0
      alpha - (381484M): instance c013800d-0109-b0bc-70fe-ffffd467c511
      on database directory C:\suresht\p4clients\ts_main\systest\out\storemore\storemo
      re\logDevice\wombat

      2006-02-28 12:57:53.330 GMT:
      Shutting down instance c013800d-0109-b0bc-70fe-ffffd467c511
      ----------------------------------------------------------------
      2006-02-28 12:57:53.340 GMT Thread[main,5,main] Cleanup action starting
      java.lang.NullPointerException
      at org.apache.derby.impl.store.raw.log.LogToFile.stop(LogToFile.java:318
      9)
      at org.apache.derby.impl.services.monitor.TopService.stop(TopService.jav
      a:404)
      at org.apache.derby.impl.services.monitor.TopService.shutdown(TopService
      .java:348)
      at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(BaseMo
      nitor.java:1853)
      at org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentSe
      rvice(BaseMonitor.java:1013)
      at org.apache.derby.iapi.services.monitor.Monitor.createPersistentServic
      e(Monitor.java:587)
      at org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(EmbedConnec
      tion.java:1513)
      at org.apache.derby.impl.jdbc.EmbedConnection.<init>(EmbedConnection.jav
      a:224)
      at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(EmbedConnection30
      .java:72)
      at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Driver30.java:73
      )
      at org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:187)
      at java.sql.DriverManager.getConnection(DriverManager.java:512)
      at java.sql.DriverManager.getConnection(DriverManager.java:140)
      at org.apache.derby.impl.tools.ij.util.startJBMS(util.java:493)
      at org.apache.derby.impl.tools.ij.util.startJBMS(util.java:573)
      at org.apache.derby.impl.tools.ij.ConnectionEnv.init(ConnectionEnv.java:
      62)
      at org.apache.derby.impl.tools.ij.utilMain.<init>(utilMain.java:149)
      at org.apache.derby.impl.tools.ij.utilMain14.<init>(utilMain14.java:51)
      at org.apache.derby.impl.tools.ij.Main14.getutilMain(Main14.java:102)
      at org.apache.derby.impl.tools.ij.Main.<init>(Main.java:228)
      at org.apache.derby.impl.tools.ij.Main14.<init>(Main14.java:68)
      at org.apache.derby.impl.tools.ij.Main14.getMain(Main14.java:91)
      at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:166)
      at org.apache.derby.impl.tools.ij.Main14.main(Main14.java:55)
      at org.apache.derby.tools.ij.main(ij.java:60)
      Cleanup action completed
      ~

        Activity

        Hide
        Kathey Marsden added a comment -

        I am marking this newcomer as hopefully it will be easy to detect the security exception and throw a more reasonable error. I have not investigated a fix however, so might be wrong on this.

        Show
        Kathey Marsden added a comment - I am marking this newcomer as hopefully it will be easy to detect the security exception and throw a more reasonable error. I have not investigated a fix however, so might be wrong on this.
        Hide
        Mike Matrigali added a comment -

        derby 10.8 triage

        Show
        Mike Matrigali added a comment - derby 10.8 triage

          People

          • Assignee:
            Unassigned
            Reporter:
            Suresh Thalamati
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development