jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: no such object in table
Date Tue, 06 Mar 2007 12:23:40 GMT
Hi,

On 3/5/07, Marcel Dullaart <marcel.dullaart@gmail.com> wrote:
> I am trying to access the jack rabbit repository as shipped with JBoss
> Portal remotely.
> [...]
>   RemoteRepository remoteRepository =
> adapterFactory.getRemoteRepository(localRepository);
>   context.bind(JNDI_NAME, remoteRepository);
> [...]
>   RemoteRepository remoteRepository = (RemoteRepository) object;
>   repository = factory.getRepository(remoteRepository);
>
> Still no problem. The problem occur when I try to login:
>   Session session = repository.login();
>
> Now I get the following stack:
> Exception in thread "main"
> org.apache.jackrabbit.rmi.client.RemoteRepositoryException: no such
> object in table: no such object in table
>         at org.apache.jackrabbit.rmi.client.ClientRepository.login(ClientRepository.java:79)
> [...]
> Can someone tell what I am doing wrong here?

I'm not too familiar with JBoss, but one potential issue is that you
are binding the server repository itself in JNDI instead of the
serializable RMI stub for that object. Try using:

    context.bind(JNDI_NAME, RemoteObject.toStub(remoteRepository));

Note also that you need to keep a reference to the remoteRepository
instance to avoid it from being garbage collected, as the stub doesn't
contain a direct reference to it.

BR,

Jukka Zitting

Mime
View raw message