RE: [tcljava-user] Tcl Blend and Policy Files
Brought to you by:
mdejong
From: Rob R. <rr...@fu...> - 2001-10-04 15:28:57
|
Just to help debug the situation, I'd try using a java.policy file with: grant { // Allow everything for now permission java.security.AllPermission; }; If you still get a permission denied then you know that the permissions aren't getting communicated. (RMI security can be painful and quirky.) If it doesn work then you know that your original permissions weren't liberal enough. > -----Original Message----- > From: tcl...@li... > [mailto:tcl...@li...]On Behalf Of Ed Murphy > Sent: Thursday, October 04, 2001 10:12 AM > To: 'tcl...@li...' > Subject: [tcljava-user] Tcl Blend and Policy Files > > > I've been through tons of docs but haven't been able to figure out the > following problem. I've got a Java program that when run from the command > line like so: > > java -Djava.rmi.server.codebase=file:/d:\CalcEng\UniMrcServer.jar > -Djava.security.policy=file:/d:\CalcEng\java.policy MrcClient kange1 2000 > pro cost > > works. When run using Tcl Blend with > > set tclblend_init > "-Djava.rmi.server.codebase=file:/D:\\CalcEng\\UniMrcServer.jar > -Djava.security.policy=file:/D:\\CalcEng\\java.policy" > > I get an error: > > access denied (java.net.SocketPermission 127.0.0.1:2000 connect,resolve) > java.security.AccessControlException: access denied > (java.net.SocketPermission 127.0.0.1:2000 connect,resolve) > at > java.security.AccessControlContext.checkPermission(AccessControlContext.java > :195) > at > java.security.AccessController.checkPermission(AccessController.java:403) > at > java.lang.SecurityManager.checkPermission(SecurityManager.java:549) > at java.lang.SecurityManager.checkConnect(SecurityManager.java:1021) > at java.net.Socket.<init>(Socket.java:258) > at java.net.Socket.<init>(Socket.java:98) > at > sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketF > actory.java:29) > at > sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketF > actory.java:124) > at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:497) > at > sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:194) > at > sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:178) > at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322) > at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source) > at MrcClient.main(MrcClient.java, Compiled Code) > at java.lang.reflect.Method.invoke(Native Method) > at tcl.lang.reflect.PkgInvoker.invokeMethod(PkgInvoker.java:125) > at tcl.lang.JavaInvoke.call(JavaInvoke.java, Compiled Code) > at tcl.lang.JavaInvoke.callMethod(JavaInvoke.java:114) > at tcl.lang.ReflectObject.cmdProc(ReflectObject.java:907) > at tcl.lang.Interp.callCommand(Interp.java:953) > > The grant in the java.policy file is > > permission java.net.SocketPermission "*:1024-65535", "connect,accept"; > > I guess the first question would be, am I doing equivalent things between > the Java command line and the tclblend_init variable above? > > Regards, > > Ed > > > > > _______________________________________________ > tcljava-user mailing list > tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcljava-user |