hi all,
i've got jboss (3.2.3) and hibernate (2.1.2) in a clustered environment with jboss tree cache as the second level cache.
however, when i try to do an insert i get an exception as follows :
Code:
2004-11-01 14:36:49,766 INFO [TP-Processor4] org.jboss.logging.util.LoggerStream Hibernate: insert into hbm_country (countryCode, countryPrefix, language, timezone, id) values (?, ?, ?, ?, ?)
2004-11-01 14:36:49,987 DEBUG [TP-Processor4] org.jboss.cache.TreeCache$SynchronizationHandler beforeCompletion(). Illegal tx status: 0
2004-11-01 14:36:50,195 ERROR [TP-Processor4] org.jboss.ejb.plugins.LogInterceptor TransactionRolledbackLocalException
in method: public abstract com.yahoo.gmmh.vo.management.ManagementVO com.yahoo.gmmh.ejb.management.interfaces.ManagementManagerLocal.acceptMessage(com.yahoo.gmmh.vo.management.ManagementVO), causedBy:
org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=codea.lon.yahoo.com//149, BranchQual=] status=STATUS_NO_TRANSACTION; - nested throwable:
(org.jboss.util.NestedRuntimeException: ; - nested throwable: (java.lang.IllegalStateException: Illegal status: 0))
my jboss-service.xml is :
Code:
<server>
<mbean code="net.sf.hibernate.jmx.HibernateService" name="jboss.jca:service=HibernateGMMH">
<depends>jboss.jca:service=RARDeployer</depends>
<depends>jboss.jca:service=LocalTxCM,name=cjdbc-gmmhDS</depends>
<attribute name="MapResources">com/yahoo/gmmh/hibernate/PackageType.hbm.xml</attribute>
<attribute name="JndiName">java:/hibernate/gmmh</attribute>
<attribute name="Datasource">java:/cjdbc-gmmhDS</attribute>
<attribute name="Dialect">net.sf.hibernate.dialect.MySQLDialect</attribute>
<attribute name="UseOuterJoin">true</attribute>
<attribute name="ShowSql">true</attribute>
<attribute name="UserTransactionName">UserTransaction</attribute>
<attribute name="TransactionStrategy">net.sf.hibernate.transaction.JTATransactionFactory</attribute>
<attribute name="TransactionManagerLookupStrategy">net.sf.hibernate.transaction.JBossTransactionManagerLookup</attribute>
<attribute name="CacheProvider">net.sf.hibernate.cache.TreeCacheProvider</attribute>
</mbean>
</server>
relevant code is :
Code:
sess = sessionFactory.openSession();
(i'm using the ThreadLocal pattern)
insert the object, then
sess.flush();
i've the cache concurrency strategy set to 'transactional', (using xdoclet)
Code:
* @hibernate.cache usage="transactional"
since i'm using a managed transaction i'm not explicitly opening and commiting a transaction (is this correct?) but even if i do explicitly open the transaction i still get the same exception.
can anybody see what i'm doing wrong??
any help appreciated.
cheers,
colum.