junglika
Sep 22nd, 2006, 12:00 PM
Hello.
I am trying to run jackrabbit in a transactional environment such as
jboss because i need JTA Transaction(i'm working with DataBase and jackrabbit in the same transaction). The application server was configured more or less as described in http://wiki.apache.org/jackrabbit/JackrabbitOnJBoss
- removed jcr-1.0.jar from jackrabbit-jca-1.0.1.rar
- download the latest jcr-1.0.1.jar and copied it to the
jboss/server/${profile}/lib folder
- copied the modified jackrabbit-jca-1.0.1.rar to
jboss/server/${profile}/deploy
- adjusted jcr-ds.xml to jackrabbit-jca-1.0.1.rar
(<rar-name>jackrabbit-jca-1.0.1.rar</rar-name>) as well as
homeDir and configFile
- copied the modified jcr-ds.xml also to the
jboss/server/${profile}/deploy folder
<connection-factories>
<tx-connection-factory>
<jndi-name>jcr/local</jndi-name>
<xa-transaction/>
<rar-name>jackrabbit-jca-1.0.1.rar</rar-name>
<connection-definition>javax.jcr.Repository</connection-definition>
<config-property name="homeDir" type="java.lang.String">/tmp/jackrabbit</config-property>
<config-property name="configFile" type="java.lang.String">/tmp/repository.xml</config-property>
</tx-connection-factory>
</connection-factories>
I use springmodules 0.5 and use DAO support to acces to repository, when jboss try to make a commit throw the next Exception:
2006-07-20 15:41:52,824 ERROR [org.apache.jackrabbit.core.XASessionImpl]
Resource not associated with a transaction.
2006-07-20 15:41:52,825 WARN [org.jboss.tm.TransactionImpl]
XAException: tx=TransactionImpl:XidImpl[FormatId=257,
GlobalId=brenner/16, BranchQual=, localId=16] errorCode=XAER_PROTO
javax.transaction.xa.XAException
at org.apache.jackrabbit.core.XASessionImpl.end(XASes sionImpl.java:288)
at
org.jboss.tm.TransactionImpl$Resource.endResource( TransactionImpl.java:2138)
at
org.jboss.tm.TransactionImpl$Resource.endResource( TransactionImpl.java:2113)
at org.jboss.tm.TransactionImpl.endResources(Transact ionImpl.java:1459)
at org.jboss.tm.TransactionImpl.beforePrepare(Transac tionImpl.java:1113)
at org.jboss.tm.TransactionImpl.commit(TransactionImp l.java:321)
at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPol icy.java:175)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPoli cy.java:87)
at
I have no idea how this can be done. Any ideas? :confused: Did any get jackrabbit running in JBoss whith springmodules-jcr-0.5.jar and jackrabbit-jca-1.0.1.rar????
Thanks
Jorge Rodríguez Pedrianes
I am trying to run jackrabbit in a transactional environment such as
jboss because i need JTA Transaction(i'm working with DataBase and jackrabbit in the same transaction). The application server was configured more or less as described in http://wiki.apache.org/jackrabbit/JackrabbitOnJBoss
- removed jcr-1.0.jar from jackrabbit-jca-1.0.1.rar
- download the latest jcr-1.0.1.jar and copied it to the
jboss/server/${profile}/lib folder
- copied the modified jackrabbit-jca-1.0.1.rar to
jboss/server/${profile}/deploy
- adjusted jcr-ds.xml to jackrabbit-jca-1.0.1.rar
(<rar-name>jackrabbit-jca-1.0.1.rar</rar-name>) as well as
homeDir and configFile
- copied the modified jcr-ds.xml also to the
jboss/server/${profile}/deploy folder
<connection-factories>
<tx-connection-factory>
<jndi-name>jcr/local</jndi-name>
<xa-transaction/>
<rar-name>jackrabbit-jca-1.0.1.rar</rar-name>
<connection-definition>javax.jcr.Repository</connection-definition>
<config-property name="homeDir" type="java.lang.String">/tmp/jackrabbit</config-property>
<config-property name="configFile" type="java.lang.String">/tmp/repository.xml</config-property>
</tx-connection-factory>
</connection-factories>
I use springmodules 0.5 and use DAO support to acces to repository, when jboss try to make a commit throw the next Exception:
2006-07-20 15:41:52,824 ERROR [org.apache.jackrabbit.core.XASessionImpl]
Resource not associated with a transaction.
2006-07-20 15:41:52,825 WARN [org.jboss.tm.TransactionImpl]
XAException: tx=TransactionImpl:XidImpl[FormatId=257,
GlobalId=brenner/16, BranchQual=, localId=16] errorCode=XAER_PROTO
javax.transaction.xa.XAException
at org.apache.jackrabbit.core.XASessionImpl.end(XASes sionImpl.java:288)
at
org.jboss.tm.TransactionImpl$Resource.endResource( TransactionImpl.java:2138)
at
org.jboss.tm.TransactionImpl$Resource.endResource( TransactionImpl.java:2113)
at org.jboss.tm.TransactionImpl.endResources(Transact ionImpl.java:1459)
at org.jboss.tm.TransactionImpl.beforePrepare(Transac tionImpl.java:1113)
at org.jboss.tm.TransactionImpl.commit(TransactionImp l.java:321)
at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPol icy.java:175)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPoli cy.java:87)
at
I have no idea how this can be done. Any ideas? :confused: Did any get jackrabbit running in JBoss whith springmodules-jcr-0.5.jar and jackrabbit-jca-1.0.1.rar????
Thanks
Jorge Rodríguez Pedrianes