You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Andries Demont <an...@student.kuleuven.be> on 2005/08/23 11:15:05 UTC
remote access with a client
hi all
I deployed the jack-rabbit server on the tomcat 5.5 server.
The client i use looks like this:
String name = "//laptop-steven:2005/jackrabbit.repository";
ClientRepositoryFactory crf = new ClientRepositoryFactory();
Repository repository = crf.getRepository(name);
RemoteAdapterFactory factory = new ServerAdapterFactory();
RemoteRepository remote = factory.getRemoteRepository(repository);
Naming.bind(name, remote);// Make the RMI binding using java.rmi.Naming
RemoteSession session = remote.login(new SimpleCredentials
("userid", "".toCharArray()), null);
I tried a lot of urls, but none of them worked. I'm still a beginner
in distibuted software, so I think this isn't a difficult problem. Can
anybody help me?
This is the stacktrace of the code above:
java.rmi.UnmarshalException: error unmarshalling return; nested
exception is:
java.net.MalformedURLException: no protocol: Software
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Unknown Source)
at
org.apache.jackrabbit.rmi.client.ClientRepositoryFactory.getRepository
(ClientRepositoryFactory.java:99)
at Remote_Test.main(Remote_Test.java:36)
caused by:
java.net.MalformedURLException: no protocol: Software
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at sun.rmi.server.LoaderHandler.pathToURLs(Unknown Source)
at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
at java.rmi.server.RMIClassLoader$2.loadClass(Unknown Source)
at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
at sun.rmi.server.MarshalInputStream.resolveClass(Unknown
Source)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
Re: remote access with a client
Posted by Tobias Bocanegra <to...@gmail.com>.
this is probably due to a bug in jdk and spaces in the codebase. see:
http://forum.java.sun.com/thread.jspa?threadID=282485&messageID=1110739
workaround: set useCodebaseOnly system property
System.setProperty("java.rmi.server.useCodebaseOnly", "true");
RemoteAdapterFactory factory = new ServerAdapterFactory();
RemoteRepository remote = factory.getRemoteRepository(repository);
cheers, tobi
On 8/23/05, Andries Demont <an...@student.kuleuven.be> wrote:
> hi all
>
> I deployed the jack-rabbit server on the tomcat 5.5 server.
>
> The client i use looks like this:
>
> String name = "//laptop-steven:2005/jackrabbit.repository";
>
> ClientRepositoryFactory crf = new ClientRepositoryFactory();
> Repository repository = crf.getRepository(name);
>
> RemoteAdapterFactory factory = new ServerAdapterFactory();
> RemoteRepository remote = factory.getRemoteRepository(repository);
> Naming.bind(name, remote);// Make the RMI binding using java.rmi.Naming
>
> RemoteSession session = remote.login(new SimpleCredentials
> ("userid", "".toCharArray()), null);
>
>
> I tried a lot of urls, but none of them worked. I'm still a beginner
> in distibuted software, so I think this isn't a difficult problem. Can
> anybody help me?
>
> This is the stacktrace of the code above:
>
> java.rmi.UnmarshalException: error unmarshalling return; nested
> exception is:
> java.net.MalformedURLException: no protocol: Software
> at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
> at java.rmi.Naming.lookup(Unknown Source)
> at
> org.apache.jackrabbit.rmi.client.ClientRepositoryFactory.getRepository
> (ClientRepositoryFactory.java:99)
> at Remote_Test.main(Remote_Test.java:36)
> caused by:
> java.net.MalformedURLException: no protocol: Software
> at java.net.URL.<init>(Unknown Source)
> at java.net.URL.<init>(Unknown Source)
> at java.net.URL.<init>(Unknown Source)
> at sun.rmi.server.LoaderHandler.pathToURLs(Unknown Source)
> at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
> at java.rmi.server.RMIClassLoader$2.loadClass(Unknown Source)
> at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
> at sun.rmi.server.MarshalInputStream.resolveClass(Unknown
> Source)
> at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
> at java.io.ObjectInputStream.readClassDesc(Unknown Source)
> at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
> at java.io.ObjectInputStream.readObject0(Unknown Source)
>
>
>
>
>
>
--
-----------------------------------------< 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 >---