jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mohinder Singh" <msi...@swri.org>
Subject RE: RMI/ Oracle/ PersistenceManager/Version State Exception
Date Wed, 07 Oct 2009 18:17:48 GMT
Thanks for putting me on the track again.

The log shows that PersistenceManger could not load
"oracle.jdbc.OracleDriver" class.

 

07.10.2009 13:07:07 *INFO * LocalFileSystem: LocalFileSystem initialized at
path .\version

07.10.2009 13:07:07 *ERROR* RepositoryImpl: failed to start Repository:
Cannot instantiate persistence manager
org.apache.jackrabbit.core.state.db.OraclePersistenceManager: Could not load
class oracle.jdbc.OracleDriver: ...

 

I added following line in my code (and no exception was thrown):

         try      {

              String driverName = "oracle.jdbc.OracleDriver";

              Class.forName(driverName);

          } catch (ClassNotFoundException e) {

             e.printStackTrace();

             return;

          }

 

Any (more) help? 

 

Thanks,

Mohinder

 

-----Original Message-----
From: Alexander Klimetschek [mailto:aklimets@day.com] 
Sent: Wednesday, October 07, 2009 12:53 PM
To: users@jackrabbit.apache.org
Subject: Re: RMI/ Oracle/ PersistenceManager/Version State Exception

 

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(ServerO
bject.java:136)

>        at
org.apache.jackrabbit.rmi.server.ServerRepository.login(ServerRepository.jav
a: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:6
49)

>        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.ja
va:886)

>        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:9
08)

>        at java.lang.Thread.run(Thread.java:619)

>        at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteC
all.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.jav
a:107)

>        at
org.apache.jackrabbit.commons.repository.ProxyRepository.login(ProxyReposito
ry.java:90)

>        at
org.apache.jackrabbit.commons.AbstractRepository.login(AbstractRepository.ja
va: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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message