JINI : reggie

J

javier moreno

hi,
i got a little problem trying to lunch reggie that's the command line i
typed after configuring my files as shown here :
http://jan.netcomp.monash.edu.au/java/jini/tutorial/LookupDiscovery.xml


that's what i did :

C:\jini2_0_002\lib>java -Djava.security.policy=C:\jini2_0_002/lib/startup/se
rvices/reggie/start.policy -jar C:\jini2_0_002\lib\start.jar \
C:\jini2_0_002\lib\
startup\services\reggie\start-transient-reggie.config

result:
Exception in thread "main" java.lang.ExceptionInInitializerError
at
net.jini.config.ConfigurationProvider.getInstance(ConfigurationProvid
er.java:193)
at
net.jini.config.ConfigurationProvider.getInstance(ConfigurationProvid
er.java:150)
at com.sun.jini.start.ServiceStarter.main(ServiceStarter.java:468)
Caused by: java.security.AccessControlException: access denied
(java.lang.Runtim
ePermission createSecurityManager)
at
java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:269)
at
java.security.AccessController.checkPermission(AccessController.java:
401)
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
at java.lang.SecurityManager.<init>(SecurityManager.java:280)
at
net.jini.security.Security$ClassContextAccess.<init>(Security.java:96
1)
at
net.jini.security.Security$ClassContextAccess.<init>(Security.java:96
1)
at net.jini.security.Security$1.run(Security.java:175)
at java.security.AccessController.doPrivileged(Native Method)
at net.jini.security.Security.<clinit>(Security.java:173)
... 3 more


thanks for your answers
 
Z

zoopy

hi,
i got a little problem trying to lunch reggie that's the command line i
typed after configuring my files as shown here :
http://jan.netcomp.monash.edu.au/java/jini/tutorial/LookupDiscovery.xml


that's what i did :

C:\jini2_0_002\lib>java -Djava.security.policy=C:\jini2_0_002/lib/startup/se
rvices/reggie/start.policy -jar C:\jini2_0_002\lib\start.jar \ --^ --^
C:\jini2_0_002\lib\
startup\services\reggie\start-transient-reggie.config

result:
Exception in thread "main" java.lang.ExceptionInInitializerError
at
net.jini.config.ConfigurationProvider.getInstance(ConfigurationProvider.java:193)
at
net.jini.config.ConfigurationProvider.getInstance(ConfigurationProvider.java:150)
at com.sun.jini.start.ServiceStarter.main(ServiceStarter.java:468)
Caused by: java.security.AccessControlException: access denied
(java.lang.RuntimePermission createSecurityManager)
[snipped rest of stacktrace]

Try to replace forward slash / by backslash \ in your policy file path:

-Djava.security.policy=C:\jini2_0_002\lib\startup\services\reggie\start.policy

The policy file probably couldn't found, which caused the 'access denied" security exception.
 
J

javier moreno

i have changes the / to \ but still having the same problem

Command line :
C:\jini2_0_002\lib>java -Djava.security.policy=C:\jini2_0_002\lib\startup\se
rvices\reggie\start.policy -jar C:\jini2_0_002\lib\start.jar \
C:\jini2_0_002\lib\
startup\services\reggie\start-transient-reggie.config

Result :
Exception in thread "main" java.lang.ExceptionInInitializerError
at
net.jini.config.ConfigurationProvider.getInstance(ConfigurationProvid
er.java:193)
at
net.jini.config.ConfigurationProvider.getInstance(ConfigurationProvid
er.java:150)
at com.sun.jini.start.ServiceStarter.main(ServiceStarter.java:468)
Caused by: java.security.AccessControlException: access denied
(java.lang.Runtim
ePermission createSecurityManager)
at
java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:269)
at
java.security.AccessController.checkPermission(AccessController.java:
401)
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
at java.lang.SecurityManager.<init>(SecurityManager.java:280)
at
net.jini.security.Security$ClassContextAccess.<init>(Security.java:96
1)
at
net.jini.security.Security$ClassContextAccess.<init>(Security.java:96
1)
at net.jini.security.Security$1.run(Security.java:175)
at java.security.AccessController.doPrivileged(Native Method)
at net.jini.security.Security.<clinit>(Security.java:173)
... 3 more
 
Z

zoopy

i have changes the / to \ but still having the same problem

Command line :
C:\jini2_0_002\lib>java -Djava.security.policy=C:\jini2_0_002\lib\startup\se
rvices\reggie\start.policy -jar C:\jini2_0_002\lib\start.jar \
C:\jini2_0_002\lib\
startup\services\reggie\start-transient-reggie.config

Result :
Exception in thread "main" java.lang.ExceptionInInitializerError
at
net.jini.config.ConfigurationProvider.getInstance(ConfigurationProvid
er.java:193)
at
net.jini.config.ConfigurationProvider.getInstance(ConfigurationProvid
er.java:150)
at com.sun.jini.start.ServiceStarter.main(ServiceStarter.java:468)
Caused by: java.security.AccessControlException: access denied
(java.lang.Runtim
ePermission createSecurityManager)
at
java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:269)
at
java.security.AccessController.checkPermission(AccessController.java:
401)
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
at java.lang.SecurityManager.<init>(SecurityManager.java:280)
at
net.jini.security.Security$ClassContextAccess.<init>(Security.java:96
1)
at
net.jini.security.Security$ClassContextAccess.<init>(Security.java:96
1)
at net.jini.security.Security$1.run(Security.java:175)
at java.security.AccessController.doPrivileged(Native Method)
at net.jini.security.Security.<clinit>(Security.java:173)
... 3 more

Hmm... apparently it doesn't allow you to create (or change) the SecurityManager (access denied:
java.lang.RuntimePermission createSecurityManager). There seems to be a problem with the Java
security settings of the application.

Check inside the policy file (does it actually exist?, is it readable by the app?) and see if you
need to change some paths and values to match your environment. Can't help you on that any further,
you'll have to refer to the link you provided earlier.

[Another thought, but I don't think this is a problem: do you run the app on your own PC, or in a
controlled environment, e.g. a University or school computer lab? In the latter case it might be
possible that there are some 'global' Java security restrictions enforced, e.g. that the java
command is always executed with a SecrityManager (enforced by a 'global' policy file, e.g. in the
install dir of the JRE), causing it to refuse the replacement of the existing SecrityManager. As
said, I don't think this is the case, it's more likely a problem with the security settings in the
application]
 
J

javier moreno

i found what's wrong .
I changed the syntax of my policy file and that's work but the problem was
on my config files.
thanks for all and have a nice day
zoopy said:
Hmm... apparently it doesn't allow you to create (or change) the
SecurityManager (access denied:
java.lang.RuntimePermission createSecurityManager). There seems to be a problem with the Java
security settings of the application.

Check inside the policy file (does it actually exist?, is it readable by the app?) and see if you
need to change some paths and values to match your environment. Can't help you on that any further,
you'll have to refer to the link you provided earlier.

[Another thought, but I don't think this is a problem: do you run the app on your own PC, or in a
controlled environment, e.g. a University or school computer lab? In the latter case it might be
possible that there are some 'global' Java security restrictions enforced, e.g. that the java
command is always executed with a SecrityManager (enforced by a 'global' policy file, e.g. in the
install dir of the JRE), causing it to refuse the replacement of the existing SecrityManager. As
said, I don't think this is the case, it's more likely a problem with the security settings in the
application]
 
Joined
Mar 26, 2008
Messages
1
Reaction score
0
registering service with jini lookup using joinmanager

hi all,
I am registering ,my service with jini lookup service but when i create the object of
joinmanager [joinmanager = new JoinManager(remote, myattr, this, manager,new LeaseRenewalManager()); ] it throws following exception:
Exception in thread "main" java.lang.ExceptionInInitializerError
at net.jini.discovery.LookupDiscovery.<init>(LookupDiscovery.java:781)
at net.jini.discovery.LookupDiscoveryManager.beginDiscovery(LookupDiscoveryManager.java:1493)
at net.jini.discovery.LookupDiscoveryManager.<init>(LookupDiscoveryManager.java:936)
at net.jini.lookup.JoinManager.createJoinManager(JoinManager.java:2564)
at net.jini.lookup.JoinManager.<init>(JoinManager.java:1620)
at JoinJini.join(JoinJini.java:598)
at PhysicalBladeRM.main(PhysicalBladeRM.java:93)
Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission createSecurityManager)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
at java.security.AccessController.checkPermission(AccessController.java:427)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.<init>(SecurityManager.java:282)
at net.jini.security.Security$ClassContextAccess.<init>(Security.java:965)
at net.jini.security.Security$ClassContextAccess.<init>(Security.java:965)
at net.jini.security.Security$1.run(Security.java:167)
at java.security.AccessController.doPrivileged(Native Method)
at net.jini.security.Security.<clinit>(Security.java:165)
... 7 more
plz help me.
thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top