jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juan Diego Botiva L." <jbot...@heinsohn.com.co>
Subject 'Transaction is not active' Error: Jackrabbit JCA on MySQL and JBoss
Date Thu, 02 Jul 2009 19:28:42 GMT
Hi Everyone!

I'm using Jackrabbit-JCA 1.5.6 on JBoss 4.2.3 and the repository is being 
stored in MySQL 5.1.34 (with JNDIDatabaseFileSystem and 
JNDIDatabasePersistenceManager) after some inactivity time (we presume is 
the default wait_timeout in MySQL) the connection is closed and Jackrabbit 
is unable to connect to the database again. Here is the JBoss datasource 
definition:

<local-tx-datasource>
    <jndi-name>RepositoryDS</jndi-name>
    <connection-url>jdbc:mysql://localhost:3306/repository?autoReconnect=true</connection-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <user-name>user</user-name>
    <password>password</password>
    <min-pool-size>1</min-pool-size>
    <max-pool-size>10</max-pool-size>
    <exception-sorter-class-name>com.mysql.jdbc.integration.jboss.ExtendedMysqlExceptionSorter</exception-sorter-class-name>
    <valid-connection-checker-class-name>com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker</valid-connection-checker-class-name>
</local-tx-datasource>


And the exception that is thrown:

org.jboss.util.NestedSQLException: Transaction is not active: 
tx=TransactionImple < ac, BasicAction: 7f000001:c59d:4a4bbc04:2553b status: 
ActionStatus.ABORT_ONLY >; - nested throwable: 
(javax.resource.ResourceException: Transaction is not active: 
tx=TransactionImple < ac, BasicAction: 7f000001:c59d:4a4bbc04:2553b status: 
ActionStatus.ABORT_ONLY >)
 at 
org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
 at 
org.apache.jackrabbit.core.persistence.db.JNDIDatabasePersistenceManager.getConnection(JNDIDatabasePersistenceManager.java:77)
 at 
org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.initConnection(DatabasePersistenceManager.java:754)
 at 
org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.reestablishConnection(DatabasePersistenceManager.java:833)
 at 
org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.executeStmt(DatabasePersistenceManager.java:879)
 at 
org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.exists(DatabasePersistenceManager.java:697)
 at 
org.apache.jackrabbit.core.state.SharedItemStateManager.hasNonVirtualItemState(SharedItemStateManager.java:1345)
 at 
org.apache.jackrabbit.core.state.SharedItemStateManager.hasItemState(SharedItemStateManager.java:297)
 at 
org.apache.jackrabbit.core.state.XAItemStateManager.hasItemState(XAItemStateManager.java:295)
 at 
org.apache.jackrabbit.core.version.NodeStateEx.getOrCreatePropertyState(NodeStateEx.java:246)
 at 
org.apache.jackrabbit.core.version.NodeStateEx.setPropertyValues(NodeStateEx.java:228)
 at 
org.apache.jackrabbit.core.version.NodeStateEx.setPropertyValue(NodeStateEx.java:201)
 at 
org.apache.jackrabbit.core.version.InternalVersionHistoryImpl.create(InternalVersionHistoryImpl.java:522)
 at 
org.apache.jackrabbit.core.version.AbstractVersionManager.createVersionHistory(AbstractVersionManager.java:313)
 at 
org.apache.jackrabbit.core.version.XAVersionManager.createVersionHistory(XAVersionManager.java:147)
 at 
org.apache.jackrabbit.core.version.AbstractVersionManager.getVersionHistory(AbstractVersionManager.java:234)
 at 
org.apache.jackrabbit.core.ItemImpl.initVersionHistories(ItemImpl.java:727)
 at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1080)
 at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:858)
 at 
org.apache.jackrabbit.jca.JCASessionHandle.save(JCASessionHandle.java:180)
Caused by: javax.resource.ResourceException: Transaction is not active: 
tx=TransactionImple < ac, BasicAction: 7f000001:c59d:4a4bbc04:2553b status: 
ActionStatus.ABORT_ONLY >
 at 
org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:319)
 at 
org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:402)
 at 
org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:849)
 at 
org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
 ... 151 more
2009-07-02 11:33:46,499 ERROR 
[org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager] 
failed to check existence of property state: 
f1b6c59d-72fc-4932-90f7-8e6d190bc45d/{http://www.jcp.org/jcr/1.0}versionableUuid
java.sql.SQLException: Connection is not associated with a managed 
connection.org.jboss.resource.adapter.jdbc.jdk6.WrappedConnectionJDK6@76663cdf
 at 
org.jboss.resource.adapter.jdbc.WrappedConnection.lock(WrappedConnection.java:81)
 at 
org.jboss.resource.adapter.jdbc.WrappedStatement.lock(WrappedStatement.java:64)
 at 
org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.setObject(WrappedPreparedStatement.java:718)
 at 
org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.executeStmt(DatabasePersistenceManager.java:865)
 at 
org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.exists(DatabasePersistenceManager.java:697)
 at 
org.apache.jackrabbit.core.state.SharedItemStateManager.hasNonVirtualItemState(SharedItemStateManager.java:1345)
 at 
org.apache.jackrabbit.core.state.SharedItemStateManager.hasItemState(SharedItemStateManager.java:297)
 at 
org.apache.jackrabbit.core.state.XAItemStateManager.hasItemState(XAItemStateManager.java:295)
 at 
org.apache.jackrabbit.core.version.NodeStateEx.getOrCreatePropertyState(NodeStateEx.java:246)
 at 
org.apache.jackrabbit.core.version.NodeStateEx.setPropertyValues(NodeStateEx.java:228)
 at 
org.apache.jackrabbit.core.version.NodeStateEx.setPropertyValue(NodeStateEx.java:201)
 at 
org.apache.jackrabbit.core.version.InternalVersionHistoryImpl.create(InternalVersionHistoryImpl.java:522)
 at 
org.apache.jackrabbit.core.version.AbstractVersionManager.createVersionHistory(AbstractVersionManager.java:313)
 at 
org.apache.jackrabbit.core.version.XAVersionManager.createVersionHistory(XAVersionManager.java:147)
 at 
org.apache.jackrabbit.core.version.AbstractVersionManager.getVersionHistory(AbstractVersionManager.java:234)
 at 
org.apache.jackrabbit.core.ItemImpl.initVersionHistories(ItemImpl.java:727)
 at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1080)
 at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:858)
 at 
org.apache.jackrabbit.jca.JCASessionHandle.save(JCASessionHandle.java:180)

What can I do to prevent the connection from being closed ? Thanks in 
advance

Regards


Juan Diego Botiva 



Mime
View raw message