Hi, Dan. The policy file is properly located. See where it is located:
hel...@xavante:~/jini/servicos$ ls
jsk-all.policy start-transient-jeri-all.config~
transient-jeri-mahalo.config~
jsk-all.policy~ start-transient-jeri-mahalo.config
transient-jeri-mercury.config
start-jeri-all start-transient-jeri-reggie.config
transient-jeri-norm.config
start-jeri-mahalo start-transient-jrmp-reggie.config
transient-jeri-outrigger.config
start-jeri-reggie start-ws
transient-jeri-reggie.config
start-jrmp-reggie transient-jeri-fiddler.config
transient-jrmp-reggie.config
start-transient-jeri-all.config transient-jeri-mahalo.config
transient-jrmp-reggie.config~
Now, see how I try to start ServiceStarter and what's happen:
hel...@xavante:~/jini/servicos$ java
-Djava.security.policy=jsk-all.policy -jar
/usr/local/apache-river-2.1.1/lib/start.jar
start-transient-jeri-all.config
12/01/2011 13:45:24 com.sun.jini.tool.ClassServer run
INFO: ClassServer started [[/usr/local/apache-river-2.1.1/lib-dl/],
port 8080]
fiddler-dl.jar requested from localhost:55436
jsk-dl.jar requested from localhost:55437
12/01/2011 13:45:24 com.sun.jini.fiddler.FiddlerImpl logInfoStartup
INFO: Fiddler started: 5c9bdbf4-8622-4847-b3e2-dd82cf955272, [public],
[]
fiddler-dl.jar probed from localhost:55438
fiddler-dl.jar requested from localhost:55439
jsk-dl.jar requested from localhost:55440
mahalo-dl.jar requested from localhost:55441
jsk-dl.jar requested from localhost:55442
12/01/2011 13:45:25 com.sun.jini.mahalo.TxnManagerImpl doInit
INFO: Mahalo started: com.sun.jini.mahalo.transientmahaloi...@1c9b9ca
mahalo-dl.jar probed from localhost:55443
mahalo-dl.jar requested from localhost:55444
mercury-dl.jar requested from localhost:55445
jsk-dl.jar requested from localhost:55446
12/01/2011 13:45:25 com.sun.jini.mercury.MailboxImpl doInit
INFO: Mercury started:
com.sun.jini.mercury.transientmercuryi...@12c7568
mercury-dl.jar probed from localhost:55447
mercury-dl.jar requested from localhost:55448
norm-dl.jar requested from localhost:55449
jsk-dl.jar requested from localhost:55450
12/01/2011 13:45:25 com.sun.jini.norm.NormServerBaseImpl init
INFO: Norm service started:
TransientNormServerImpl[bd9baf0a-cd81-4387-91ea-db85dba01f20]
norm-dl.jar probed from localhost:55451
norm-dl.jar requested from localhost:55452
outrigger-dl.jar requested from localhost:55453
jsk-dl.jar requested from localhost:55454
12/01/2011 13:45:26 com.sun.jini.outrigger.OutriggerServerImpl <init>
INFO: Outrigger server started:
com.sun.jini.outrigger.outriggerserveri...@145f0e3
outrigger-dl.jar probed from localhost:55455
outrigger-dl.jar requested from localhost:55456
reggie-dl.jar requested from localhost:55457
jsk-dl.jar requested from localhost:55458
12/01/2011 13:45:26 com.sun.jini.reggie.RegistrarImpl init
INFO: started Reggie: 3585a177-03c4-4213-bb55-1b432693fdd9, [public],
ConstrainableLookupLocator[[jini://xavante/], [null]]
reggie-dl.jar probed from localhost:55459
reggie-dl.jar requested from localhost:55460
12/01/2011 13:45:26 net.jini.lookup.JoinManager$ProxyReg fail
INFO: JoinManager - failure
java.security.AccessControlException: access denied
(java.net.SocketPermission 127.17.3.161:48814 connect,resolve)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
at
java.security.AccessController.checkPermission(AccessController.java:546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.checkConnect(SecurityManager.java:1034)
at java.net.Socket.connect(Socket.java:524)
at
net.jini.jeri.tcp.TcpEndpoint$ConnectionEndpointImpl.connectToSocketAddress(TcpEndpoint.java:678)
at
net.jini.jeri.tcp.TcpEndpoint$ConnectionEndpointImpl.connectToHost(TcpEndpoint.java:608)
at
net.jini.jeri.tcp.TcpEndpoint$ConnectionEndpointImpl.connect(TcpEndpoint.java:543)
at
net.jini.jeri.connection.ConnectionManager.connect(ConnectionManager.java:228)
at
net.jini.jeri.connection.ConnectionManager$ReqIterator.next(ConnectionManager.java:629)
at
net.jini.jeri.BasicObjectEndpoint$1.next(BasicObjectEndpoint.java:371)
at
net.jini.jeri.BasicInvocationHandler.invokeRemoteMethodOnce(BasicInvocationHandler.java:708)
at
net.jini.jeri.BasicInvocationHandler.invokeRemoteMethod(BasicInvocationHandler.java:659)
at
net.jini.jeri.BasicInvocationHandler.invoke(BasicInvocationHandler.java:528)
at com.sun.jini.reggie.$Proxy11.register(Unknown Source)
I can't see what is wrong. I really don't know where is the error...
Best regards.
Helcio Wagner.
2011/1/12 Dan Creswell <[email protected]>:
> Looks like you're policy isn't right on first blush.
>
> That could be because it's not located on the path you've specified or
> because the path in the policy file isn't right.
>
> It could also be down to where you run the start command from. I'm looking
> at this:
>
> -Djava.security.policy=jsk-all.policy
>
> And noting that's a relative path so unless your current working directory
> is the one in which this file is located, it won't be loaded.
>
>
> On 12 January 2011 15:15, helcio silva <[email protected]> wrote:
>
>> Hello to everybody.
>>
>> I've used to start reggie to build my client/server applications.
>> Now, I need to use the transaction manager, named mahalo, but I can't
>> start it. My first trial was try to start it after reggie, but it
>> throws an exception. Next, I tried to use the servicestarter utility,
>> but it didn't work. Some information will be provided below:
>>
>> i) the way I start the servicestarter:
>>
>> java -Djava.security.policy=jsk-all.policy -jar
>> /usr/local/apache-river-2.1.1/lib/start.jar
>> start-transient-jeri-all.config
>>
>> ii) the policy file, named jsk-all.policy:
>>
>> grant codebase "file:/usr/local/apache-river-2.1.1/lib/*" {
>> permission java.security.AllPermission;
>> };
>>
>>
>