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

ClassCastException when launching derby from windows subst drive

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 10.9.1.0
    • 10.10.2.1, 10.11.1.1
    • Services
    • None
    • Windows 7
    • Low
    • Workaround attached
    • Crash

    Description

      When launching derby bundled with glassfish4 on a substed drive derby fails to startup and logs the following into the derby.log:

      Fri Nov 08 10:30:34 CET 2013 : Sicherheitsmanager mit einfacher Server-Sicherheitsrichtlinie installiert.
      java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at com.sun.enterprise.admin.cli.optional.DerbyControl.invokeNetworkServerControl(DerbyControl.java:158)
      	at com.sun.enterprise.admin.cli.optional.DerbyControl.main(DerbyControl.java:245)
      Caused by: java.lang.ExceptionInInitializerError
      	at java.lang.Class.forName0(Native Method)
      	at java.lang.Class.forName(Unknown Source)
      	at org.apache.derby.impl.drda.NetworkServerControlImpl.startNetworkServer(Unknown Source)
      	at org.apache.derby.impl.drda.NetworkServerControlImpl.blockingStart(Unknown Source)
      	at org.apache.derby.impl.drda.NetworkServerControlImpl.executeWork(Unknown Source)
      	at org.apache.derby.drda.NetworkServerControl.main(Unknown Source)
      	... 6 more
      Caused by: java.lang.ClassCastException: java.nio.file.FileSystemException cannot be cast to java.lang.RuntimeException
      	at org.apache.derby.iapi.services.io.FileUtil.limitAccessToOwnerViaACLs(Unknown Source)
      	at org.apache.derby.iapi.services.io.FileUtil.limitAccessToOwner(Unknown Source)
      	at org.apache.derby.impl.services.stream.SingleStream.PBmakeFileHPW(Unknown Source)
      	at org.apache.derby.impl.services.stream.SingleStream.run(Unknown Source)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.apache.derby.impl.services.stream.SingleStream.makeFileHPW(Unknown Source)
      	at org.apache.derby.impl.services.stream.SingleStream.createDefaultStream(Unknown Source)
      	at org.apache.derby.impl.services.stream.SingleStream.makeStream(Unknown Source)
      	at org.apache.derby.impl.services.stream.SingleStream.boot(Unknown Source)
      	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
      	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
      	at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
      	at org.apache.derby.iapi.services.monitor.Monitor.startSystemModule(Unknown Source)
      	at org.apache.derby.impl.services.monitor.BaseMonitor.runWithState(Unknown Source)
      	at org.apache.derby.impl.services.monitor.FileMonitor.<init>(Unknown Source)
      	at org.apache.derby.iapi.services.monitor.Monitor.startMonitor(Unknown Source)
      	at org.apache.derby.iapi.jdbc.JDBCBoot.boot(Unknown Source)
      	at org.apache.derby.jdbc.EmbeddedDriver.boot(Unknown Source)
      	at org.apache.derby.jdbc.EmbeddedDriver.<clinit>(Unknown Source)
      	... 12 more
      

      Derby was started via the glassfish command:

      $ asadmin start-database
      

      The asadmin command only fails if it is launched from a substed windows drive. The substed drive was created with the following command:

      $ subst d: c:\d
      

      When derby is started from drive 'C' everything is fine.

      Attachments

        1. d6410-1a.diff
          6 kB
          Knut Anders Hatlen
        2. d6410-backport.diff
          7 kB
          Knut Anders Hatlen

        Issue Links

          Activity

            People

              knutanders Knut Anders Hatlen
              ma300k Markus Peröbner
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: