jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Darton" <pet...@intrinsica.co.uk>
Subject JCR-RMI question
Date Mon, 28 Nov 2005 17:43:55 GMT
Has anyone here been using the JCR-RMI package?
Is this a good place to ask questions about it (it seems to have no
dedicated mailing list of its own)?

I am trying to run a number of JCRs (implemented using Jackrabbit) on a
server machine and make that service available through RMI.

I've written a simple command-line application (Main.java) that starts
one or more Jackrabbit repositories and then registers them with the RMI
naming service.
I originally assumed it would be fairly simple, as I've just been
pasting bits of code together from examples in the documentation (i.e.
nothing clever), so I'd rather expected it "just to work", but it isn't

The problem is that I get the following exception reported:

java.rmi.ServerException: RemoteException occurred in server thread;
nested exception is: 
        java.rmi.UnmarshalException: error unmarshalling arguments;
nested exception is: 
        at sun.rmi.server.UnicastServerRef.oldDispatch(Unknown Source)
<trace cut for brevity>
        at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
        at java.rmi.Naming.rebind(Naming.java:160)
        at jackrabbitdaemon.Main.startRmiRepository(Main.java:69)
        at jackrabbitdaemon.Main.main(Main.java:179)
<trace continues to list underlying exception, and the exception that
caused that - see attached "fullProgramOutput.txt" for the whole lot>

The exception is being thrown after I've started the Jackrabbit
repository, right at the point where I attempt to (re)bind the RMI-JCR's
RemoteRepository object to the RMI name "//drnick:1099/configAuthor"
(drnick is my hostname).

I originally suspected it was caused by a lack of a security policy (one
web page told me that failure to set a policy will cause RMI to refuse
to load external classes), so I passed in the arguments
-Djava.security.manager and -Djava.security.policy=securityPolicy.txt
(which is being loaded, as removing the permission causes Jackrabbit to
fail to start with a security error).  However that failed to fix it.
I've also tried passing in the same arguments to RMID (rmid.exe
-J-Djava.security.manager -J-Djava.security.policy=securityPolicy.txt
-J-Dsun.rmi.activation.execPolicy=none -port 1099), but that's had no
effect either.

I suspect I'm missing something that'll be obvious that everyone who
"knows RMI" (which I'm rather new to), at least I hope it's nothing too

Can anyone tell me what I'm doing wrong here?

Many thanks,


This e-mail has been scanned for viruses by MCI's Internet Managed Scanning Services - powered
by MessageLabs. For further information visit http://www.mci.com
View raw message