jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Bocanegra <tobias.bocane...@day.com>
Subject Re: JCR-RMI question
Date Mon, 28 Nov 2005 18:08:20 GMT
how to you register the repository?

take a look at the RepositoryStartupServlet in the jcr-server contrib.
make sure to set the useCodeBaseOnly system property:

System.setProperty("java.rmi.server.useCodebaseOnly", "true");

before binding the remote repository.
regards, toby

On 11/28/05, Peter Darton <peterd@intrinsica.co.uk> wrote:
> 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
> working.
>
> 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:
>        java.lang.ClassNotFoundException:
> org.apache.jackrabbit.rmi.server.ServerRepository_Stub
>        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
> complicated...
>
> Can anyone tell me what I'm doing wrong here?
>
> Many thanks,
>
>  Peter
>
> _____________________________________________________________________
> 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
>
>


--
-----------------------------------------< tobias.bocanegra@day.com >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---

Mime
View raw message