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

Manjula Kutty commented on DERBY-3211:
--------------------------------------

If I don't give a seperate policy file for the port 20000 (which I used in this 
test) the test fails with the following exception.

$ java junit.textui.TestRunner org.apache.derbyTesting.functionTests.tests.derby
net.NSinSameJVMTest
.java.security.AccessControlException: access denied (java.net.SocketPermission
0.0.0.0:20000 connect,resolve)
        at java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:264)
        at java.security.AccessController.checkPermission(AccessController.java:
427)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
        at java.lang.SecurityManager.checkConnect(SecurityManager.java:1034)
        at java.net.Socket.connect(Socket.java:513)
        at java.net.Socket.connect(Socket.java:469)
        at java.net.Socket.<init>(Socket.java:366)
        at java.net.Socket.<init>(Socket.java:208)
        at javax.net.DefaultSocketFactory.createSocket(SocketFactory.java:202)
        at org.apache.derby.impl.drda.NetworkServerControlImpl$6.run(NetworkServ
erControlImpl.java:2358)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.derby.impl.drda.NetworkServerControlImpl.setUpSocket(Netwo
rkServerControlImpl.java:2329)
        at org.apache.derby.impl.drda.NetworkServerControlImpl.shutdown(NetworkS
erverControlImpl.java:927)
        at org.apache.derby.drda.NetworkServerControl.shutdown(NetworkServerCont
rol.java:348)
        at org.apache.derbyTesting.functionTests.tests.derbynet.NSinSameJVMTest.
testShutdown(NSinSameJVMTest.java:70)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at junit.framework.TestCase.runTest(TestCase.java:154)
        at junit.framework.TestCase.runBare(TestCase.java:127)
        at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:
95)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57
)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at junit.textui.TestRunner.doRun(TestRunner.java:116)
        at junit.textui.TestRunner.start(TestRunner.java:172)
        at junit.textui.TestRunner.main(TestRunner.java:138)

So I thought the default hostname and ipaddress defaults to the default port of 
1527. Should the policy file accept all the ports, without explicitly giving 
them in the policy file? If so then this will be a bug, else I need a seperate 
policy file just for the different port.

> Convert derbynet/NSinSameJVM.java to junit
> ------------------------------------------
>
>                 Key: DERBY-3211
>                 URL: https://issues.apache.org/jira/browse/DERBY-3211
>             Project: Derby
>          Issue Type: Test
>            Reporter: Manjula Kutty
>            Assignee: Manjula Kutty
>            Priority: Minor
>         Attachments: DERBY-3211_diff_11_16.txt, DERBY-3211_diff_11_19.txt, 
> DERBY-3211_stat_11_16.txt, DERBY-3211_stat_11_19.txt
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to