0 Replies Latest reply on Jun 1, 2012 5:21 AM by abhijitprusty

    Jackrabbit Error : Throwable while   attempting to get a new connection: null: javax.resource.ResourceException: Failed to create sessio  n: Unable to access a repository with the following settings

    abhijitprusty

      Hi All,

       

      I am trying to use the jackrabbit in my application. But, After I ahve deployed the rar I am using (jackrabbit-jca-2.2.12.rar) with jcr-2.0.jar and it doesn't give any deployment error.

      But, when in the application we are trying to create a content we are stuck with the below mentioned error.


      **************************************************************************************************************************************************************************

       

      12:51:20,763 WARN  [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Throwable while

      attempting to get a new connection: null: javax.resource.ResourceException: Failed to create sessio

      n: Unable to access a repository with the following settings:

      The following RepositoryFactory classes were consulted:

          org.apache.jackrabbit.core.RepositoryFactoryImpl: declined

          org.apache.jackrabbit.commons.JndiRepositoryFactory: declined

      Perhaps the repository you are trying to access is not available at the moment.

      **************************************************************************************************************************************************************************

       

      Others things done for deployment

       

      1. Added a jcr-ds.xml under the deploy folder
      2. Removed the common-collections jar from the jackrabbit to avoid conflict in class loading.
      3. Copied jcr-2.0.jar to common lib.

       

       

      jcr-ds..xml(present under deploy folder)

      **************************************************************************************************************************************************************************

      <connection-factories>

        <tx-connection-factory>

          <jndi-name>jcr/local</jndi-name>

          <xa-transaction/>

          <rar-name>jackrabbit-jca-2.2.12.rar</rar-name>

          <connection-definition>javax.jcr.Repository</connection-definition>

              <config-property name="HomeDir" type="java.lang.String"></config-property>

              <config-property name="bindSessionToTransaction" type="java.lang.Boolean">true</config-property>

                </tx-connection-factory>

      </connection-factories>

      **************************************************************************************************************************************************************************

       

      Can any one help me what wrong we are doing. Its very urgent.

       

      Thanks,

      Abhijit