jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Langley <John.Lang...@mathworks.com>
Subject Re: JndiRepositoryFactory and BindableRepository.
Date Fri, 06 Aug 2010 18:41:22 GMT
Are you running against jetty or glassfish? Jetty may not have jndi installed.

Sent from my Verizon Wireless Phone

----- Reply message -----
From: "Neil Corbet" <ncorbet@towerhillservices.com>
Date: Fri, Aug 6, 2010 12:56 pm
Subject: JndiRepositoryFactory and BindableRepository.
To: "users@jackrabbit.apache.org" <users@jackrabbit.apache.org>

Hello Everyone,

   I am having a difficult time understanding a problem I am having. I followed
the instructions for setting up a repo as a shared resource under Tomcat in the
same manner as the technique here: http://jackrabbit.apache.org/shared-j2ee-

   I am using Jackrabbit 2.1.0.

   I deployed the jcr-explorer war and can login to the repo through

   When I deploy my apps war and try to access the repository through my session
provider using JcrUtils.getRepository(URI) with the URI as
"jndi:java:comp/env/jcr/repository" it appropriatly uses the
JndiRepositoryFactory and parses the URI to "java:comp/env/jcr/repository" but
it fails saying that the Repository is invalid:

java.security.ProviderException: javax.jcr.RepositoryException: Unable to access
a repository with the following settings:
    org.apache.jackrabbit.repository.uri: jndi:java:comp/env/jcr/repository
The following RepositoryFactory classes were consulted:
    org.apache.jackrabbit.core.RepositoryFactoryImpl: declined
    org.apache.jackrabbit.commons.JndiRepositoryFactory: failed
        because of RepositoryException: Invalid repository object
org.apache.jackrabbit.core.jndi.BindableRepository@bfc25c found at
java:comp/env/jcr/repository in JNDI environment {}
    org.apache.jackrabbit.rmi.repository.RmiRepositoryFactory: failed
        because of RepositoryException: The JNDI resource
java:comp/env/jcr/repository is not a remote repository stub:
Perhaps the repository you are trying to access is not available at the moment.

BindableRepository extends AbstractRepository and implements
javax.jcr.Repository as does AbstractRepository. Shouldn't the
JndiRepositoryFactory recognize it as an instanceof Repository? This is where it
is failing.

Any help or insight would be appreciated. I am wanting to get away from RMI.

View raw message