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-
resource-howto.html.
I am using Jackrabbit 2.1.0.
I deployed the jcr-explorer war and can login to the repo through
"java:comp/env/jcr/repository".
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.bindablereposit...@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:
org.apache.jackrabbit.core.jndi.bindablereposit...@bfc25c
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.