jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aimran <aimra...@gmail.com>
Subject Shared J2EE configuration throws LoginException
Date Sun, 03 Oct 2010 16:02:26 GMT

I am trying to deploy JR 2 as a shared J2EE resource, following instruction
posted on http://jackrabbit.apache.org/shared-j2ee-resource-howto.html. 
My env: Java 6, JR 2, Tomcat 6, MySQL

I have added the resource entry in tomcats context.xml, like so:
<Resource auth="Container" configFilePath="[my path]/repository.xml"
		factory="org.apache.jackrabbit.core.jndi.BindableRepositoryFactory"
		name="jcr/repo" repHomeDir="[my path]/home"
		type="javax.jcr.Repository"/>

When I start tomcat, I get this error:
javax.jcr.LoginException
	at
org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1514)
	at
org.apache.jackrabbit.core.jndi.BindableRepository.login(BindableRepository.java:162)
	at com.gsl.repo.SessionFactory._getSession(SessionFactory.java:67)
	at com.gsl.repo.SessionFactory.getSession(SessionFactory.java:55)
.
.
.
Caused by: javax.security.auth.login.FailedLoginException
	at
org.apache.jackrabbit.core.security.authentication.AbstractLoginModule.authenticate(AbstractLoginModule.java:441)
	at
org.apache.jackrabbit.core.security.authentication.AbstractLoginModule.login(AbstractLoginModule.java:315)
	at
org.apache.jackrabbit.core.security.authentication.LocalAuthContext.login(LocalAuthContext.java:86)
	at
org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1497)
	... 194 more

- I am able to successfully use the repository from client code using
TransientRepository [ie with the same repository.xml]. 
- The repository.xml, has been set to use DefaultLoginModule &
DefaultAccessManager and uses <DataSources><DataSource name="mysqlds">... 
- When tomcat starts the directories [repository, version & workspaces] are
getting created. A lock file is also created
- I also tried passing the username="[my user]" password="[my pwd]"  into
the resource, but that didnt work.

My use case is that I have several webapps deployed in the same tomcat
container, that will use this repository. What am I missing? 
Is there another way to share a repository instance across multiple webapps
in the same tomcat container?

Thanks for your help.
-- 
View this message in context: http://jackrabbit.510166.n4.nabble.com/Shared-J2EE-configuration-throws-LoginException-tp2953291p2953291.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Mime
View raw message