jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paulo Silva <alfa...@gmail.com>
Subject Re: Code example to connect to repository via RMI?
Date Thu, 07 Apr 2011 16:23:08 GMT
It's a maintenance project, so old libraries hooray!

I think it's something related to the way my JCR repository environment is
setup, it's deployed in JBoss 4.2.3GA, following instructions from:
http://wiki.apache.org/jackrabbit/JackrabbitOnJBoss
(JCA and then RMI exposed).

Using the instructions in the page you mentioned I get:
 ClientRepositoryFactory factory = new ClientRepositoryFactory();
            Repository repository =
factory.getRepository("jnp://localhost:1099/jcrServer");
            Session session = repository.login();

Which causes:
org.apache.jackrabbit.rmi.client.RemoteRepositoryException: Malformed URL:
jnp://localhost:1099/jcrServer; nested exception is:
java.net.MalformedURLException: invalid URL scheme:
jnp://localhost:1099/jcrServer: Malformed URL:
jnp://localhost:1099/jcrServer; nested exception is:
java.net.MalformedURLException: invalid URL scheme:
jnp://localhost:1099/jcrServer
at
org.apache.jackrabbit.rmi.client.SafeClientRepository.remoteLogin(SafeClientRepository.java:112)
at
org.apache.jackrabbit.rmi.client.SafeClientRepository.login(SafeClientRepository.java:120)
at
org.apache.jackrabbit.rmi.client.SafeClientRepository.login(SafeClientRepository.java:136)
at MyConn.main(MyConn.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:115)
Caused by: java.rmi.RemoteException: Malformed URL:
jnp://localhost:1099/jcrServer; nested exception is:
java.net.MalformedURLException: invalid URL scheme:
jnp://localhost:1099/jcrServer
at
org.apache.jackrabbit.rmi.client.ClientRepositoryFactory$1.getRemoteRepository(ClientRepositoryFactory.java:97)
at
org.apache.jackrabbit.rmi.client.SafeClientRepository.remoteLogin(SafeClientRepository.java:108)
... 8 more
Caused by: java.net.MalformedURLException: invalid URL scheme:
jnp://localhost:1099/jcrServer
at java.rmi.Naming.intParseURL(Naming.java:273)
at java.rmi.Naming.parseURL(Naming.java:220)
at java.rmi.Naming.lookup(Naming.java:79)
at
org.apache.jackrabbit.rmi.client.ClientRepositoryFactory$1.getRemoteRepository(ClientRepositoryFactory.java:95)
... 9 more
java.rmi.RemoteException: Malformed URL: jnp://localhost:1099/jcrServer;
nested exception is:
java.net.MalformedURLException: invalid URL scheme:
jnp://localhost:1099/jcrServer
at
org.apache.jackrabbit.rmi.client.ClientRepositoryFactory$1.getRemoteRepository(ClientRepositoryFactory.java:97)
at
org.apache.jackrabbit.rmi.client.SafeClientRepository.remoteLogin(SafeClientRepository.java:108)
at
org.apache.jackrabbit.rmi.client.SafeClientRepository.login(SafeClientRepository.java:120)
at
org.apache.jackrabbit.rmi.client.SafeClientRepository.login(SafeClientRepository.java:136)
at MyConn.main(MyConn.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:115)
Caused by: java.net.MalformedURLException: invalid URL scheme:
jnp://localhost:1099/jcrServer
at java.rmi.Naming.intParseURL(Naming.java:273)
at java.rmi.Naming.parseURL(Naming.java:220)
at java.rmi.Naming.lookup(Naming.java:79)
at
org.apache.jackrabbit.rmi.client.ClientRepositoryFactory$1.getRemoteRepository(ClientRepositoryFactory.java:95)
... 9 more


On Thu, Apr 7, 2011 at 9:34 AM, Jukka Zitting <jzitting@adobe.com> wrote:

> Hi,
>
>
> On 04/07/2011 12:24 AM, Paulo Silva wrote:
>
>> I have jackrabbit-jca-1.5.5.rar
>>
>
> Any reason why you are not using a more recent Jackrabbit version? The 1.5
> branch dates back to 2008!
>
>
>  But now I have a problem: how can I connect to that repository via
>> RMI? Does someone have a code example / tutorial I can follow?
>>
>
> See the "Accessing a remote repository" section on
> http://jackrabbit.apache.org/jackrabbit-jcr-rmi.html
>
> --
> Jukka Zitting
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message