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

Kathey Marsden commented on DERBY-4617:
---------------------------------------

I saw this occur on a different JDK I was testing on XP.  The message in the 
derby.log was:

2011-04-13 22:21:07.511 GMT : Apache Derby Network Server - 10.5.3.2 - 
(1089552M) started and ready to accept connections on port 1527

2011-04-13 22:21:55.482 GMT : Access denied ("java.io.FilePermission" 
"C:\cygwin\svn4\10.5\jars\sane\derby.jar" "read")

java.security.AccessControlException: Access denied ("java.io.FilePermission" 
"C:\cygwin\svn4\10.5\jars\sane\derby.jar" "read")

        at 
java.security.AccessController.checkPermission(AccessController.java:108)

        at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)

        at java.lang.SecurityManager.checkRead(SecurityManager.java:888)

        at java.io.File.exists(File.java:772)

        at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:420)

        at java.io.File.getCanonicalPath(File.java:591)

        at org.apache.derby.impl.tools.sysinfo.Main.formatURL(Main.java:1224)

        at 
org.apache.derby.impl.tools.sysinfo.Main.loadZipFromResource(Main.java:892)

        at org.apache.derby.impl.tools.sysinfo.Main.getAllInfo(Main.java:796)

        at org.apache.derby.impl.tools.sysinfo.Main.reportDerby(Main.java:241)

        at org.apache.derby.impl.tools.sysinfo.Main.getMainInfo(Main.java:141)

        at 
org.apache.derby.impl.drda.NetworkServerControlImpl.getCLSSysInfo(NetworkServerControlImpl.java:2184)

        at 
org.apache.derby.impl.drda.NetworkServerControlImpl.sendSysInfo(NetworkServerControlImpl.java:2072)

        at 
org.apache.derby.impl.drda.NetworkServerControlImpl.processCommands(NetworkServerControlImpl.java:1751)

        at 
org.apache.derby.impl.drda.DRDAConnThread.sessionInitialState(DRDAConnThread.java:645)

        at 
org.apache.derby.impl.drda.DRDAConnThread.run(DRDAConnThread.java:279)


Looking at the offending code in Main.formatURL I see:
       try {
            result = new File(filename).getCanonicalPath().replace('/', 
File.separatorChar);
        } catch (IOException e) {
            result = e.getMessage();
        }

getCanonicalPath() can throw a Security exception so should be wrapped I think 
in a priv block.
I will try that and see if it resolves the issue.



> Sysinfo.testSysinfoLocale failed with IB47 M 1.6 on Windows 7 64bit
> -------------------------------------------------------------------
>
>                 Key: DERBY-4617
>                 URL: https://issues.apache.org/jira/browse/DERBY-4617
>             Project: Derby
>          Issue Type: Bug
>          Components: Localization
>    Affects Versions: 10.5.3.0
>            Reporter: Lily Wei
>            Priority: Minor
>              Labels: derby_triage10_5_2
>         Attachments: derby.log
>
>
> Sysinfo.testSysinfoLocale failed with IB47 M 1.6 on Windows 7 64bit. This is 
> the exception from running the test:
> 1) 
> testSysinfoLocale(org.apache.derbyTesting.functionTests.tests.derbynet.SysinfoTest)junit.framework.AssertionFailedError:
>  expected:<14> but was:<1>
>     at 
> org.apache.derbyTesting.functionTests.tests.derbynet.SysinfoTest.assertMatchingStringExists(SysinfoTest.java:322)
>     at 
> org.apache.derbyTesting.functionTests.tests.derbynet.SysinfoTest.testSysinfoLocale(SysinfoTest.java:249)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
>     at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
>     at 
> org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:109)
> When running with SysinfoTest along, you will see the following error:
> ...before sed
> 2010-04-16 22:14:49.289 GMT : Ung?ltige Antwort von Network Server: Keine 
> ausrei
> chenden Daten.
> after sed
> 2010-04-16 22:14:49.289 GMT : Ung?ltige Antwort von Network Server: Keine 
> ausrei
> chenden Daten.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to