Hi Im getting
javax.resource.ResourceException: Transaction is not active
when this code executes. (em = EntityManager)
| public getUserGoupById(Long id) {
| Query dbQuery = em.createQuery("from UserGroup where id = :id");
| dbQuery.setParameter("id", id);
| UserGroup ug = (UserGroup) dbQuery.getSingleResult();
| return ug //Here the exception will be thrown.
| }
|
In debugmode Im able to see that ug is what Im looking for (right Id & name).
But every time I trie to return it the exception will show. I use the same bean
for getUserById(Long id), and it works fine. What could be wrong in the
usergroup-case?
Thanks!
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4006078#4006078
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4006078
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user