jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gamba <holger.bre...@handelshof.de>
Subject Re: Confirming assumptions about transactional environment and session-handling
Date Fri, 11 Sep 2009 08:01:48 GMT

Ok, thanks guys. I think my environment, as shown, is correct.

Now one of the real exception I get during my tests. In some of my tests
with mutliple parallel threads I'm calling my stateless-session-bean an get
with 2 or more users the following exception:

...
09:52:11,968 ERROR [ConnectionRecoveryManager] failed to close connection,
reason: You cannot rollback during a managed transaction!, state/code:
null/0
09:52:12,468 ERROR [ConnectionRecoveryManager] failed to close connection,
reason: You cannot rollback during a managed transaction!, state/code:
null/0
09:52:12,468 ERROR [ConnectionRecoveryManager] could not execute statement,
reason: You cannot set autocommit during a managed transaction!, state/code:
null/0
09:52:22,984 ERROR [ConnectionRecoveryManager] could not execute statement,
reason: You cannot set autocommit during a managed transaction!, state/code:
null/0
09:52:22,984 WARN  [DbDataStore] Can not insert new record
java.sql.SQLException: You cannot set autocommit during a managed
transaction!
	at
org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.setJdbcAutoCommit(BaseWrapperManagedConnection.java:582)
	at
org.jboss.resource.adapter.jdbc.WrappedConnection.setAutoCommit(WrappedConnection.java:458)
	at
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager.setupConnection(ConnectionRecoveryManager.java:341)
	at
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager.reestablishConnection(ConnectionRecoveryManager.java:409)
	at
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager.getConnection(ConnectionRecoveryManager.java:159)
	at
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager.executeStmtInternal(ConnectionRecoveryManager.java:293)
	at
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager.executeStmt(ConnectionRecoveryManager.java:261)
	at
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager.executeStmt(ConnectionRecoveryManager.java:239)
	at
org.apache.jackrabbit.core.data.db.DbDataStore.addRecord(DbDataStore.java:314)
	at
org.apache.jackrabbit.core.value.BLOBInDataStore.getInstance(BLOBInDataStore.java:128)
	at
org.apache.jackrabbit.core.value.InternalValue.getBLOBFileValue(InternalValue.java:658)
	at
org.apache.jackrabbit.core.value.InternalValue.create(InternalValue.java:141)
	at org.apache.jackrabbit.core.PropertyImpl.setValue(PropertyImpl.java:617)
	at org.apache.jackrabbit.core.PropertyImpl.setValue(PropertyImpl.java:533)
	at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:2522)
	at
de.handelshof.por.ejb.service.jcr.HMGJCRUserServiceBean.importFile(HMGJCRUserServiceBean.java:569)
...
09:52:22,984 WARN  [DbDataStore] Can not insert new record
org.apache.jackrabbit.core.data.DataStoreException: Can not insert new
record: You cannot set autocommit during a managed transaction!: You cannot
set autocommit during a managed transaction!
	at
org.apache.jackrabbit.core.data.db.DbDataStore.convert(DbDataStore.java:698)
	at
org.apache.jackrabbit.core.data.db.DbDataStore.addRecord(DbDataStore.java:324)
	at
org.apache.jackrabbit.core.value.BLOBInDataStore.getInstance(BLOBInDataStore.java:128)
	at
org.apache.jackrabbit.core.value.InternalValue.getBLOBFileValue(InternalValue.java:658)
...
Caused by: java.sql.SQLException: You cannot set autocommit during a managed
transaction!
	at
org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.setJdbcAutoCommit(BaseWrapperManagedConnection.java:582)
	at
org.jboss.resource.adapter.jdbc.WrappedConnection.setAutoCommit(WrappedConnection.java:458)


It occurs during a file import. The line in my code whre it occurs is the
following:

...
resNode.setProperty("jcr:data", new ByteArrayInputStream(file.getData()));
...

I'm not setting autocommit anywhere in the code, maybe some jackrabbit code
is setting some properties ... ? I did not know where to search for the
error ... any help would be highly appreciated


Regards,
Gamba
-- 
View this message in context: http://www.nabble.com/Confirming-assumptions-about-transactional-environment-and-session-handling-tp25378625p25396705.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message