jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rainer Flicker" <r.flic...@airsight.de>
Subject ResourceException when using Jackrabbit 2.1.1 and Glassfish 2.1.1
Date Thu, 19 Aug 2010 14:37:27 GMT
Hi,

we are using Jackrabbit 2.1.1 and JBoss 5.1 without any problems, but
we could not get Jackrabbit 2.1.1 working with Glassfish 2.1.1.

I installed Glassfish 2.1.1, created a directory "jackrabbit" with the
configuration file "repository.xml", used in JBoss. Added some libs to
"lib/ext", needed for our application (deployed as ear):
antlr-2.7.6.jar
cglib-nodep.jar
concurrent.jar
dom4j-1.6.1.jar
javassist-3.9.0.GA.jar
jcl-over-slf4j-1.5.8.jar
jcr-2.0.jar
jtds-1.2.5.jar
log4j-over-slf4j-1.5.8.jar
mysql-connector-java-5.1.12-bin.jar
ojdbc14.jar
orai18n.jar
slf4j-api-1.5.8.jar
slf4j-jdk14-1.5.8.jar
sqljdbc.jar

Then I deployed and configured Jackrabbit:
$ asadmin deploy --user admin --passwordfile passwdfile.txt
jackrabbit-jca-2.1.1.rar 
$ asadmin create-threadpool --user admin --passwordfile passwdfile.txt
jackrabbit-pool 
$ asadmin create-resource-adapter-config --user admin --passwordfile
passwdfile.txt --threadpools jackrabbit-pool jackrabbit-jca-2.1.1 
$ asadmin create-connector-connection-pool --user admin --passwordfile
passwdfile.txt --raname jackrabbit-jca-2.1.1 --connectiondefinition
javax.jcr.Repository --transactionsupport XATransaction --property
homeDir=c\:/programs/glassfish/domains/domain1/jackrabbit:configFile=c\:
/programs/glassfish/domains/domain1/jackrabbit/repository.xml
jackrabbit-connection-pool 
$ asadmin create-connector-resource --user admin --passwordfile
passwdfile.txt --poolname jackrabbit-connection-pool jcr/local 
$ asadmin stop-domain
$ asadmin start-domain

When I try to access the repository,
 Repository repository = (Repository) ctx.lookup("jcr/local");

I get this error:
javax.resource.ResourceException: Failed to create session: Unable to
access a repository with the following settings:
    org.apache.jackrabbit.repository.conf:
c:/programs/glassfish/domains/domain1/jackrabbit/repository.xml
    org.apache.jackrabbit.repository.home:
c:/programs/glassfish/domains/domain1/jackrabbit
The following RepositoryFactory classes were consulted:
Perhaps the repository you are trying to access is not available at the
moment.
	at
org.apache.jackrabbit.jca.JCAManagedConnectionFactory.createRepository(J
CAManagedConnectionFactory.java:280)
	at
org.apache.jackrabbit.jca.JCAManagedConnectionFactory.createConnectionFa
ctory(JCAManagedConnectionFactory.java:137)
	at
com.sun.enterprise.naming.factory.ConnectorObjectFactory.getObjectInstan
ce(ConnectorObjectFactory.java:130)
	at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
	at
com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:414)
	at javax.naming.InitialContext.lookup(InitialContext.java:392)
	...

I also tried to set "repositoryURI", without any success. I tried 
repositoryURI=jcr-jackrabbit://jackrabbit
repositoryURI=file:///c:/programs/glassfish/domains/domain1/jackrabbit
repositoryURI=c:/programs/glassfish/domains/domain1/jackrabbit
repositoryURI=jndi://jcr/local

I tried this on Windows and Linux.

Thanks in advance for any help,

Rainer



Mime
View raw message