Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Transaction Rolledback LocalException while accessing CMP from session in jboss  RSS feed

Sam Tom
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hava an CMP entity bean and a stateless session bean. I am accessing CMP entity bean from session bean using Local interface. I am using EJB-QL to retrive data. A method findByVehType(Integer x) is declared which returns a Collection object.

If I use the first query it returns a Collection of Local interface objects and I am able to access the value of dept_code by using its getter method.
Query 1 :
SELECT r.dept_code FROM Fmdvehreq AS r WHERE r.veh_type=?1


If I use the second query, It returns a collection of local interface objects. However if I try to access the fields like dept_code using their respective getter methods, It get the exception as follows: "TransactionRolledbackLocalException in method: public abstract java.lang.Integer fmd.FmdVehReqLocal.getDept_code(), causedBy:

Query 2 :
SELECT OBJECT(R) FROM Fmdvehreq AS r WHERE r.veh_type=?1

Please help me in resolving the above problem. Thanks in advance.

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!