Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > A strange problem when I start JINI lookup service

Reply
Thread Tools

A strange problem when I start JINI lookup service

 
 
Zheng Da
Guest
Posts: n/a
 
      02-26-2006
I installed JINI in d:\jini2_1.
I started http service, and it succeeded:
D:\>java -jar jini2_1\lib\classserver.jar -port 8080 -dir
jini2_1\lib-dl
Feb 26, 2006 4:04:07 AM com.sun.jini.tool.ClassServer run
INFO: ClassServer started [[jini2_1\lib-dl\], port 8080]

The config files are from the Hello example in JINI, and I made some
little change, and put them in the path of jini2_1\myconfig.

start-reggie.config:
/* Configuration file for starting non-secure Reggie */

import com.sun.jini.config.ConfigUtil;
import com.sun.jini.start.NonActivatableServiceDescriptor ;
import com.sun.jini.start.ServiceDescriptor;

com.sun.jini.start {

private static codebase =
ConfigUtil.concat(
new Object[] {
"http://", ConfigUtil.getHostName(), ":8080/reggie-dl.jar",
" ",
"http://", ConfigUtil.getHostName(), ":8080/jsk-dl.jar"
} );
private static policy = "${/}jini2_1${/}myconfig${/}reggie.policy";
private static classpath = "${/}jini2_1${/}lib${/}reggie.jar";
private static config =
"${/}jini2_1${/}myconfig${/}jrmp-reggie.config";

static serviceDescriptors = new ServiceDescriptor[] {
new NonActivatableServiceDescriptor(
codebase, policy, classpath,
"com.sun.jini.reggie.TransientRegistrarImpl",
new String[] { config })
};

}//end com.sun.jini.start
-------------------------------------------------------------------------------------------------------------------------------
start.policy:
/* Policy file for the service starter */

grant{
permission java.security.AllPermission;
};
--------------------------------------------------------------------------------------------------------------------------------
jrmp-reggie.config:
/* Configure source file for JRMP reggie */

import net.jini.jrmp.JrmpExporter;

com.sun.jini.reggie {

serverExporter = new JrmpExporter();
initialMemberGroups = new String[] { "" };

}//end com.sun.jini.reggie



Then I started JINI lookup service, but when I started it in the path
of D:\jini2_1\source\src\com\sun\jini\example\hello, it would succeed
D:\jini2_1\source\src\com\sun\jini\example\hello>j ava
-Djava.security.policy=/jini2_1/myconfig/start.policy -jar
/jini2_1/lib/start.jar /jini2_1/myconfig/start-reggie.config
Feb 26, 2006 1:04:23 PM com.sun.jini.reggie.RegistrarImpl init
INFO: started Reggie: f86244ec-994b-4ccd-a567-5031421e517e, [],
jini://school-44bb4a4a/

But if I started the service in the other paths, it would get some
exception:
D:\jini2_1\source\src\com\sun\jini\example>java
-Djava.security.policy=/jini2_1/
myconfig/start.policy -jar /jini2_1/lib/start.jar
/jini2_1/myconfig/start-reggie
..config
Feb 26, 2006 12:50:26 PM com.sun.jini.reggie.RegistrarImpl <init>
SEVERE: Reggie initialization failed
net.jini.config.ConfigurationException:
\jini2_1\myconfig\jrmp-reggie.configro
blem reading configuration file; caused by:
java.security.AccessControlException: access denied
(java.io.FilePermiss
ion \jini2_1\myconfig\jrmp-reggie.config read)
at
net.jini.config.ConfigurationFile.oops(Configurati onFile.java:2746)
at
net.jini.config.ConfigurationFile.<init>(Configura tionFile.java:1815)

at
net.jini.config.ConfigurationProvider.getInstance( ConfigurationProvid
er.java:225)
at
com.sun.jini.reggie.RegistrarImpl.<init>(Registrar Impl.java:391)
at
com.sun.jini.reggie.TransientRegistrarImpl.<init>( TransientRegistrarI
mpl.java:37)
at
sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)

at
sun.reflect.NativeConstructorAccessorImpl.newInsta nce(Unknown Source)

at
sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(Unknown Sou
rce)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at
com.sun.jini.start.NonActivatableServiceDescriptor .create(NonActivata
bleServiceDescriptor.java:62
at
com.sun.jini.start.ServiceStarter.create(ServiceSt arter.java:290)
at
com.sun.jini.start.ServiceStarter.main(ServiceStar ter.java:470)
Caused by: java.security.AccessControlException: access denied
(java.io.FilePerm
ission \jini2_1\myconfig\jrmp-reggie.config read)
at java.security.AccessControlContext.checkPermission (Unknown
Source)
at java.security.AccessController.checkPermission(Unk nown
Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkRead(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at
net.jini.config.ConfigurationFile.<init>(Configura tionFile.java:1801)

... 10 more
Feb 26, 2006 12:50:26 PM com.sun.jini.start.ServiceStarter
checkResultFailures
WARNING: Exception creating service.
java.lang.reflect.InvocationTargetException
at
sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)

at
sun.reflect.NativeConstructorAccessorImpl.newInsta nce(Unknown Source)

at
sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(Unknown Sou
rce)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at
com.sun.jini.start.NonActivatableServiceDescriptor .create(NonActivata
bleServiceDescriptor.java:62
at
com.sun.jini.start.ServiceStarter.create(ServiceSt arter.java:290)
at
com.sun.jini.start.ServiceStarter.main(ServiceStar ter.java:470)
Caused by: net.jini.config.ConfigurationException:
\jini2_1\myconfig\jrmp-reggie
..configroblem reading configuration file; caused by:
java.security.AccessControlException: access denied
(java.io.FilePermiss
ion \jini2_1\myconfig\jrmp-reggie.config read)
at
net.jini.config.ConfigurationFile.oops(Configurati onFile.java:2746)
at
net.jini.config.ConfigurationFile.<init>(Configura tionFile.java:1815)

at
net.jini.config.ConfigurationProvider.getInstance( ConfigurationProvid
er.java:225)
at
com.sun.jini.reggie.RegistrarImpl.<init>(Registrar Impl.java:391)
at
com.sun.jini.reggie.TransientRegistrarImpl.<init>( TransientRegistrarI
mpl.java:37)
... 7 more
Caused by: java.security.AccessControlException: access denied
(java.io.FilePerm
ission \jini2_1\myconfig\jrmp-reggie.config read)
at java.security.AccessControlContext.checkPermission (Unknown
Source)
at java.security.AccessController.checkPermission(Unk nown
Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkRead(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at
net.jini.config.ConfigurationFile.<init>(Configura tionFile.java:1801)

... 10 more
Feb 26, 2006 12:50:26 PM com.sun.jini.start.ServiceStarter
checkResultFailures
WARNING: Associated service descriptor [0]:
[http://school-44bb4a4a:8080/reggie-
dl.jar http://school-44bb4a4a:8080/jsk-dl.jar,
\jini2_1\myconfig\reggie.policy,
\jini2_1\lib\reggie.jar, com.sun.jini.reggie.TransientRegistrarImpl,
[\jini2_1\m
yconfig\jrmp-reggie.config],
com.sun.jini.start.NonActivatableServiceDescriptor $
1@7a78d3, BasicProxyPreparer[]]

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JINI & reggie lookup service configuration. Mr. X. Java 0 07-05-2007 09:22 PM
JINI service -- Python client asmirnov1234567890@yahoo.com Java 2 01-10-2006 11:08 PM
JINI service -- Python client asmirnov1234567890@yahoo.com Python 2 01-10-2006 11:08 PM
Servlet / Jini Lookup pbm felix Java 0 03-15-2005 03:21 PM
Unable to Start JINI LookupServer subrahmanyam.oruganti@gmail.com Java 0 01-03-2005 05:38 AM



Advertisments