You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Rainer Flicker (JIRA)" <ji...@apache.org> on 2010/09/17 10:33:33 UTC

[jira] Commented: (JCR-2729) ResourceException with Glassfish 2.1.1

    [ https://issues.apache.org/jira/browse/JCR-2729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12910507#action_12910507 ] 

Rainer Flicker commented on JCR-2729:
-------------------------------------

Workaround:
Copying all jars except for jackrabbit-jca to domains/<domain>/lib/ext and not specifying repositoryURI solves the problem.

>  ResourceException with Glassfish 2.1.1
> ---------------------------------------
>
>                 Key: JCR-2729
>                 URL: https://issues.apache.org/jira/browse/JCR-2729
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jca
>    Affects Versions: 2.1.1
>         Environment: JDK 1.6.21
> Glassfish 2.1.1
> Windows XP + Linux
>            Reporter: Rainer Flicker
>         Attachments: repository.xml
>
>
> When using Jackrabbit 2.1.1 with Glassfish 2.1.1, accessing the Repository with
>  Repository repository = (Repository) ctx.lookup("jcr/local");
> results in 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(JCAManagedConnectionFactory.java:280)
> 	at org.apache.jackrabbit.jca.JCAManagedConnectionFactory.createConnectionFactory(JCAManagedConnectionFactory.java:137)
> 	at com.sun.enterprise.naming.factory.ConnectorObjectFactory.getObjectInstance(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 installed Glassfish 2.1.1, created a directory "jackrabbit" with a
> configuration file "repository.xml", used also in JBoss AS 5. 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
> 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
> repositoryURI=java:comp/env/jcr/local
> repositoryURI=jndi:java:comp/env/jcr/local
> repositoryURI=java:jcr/local
> repositoryURI=jndi:java:jcr/local
> I tried this on Windows and Linux.
> I also posted this on Jackrabbit-Users:
> http://www.mail-archive.com/users@jackrabbit.apache.org/msg15740.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.