1 Reply Latest reply on Sep 28, 2009 10:13 AM by Giovanni Miano

    Seam and JCR - help on persistence

    Tommy Key Newbie

      I am having problems setting persistence manager for Jackrabbit with use with Seam. My jcr-ds.xml is:


      <connection-factories> 
          <tx-connection-factory>
                <jndi-name>jcr/local</jndi-name> 
                <xa-transaction />
                <rar-name>jackrabbit-jca-1.5.0.rar</rar-name>
                <connection-definition>javax.jcr.Repository</connection-definition>
                <config-property name="homeDir" type="java.lang.String">/home/seam/jackrabbit</config-property>
                <config-property name="configFile" type="java.lang.String">classpath:repository.xml</config-property>
                <config-property name="bindSessionToTransaction" type="java.lang.Boolean">true</config-property>
          </tx-connection-factory>
      </connection-factories>

      Deployment of this one goes fine:

      00:16:58,314 INFO  [RepositoryImpl] Repository started
      00:16:58,314 INFO  [jcr/local] Created repository (org.apache.jackrabbit.core.RepositoryImpl@1f0c45f)
      00:16:58,316 INFO  [jcr/local] Created repository handle (org.apache.jackrabbit.jca.JCARepositoryHandle@1ddc3ea)
      00:16:58,319 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=jcr/local' to JNDI name 'java:jcr/local' 

      Then I set up persistence.xml on my -ejb project:
      <persistence-unit name="canaryJcr">
              <provider>org.apache.jackrabbit.core.persistence.bundle.BundleFsPersistenceManager</provider>
              <jta-data-source>java:/jcr/local</jta-data-source>
              <properties>
                  <property name="blobFSBlockSize" value="0"/> 
                  <property name="minBlobSize" value="4096"/> 
                  <property name="errorHandling" value=""/>
              </properties>
         </persistence-unit>


      JBoss notices this persistence unit :
      00:17:01,959 INFO  [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.entity.PersistenceUnitDeployment
      00:17:01,959 INFO  [JmxKernelAbstraction] installing MBean: persistence.units:ear=canary-ear.ear,unitName=canaryJcr with dependencies:
      00:17:01,959 INFO  [JmxKernelAbstraction]      jboss.jca:name=jcr/local,service=DataSourceBinding

      but fails:
      00:17:09,199 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
      
      --- MBeans waiting for other MBeans ---
      ObjectName: persistence.units:ear=canary-ear.ear,unitName=canaryJcr
        State: NOTYETINSTALLED
        I Depend On:
          jboss.jca:name=jcr/local,service=DataSourceBinding
      
      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
      ObjectName: jboss.jca:name=jcr/local,service=DataSourceBinding
        State: NOTYETINSTALLED
        Depends On Me:
          persistence.units:ear=canary-ear.ear,unitName=canaryJcr


      What do I do wrong? It's been my second day and I can't figure it out. Thanks in advance.