Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002559 [Resin] minor always 03-28-08 07:43 03-28-08 15:46
Reporter ferg View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 3.1.5
Summary 0002559: EJB/setRollbackOnly
Description (rep by Carljohan Carlsson)

Im trying to set up CMT with EJB (resin 3.1.5) and running into some
problems when rolling back a transaction.

Any ideas?

/Carljohan

EJB:

@Stateless
@TransactionManagement(TransactionManagementType.CONTAINER)
public class UserServiceImpl extends GenericService implements UserService {

..

@TransactionAttribute(TransactionAttributeType.REQUIRED)
   public Group saveGroup(Group g) {

if(...) {
           LOG.warn("Rolling back transaction");
           sessionContext.setRollbackOnly();
}

}

Log:
[18:09:23.285] {http--8080-1} Transaction[01:0dac5463] begin
[18:09:23.285] {http--8080-1} Transaction[01:0dac5463] rollback-only:
java.lang.IllegalStateException: invalid transaction
[18:09:23.285] {http--8080-1} Transaction[01:0dac5463] rollback-only:
java.lang.IllegalStateException: invalid transaction
[18:09:23.285] {http--8080-1} Transaction[01:0dac5463] rollback
[18:09:23.285] {http--8080-1} javax.servlet.ServletException:
javax.ejb.TransactionRolledbackLocalException:
java.lang.IllegalStateException: invalid transaction
[18:09:23.285] {http--8080-1} at
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515)
[18:09:23.285] {http--8080-1} at
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
[18:09:23.285] {http--8080-1} at
com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87)
[18:09:23.285] {http--8080-1} at
com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:181)
[18:09:23.285] {http--8080-1} at
com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:266)
[18:09:23.285] {http--8080-1} at
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:269)
[18:09:23.285] {http--8080-1} at
com.caucho.server.port.TcpConnection.run(TcpConnection.java:603)
[18:09:23.285] {http--8080-1} at
com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:721)
[18:09:23.285] {http--8080-1} at
com.caucho.util.ThreadPool$Item.run(ThreadPool.java:643)
[18:09:23.285] {http--8080-1} at
java.lang.Thread.run(Thread.java:595)
[18:09:23.285] {http--8080-1} Caused by:
javax.ejb.TransactionRolledbackLocalException:
java.lang.IllegalStateException: invalid transaction
[18:09:23.285] {http--8080-1} at
com.caucho.ejb3.xa.XAManager.commit(XAManager.java:247)
[18:09:23.285] {http--8080-1} at
_ejb.UserServiceImpl.UserServiceImpl__EJB$UserService__Bean.addUser(UserServiceImpl__EJB.java:122)
[18:09:23.285] {http--8080-1} at
_ejb.UserServiceImpl.UserServiceImpl__EJB$UserService__EJBLocal.addUser(UserServiceImpl__EJB.java:354)

...

[18:09:23.285] {http--8080-1} Caused by:
com.caucho.transaction.RollbackExceptionWrapper:
java.lang.IllegalStateException: invalid transaction
[18:09:23.285] {http--8080-1} at
com.caucho.transaction.TransactionImpl.commit(TransactionImpl.java:579)
[18:09:23.285] {http--8080-1} at
com.caucho.transaction.TransactionManagerImpl.commit(TransactionManagerImpl.java:271)
[18:09:23.285] {http--8080-1} at
com.caucho.jca.UserTransactionImpl.commit(UserTransactionImpl.java:417)
[18:09:23.285] {http--8080-1} at
com.caucho.jca.UserTransactionProxy.commit(UserTransactionProxy.java:148)
[18:09:23.285] {http--8080-1} at
com.caucho.ejb3.xa.XAManager.commit(XAManager.java:243)
[18:09:23.285] {http--8080-1} ... 111 more
[18:09:23.285] {http--8080-1} Caused by:
java.lang.IllegalStateException: invalid transaction
[18:09:23.285] {http--8080-1} at
com.caucho.ejb.AbstractContext.setRollbackOnly(AbstractContext.java:322)
[18:09:23.285] {http--8080-1} at
com.stendahls.ddt.logic.UserServiceImpl.saveGroup(UserServiceImpl.java:104)
[18:09:23.285] {http--8080-1} at
_ejb.UserServiceImpl.UserServiceImpl__EJB$UserService__Bean.saveGroup(UserServiceImpl__EJB.java:198)
[18:09:23.285] {http--8080-1} at
com.stendahls.ddt.logic.UserServiceImpl.addUser(UserServiceImpl.java:73)
[18:09:23.285] {http--8080-1} at
_ejb.UserServiceImpl.UserServiceImpl__EJB$UserService__Bean.addUser(UserServiceImpl__EJB.java:116)
[18:09:23.285] {http--8080-1} ... 110 more


Additional Information
Attached Files

- Relationships

- Notes
(0002930)
ferg
03-28-08 15:46

ejb/0f1d
 

- Issue History
Date Modified Username Field Change
03-28-08 07:43 ferg New Issue
03-28-08 15:46 ferg Note Added: 0002930
03-28-08 15:46 ferg Assigned To  => ferg
03-28-08 15:46 ferg Status new => closed
03-28-08 15:46 ferg Resolution open => fixed
03-28-08 15:46 ferg Fixed in Version  => 3.1.6


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
28 total queries executed.
25 unique queries executed.
Powered by Mantis Bugtracker