You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by qcfireball <qc...@yahoo.com> on 2007/06/15 18:16:58 UTC
jcr-rmi problems
Tomcat server log shows that the RMI Objects are created in the RMI registry.
I can retrieve an instance of the Repository factory OK via:
ClientRepositoryFactory factory = new ClientRepositoryFactory();
final Object o = factory.getRepository(s);
but when I try to "login" to the "default" workspace, I get the following
RMI error:
org.apache.jackrabbit.rmi.client.RemoteRepositoryException: error
unmarshalling return; nested exception is:
java.net.MalformedURLException: no protocol: and: error
unmarshalling return; nested exception is:
java.net.MalformedURLException: no protocol: and
at
org.apache.jackrabbit.rmi.client.SafeClientRepository.remoteLogin(SafeClientRepository.java:112)
at
org.apache.jackrabbit.rmi.client.SafeClientRepository.login(SafeClientRepository.java:120)
at testjackrabbit.Main.showRepository(Main.java:76)
at testjackrabbit.Main.main(Main.java:55)
Caused by: java.rmi.UnmarshalException: error unmarshalling return; nested
exception is:
java.net.MalformedURLException: no protocol: and
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Naming.java:84)
at
org.apache.jackrabbit.rmi.client.ClientRepositoryFactory$1.getRemoteRepository(ClientRepositoryFactory.java:95)
at
org.apache.jackrabbit.rmi.client.SafeClientRepository.remoteLogin(SafeClientRepository.java:108)
... 3 more
Caused by: java.net.MalformedURLException: no protocol: and
at java.net.URL.<init>(URL.java:567)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at sun.rmi.server.LoaderHandler.pathToURLs(LoaderHandler.java:747)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:147)
at
java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
at
sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197)
at
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544)
at
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
... 7 more
java.rmi.UnmarshalException: error unmarshalling return; nested exception
is:
java.net.MalformedURLException: no protocol: and
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Naming.java:84)
at
org.apache.jackrabbit.rmi.client.ClientRepositoryFactory$1.getRemoteRepository(ClientRepositoryFactory.java:95)
at
org.apache.jackrabbit.rmi.client.SafeClientRepository.remoteLogin(SafeClientRepository.java:108)
at
org.apache.jackrabbit.rmi.client.SafeClientRepository.login(SafeClientRepository.java:120)
at testjackrabbit.Main.showRepository(Main.java:76)
at testjackrabbit.Main.main(Main.java:55)
Caused by: java.net.MalformedURLException: no protocol: and
at java.net.URL.<init>(URL.java:567)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at sun.rmi.server.LoaderHandler.pathToURLs(LoaderHandler.java:747)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:147)
at
java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
at
sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197)
at
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544)
at
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
... 7 more
--
View this message in context: http://www.nabble.com/jcr-rmi-problems-tf3928960.html#a11142998
Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.
Re: jcr-rmi problems
Posted by qcfireball <qc...@yahoo.com>.
I just had a BIG "A H A A A" - I forgot about that. I had a similar
problem with Unix classpaths. Thank you VERY much for your help.
Christoph Kiehl wrote:
>
> qcfireball wrote:
>
>> Tomcat server log shows that the RMI Objects are created in the RMI
>> registry.
>>
>> I can retrieve an instance of the Repository factory OK via:
>>
>> ClientRepositoryFactory factory = new ClientRepositoryFactory();
>> final Object o = factory.getRepository(s);
>>
>> but when I try to "login" to the "default" workspace, I get the following
>> RMI error:
>>
>>
>> org.apache.jackrabbit.rmi.client.RemoteRepositoryException: error
>> unmarshalling return; nested exception is:
>> java.net.MalformedURLException: no protocol: and: error
>> unmarshalling return; nested exception is:
>> java.net.MalformedURLException: no protocol: and
>
> This is a common error when using RMI. It took me some time to find out
> what's happening there when it occurred to me the first time. The "and"
> comes from the folder where your classes are which is probably something
> beneath "C:\Documents and Settings". Moving your application to a folder
> without spaces or setting the system property
> "java.rmi.server.useCodebaseOnly" to true should solve the problem.
>
> Cheers,
> Christoph
>
>
>
--
View this message in context: http://www.nabble.com/jcr-rmi-problems-tf3928960.html#a11144082
Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.
Re: jcr-rmi problems
Posted by Christoph Kiehl <ck...@sulu3000.de>.
qcfireball wrote:
> Tomcat server log shows that the RMI Objects are created in the RMI registry.
>
> I can retrieve an instance of the Repository factory OK via:
>
> ClientRepositoryFactory factory = new ClientRepositoryFactory();
> final Object o = factory.getRepository(s);
>
> but when I try to "login" to the "default" workspace, I get the following
> RMI error:
>
>
> org.apache.jackrabbit.rmi.client.RemoteRepositoryException: error
> unmarshalling return; nested exception is:
> java.net.MalformedURLException: no protocol: and: error
> unmarshalling return; nested exception is:
> java.net.MalformedURLException: no protocol: and
This is a common error when using RMI. It took me some time to find out
what's happening there when it occurred to me the first time. The "and"
comes from the folder where your classes are which is probably something
beneath "C:\Documents and Settings". Moving your application to a folder
without spaces or setting the system property
"java.rmi.server.useCodebaseOnly" to true should solve the problem.
Cheers,
Christoph