• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

RMI Dynamic Class Loading.

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sir,
I tried the example from below URL. http://developer.java.sun.com/developer/JDCTechTips/2001/tt0227.html#dynamic
I encounter the following error message when i run the client program.
Below is the error message.
C:\jdk1.3.1\Article_eg\test_2>set CLASSPATH=c:\jdk1.3.1\Article_eg\test_2\Client;c:\jdk1.3.1\Article_eg\test_2\Client\EchoClient
C:\jdk1.3.1\Article_eg\test_2>java -cp Client \
-Dsun.rmi.loader.logLevel=VERBOSE \
-Djava.security.policy=Client/SimpleRMI.policy \
-Djava.security.manager EchoClient
Connecting to echo server...
java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:1099 connect,resolve) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source)at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.SecurityManager.checkConnect(Unknown Source)at java.net.Socket.<init>(Unknown Source) at java.net.Socket.<init>(Unknown Source)at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source) at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source) at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source) at sun.rmi.server.UnicastRef.newCall(Unknown Source) at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source) at java.rmi.Naming.lookup(Unknown Source) at EchoClient.main(EchoClient.java:7)
C:\jdk1.3.1\Article_eg\test_2>

Here is the content of the SimpleRMI.policy file.
grant {
permission java.net.SocketPermission" *:1024-", "accept, connect";
permission java.io.FilePermission "${/}c${/}jdk1.3.1${/}Article_eg${/}test_2${/}Client${/}-", "read";
};
I am new in RMI.
Can anyone of you please help me?
What's wrong ?
Thank you in advance.
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have u tried giving all permissions to your code base ??
 
Charlotte Niy
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks,
I have the permission and it is fine now.
Thanks for your help.
 
I am displeased. You are no longer allowed to read this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic