[ 
https://issues.apache.org/jira/browse/DERBY-6410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13817293#comment-13817293
 ] 

Knut Anders Hatlen commented on DERBY-6410:
-------------------------------------------

I tried to start the network server on a substituted drive and saw the same 
ClassCastException. The original exception seems to be the following:

{noformat}
java.nio.file.FileSystemException: F:\derby.log: The parameter is incorrect.

        at 
sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86)
        at 
sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
        at 
sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
        at sun.nio.fs.WindowsFileStore.create(WindowsFileStore.java:92)
        at 
sun.nio.fs.WindowsFileSystemProvider.getFileStore(WindowsFileSystemProvider.java:498)
        at java.nio.file.Files.getFileStore(Files.java:1411)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at 
org.apache.derby.iapi.services.io.FileUtil.limitAccessToOwnerViaACLs(FileUtil.java:824)
        at 
org.apache.derby.iapi.services.io.FileUtil.limitAccessToOwner(FileUtil.java:747)
        at 
org.apache.derby.impl.services.stream.SingleStream.PBmakeFileHPW(SingleStream.java:205)
        at 
org.apache.derby.impl.services.stream.SingleStream.run(SingleStream.java:401)
        at 
org.apache.derby.impl.services.stream.SingleStream.run(SingleStream.java:72)
        at java.security.AccessController.doPrivileged(Native Method)
        at 
org.apache.derby.impl.services.stream.SingleStream.makeFileHPW(SingleStream.java:394)
        at 
org.apache.derby.impl.services.stream.SingleStream.createDefaultStream(SingleStream.java:356)
        at 
org.apache.derby.impl.services.stream.SingleStream.makeStream(SingleStream.java:132)
        at 
org.apache.derby.impl.services.stream.SingleStream.boot(SingleStream.java:92)
        at 
org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:1991)
        at 
org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.java:334)
        at 
org.apache.derby.impl.services.monitor.BaseMonitor.startModule(BaseMonitor.java:541)
        at 
org.apache.derby.impl.services.monitor.FileMonitor.startModule(FileMonitor.java:44)
        at 
org.apache.derby.iapi.services.monitor.Monitor.startSystemModule(Monitor.java:362)
        at 
org.apache.derby.impl.services.monitor.BaseMonitor.runWithState(BaseMonitor.java:343)
        at 
org.apache.derby.impl.services.monitor.FileMonitor.<init>(FileMonitor.java:58)
        at 
org.apache.derby.iapi.services.monitor.Monitor.startMonitor(Monitor.java:285)
        at org.apache.derby.iapi.jdbc.JDBCBoot.boot(JDBCBoot.java:67)
        at org.apache.derby.jdbc.EmbeddedDriver.boot(EmbeddedDriver.java:199)
        at org.apache.derby.jdbc.EmbeddedDriver.<clinit>(EmbeddedDriver.java:95)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:188)
        at 
org.apache.derby.impl.drda.NetworkServerControlImpl.startNetworkServer(NetworkServerControlImpl.java:1032)
        at 
org.apache.derby.impl.drda.NetworkServerControlImpl.blockingStart(NetworkServerControlImpl.java:732)
        at 
org.apache.derby.impl.drda.NetworkServerControlImpl.executeWork(NetworkServerControlImpl.java:2277)
        at 
org.apache.derby.drda.NetworkServerControl.main(NetworkServerControl.java:353)
{noformat}

I also tried to start the network server from a network drive. That failed with 
a ClassCastException too, but the original exception was a different one:

{noformat}
java.nio.file.AccessDeniedException: \\clustra\cluwin\khatlen\derby.log
        at 
sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83)
        at 
sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
        at 
sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
        at 
sun.nio.fs.WindowsAclFileAttributeView.setAcl(WindowsAclFileAttributeView.java:221)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at 
org.apache.derby.iapi.services.io.FileUtil.limitAccessToOwnerViaACLs(FileUtil.java:897)
        at 
org.apache.derby.iapi.services.io.FileUtil.limitAccessToOwner(FileUtil.java:747)
        at 
org.apache.derby.impl.services.stream.SingleStream.PBmakeFileHPW(SingleStream.java:205)
        at 
org.apache.derby.impl.services.stream.SingleStream.run(SingleStream.java:401)
        at 
org.apache.derby.impl.services.stream.SingleStream.run(SingleStream.java:72)
        at java.security.AccessController.doPrivileged(Native Method)
        at 
org.apache.derby.impl.services.stream.SingleStream.makeFileHPW(SingleStream.java:394)
        at 
org.apache.derby.impl.services.stream.SingleStream.createDefaultStream(SingleStream.java:356)
        at 
org.apache.derby.impl.services.stream.SingleStream.makeStream(SingleStream.java:132)
        at 
org.apache.derby.impl.services.stream.SingleStream.boot(SingleStream.java:92)
        at 
org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:1991)
        at 
org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.java:334)
        at 
org.apache.derby.impl.services.monitor.BaseMonitor.startModule(BaseMonitor.java:541)
        at 
org.apache.derby.impl.services.monitor.FileMonitor.startModule(FileMonitor.java:44)
        at 
org.apache.derby.iapi.services.monitor.Monitor.startSystemModule(Monitor.java:362)
        at 
org.apache.derby.impl.services.monitor.BaseMonitor.runWithState(BaseMonitor.java:343)
        at 
org.apache.derby.impl.services.monitor.FileMonitor.<init>(FileMonitor.java:58)
        at 
org.apache.derby.iapi.services.monitor.Monitor.startMonitor(Monitor.java:285)
        at org.apache.derby.iapi.jdbc.JDBCBoot.boot(JDBCBoot.java:67)
        at org.apache.derby.jdbc.EmbeddedDriver.boot(EmbeddedDriver.java:199)
        at org.apache.derby.jdbc.EmbeddedDriver.<clinit>(EmbeddedDriver.java:95)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:188)
        at 
org.apache.derby.impl.drda.NetworkServerControlImpl.startNetworkServer(NetworkServerControlImpl.java:1032)
        at 
org.apache.derby.impl.drda.NetworkServerControlImpl.blockingStart(NetworkServerControlImpl.java:732)
        at 
org.apache.derby.impl.drda.NetworkServerControlImpl.executeWork(NetworkServerControlImpl.java:2277)
        at 
org.apache.derby.drda.NetworkServerControl.main(NetworkServerControl.java:353)
{noformat}

> ClassCastException when launching derby from windows subst drive
> ----------------------------------------------------------------
>
>                 Key: DERBY-6410
>                 URL: https://issues.apache.org/jira/browse/DERBY-6410
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.9.1.0
>         Environment: Windows 7
>            Reporter: Markus Peröbner
>            Priority: Minor
>
> When launching derby bundled with glassfish4 on a substed drive derby fails 
> to startup and logs the following into the derby.log:
> {code}
> 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
> {code}
> Derby was started via the glassfish command:
> {code}
> $ asadmin start-database
> {code}
> The asadmin command only fails if it is launched from a substed windows 
> drive. The substed drive was created with the following command:
> {code}
> $ subst d: c:\d
> {code}
> When derby is started from drive 'C' everything is fine.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to