jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: RMI/ Oracle/ PersistenceManager/Version State Exception
Date Wed, 07 Oct 2009 17:53:12 GMT
On Wed, Oct 7, 2009 at 17:43, Mohinder Singh <msingh@swri.org> wrote:
> Following code:
>        repository = new URLRemoteRepository("http://localhost:8181/rmi");
>        Session session = repository.login(new SimpleCredentials("mps", "passwd".toCharArray()));
>
> Works fine with Derby. As soon as I change to Oracle, as below:
> -
>        <PersistenceManager class="org.apache.jackrabbit.core.state.db.OraclePersistenceManager">
>          <param name="url" value="jdbc:oracle:thin:@dev-repo-vm.tspi.fer.org:1521:orcldev"/>
>          <param name="user" value="u1"/>
>          <param name="password" value="p1"/>
>          <param name="externalBLOBs" value="false"/>
>          <param name="schemaObjectPrefix" value="version_"/>
>        </PersistenceManager>
>
> I get following exception:
>
> javax.jcr.RepositoryException: Repository not found: Attribute javax.jcr.Repository does
not exist in servlet context Apache Jackrabbit
>        at org.apache.jackrabbit.rmi.server.ServerObject.getRepositoryException(ServerObject.java:136)
>        at org.apache.jackrabbit.rmi.server.ServerRepository.login(ServerRepository.java:107)
>        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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
>        at sun.rmi.transport.Transport$1.run(Transport.java:159)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
>        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
>        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
>        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
>        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>        at java.lang.Thread.run(Thread.java:619)
>        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
>        at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
>        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
>        at org.apache.jackrabbit.rmi.server.ServerRepository_Stub.login(Unknown Source)
>        at org.apache.jackrabbit.rmi.client.ClientRepository.login(ClientRepository.java:107)
>        at org.apache.jackrabbit.commons.repository.ProxyRepository.login(ProxyRepository.java:90)
>        at org.apache.jackrabbit.commons.AbstractRepository.login(AbstractRepository.java:53)
>        at org.swri.test.JCRViaRMI.main(JCRViaRMI.java:21)

I guess there is some problem starting Jackrabbit (maybe the PM fails
to connect to the DB), hence the javax.jcr.Repository object is not
put into the RMI registry and you get this exception. I would look in
the logs to find out why it doesn't start.

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Mime
View raw message