JINI : reggie

Discussion in 'Java' started by javier moreno, Aug 17, 2004.

  1. 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
     
    javier moreno, Aug 17, 2004
    #1
    1. Advertising

  2. javier moreno

    zoopy Guest

    On 17-8-2004 11:32, javier moreno wrote:

    > 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.

    --
    Regards,
    Z.
     
    zoopy, Aug 17, 2004
    #2
    1. Advertising

  3. 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
     
    javier moreno, Aug 17, 2004
    #3
  4. javier moreno

    zoopy Guest

    On 17-8-2004 12:47, javier moreno wrote:

    > 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]

    --
    Regards,
    Z.
     
    zoopy, Aug 17, 2004
    #4
  5. 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" <> a écrit dans le message de
    news:4121f60a$0$559$4all.nl...
    > On 17-8-2004 12:47, javier moreno wrote:
    >
    > > 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]
    >
    > --
    > Regards,
    > Z.
     
    javier moreno, Aug 17, 2004
    #5
  6. javier moreno

    sourabh

    Joined:
    Mar 26, 2008
    Messages:
    1
    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
     
    sourabh, Mar 26, 2008
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bill Atkins

    Using Jini for Print Services

    Bill Atkins, Aug 2, 2003, in forum: Java
    Replies:
    0
    Views:
    478
    Bill Atkins
    Aug 2, 2003
  2. Albert Deinbeck

    Is JINI dead?

    Albert Deinbeck, Feb 14, 2004, in forum: Java
    Replies:
    5
    Views:
    1,498
    Albert Deinbeck
    Feb 22, 2004
  3. EExtasEE

    JINI 1.2 : REGGIE

    EExtasEE, Feb 4, 2005, in forum: Java
    Replies:
    0
    Views:
    497
    EExtasEE
    Feb 4, 2005
  4. Mr. X.
    Replies:
    0
    Views:
    334
    Mr. X.
    Jul 5, 2007
  5. Mr. X.
    Replies:
    2
    Views:
    345
    Mr. X.
    Jul 18, 2007
Loading...

Share This Page