This content has been marked as final.
Show 2 replies
-
1. Re: Unable to locate UserTransaction in 4.0.4GA
Emmanuel Bernard May 23, 2006 12:19 PM (in response to Stjepan Matijasevic)We need more info
-
2. Re: Unable to locate UserTransaction in 4.0.4GA
Stjepan Matijasevic May 24, 2006 12:44 PM (in response to Stjepan Matijasevic)Hi Emmanuel,
sorry for not replying sooner.
My app worked on 4.0.4RC1.
I installed 4.0.4GA (jboss-4.0.4.GA-Patch1-installer.jar) with EJB3, changed ArroundInvoke and InvocationContext's package to javax.interceptor (following the EJB3 FR spec and jboss-ejb3x.jar), and deployed the app. First access to stateless session bean where I tried to fetch data from DB resulted in exception as described in my previous post.
Apart from interceptors' package, nothing else was changed in the code.
Transaction and other settings are all defaults as described by EJB3 spec (no extra annotations). Interceptors are not used on that particular session bean. The bean has both local and remote interfaces.
Code that breaks is in method getAll:@PersistenceContext(unitName = "hxloan") EntityManager em; @SuppressWarnings("unchecked") public <T> Collection<T> getAll(Class<T> entityClass) { return createQuery(entityClass).getResultList(); } private Query createQuery(Class<?> entityClass) { return em.createQuery("FROM " + entityClass.getName()); }
Client is desktop app accessing server via Context.lookup. I copied all the necessary libraries (such as jbossall-client.jar, hibernate*.jar, ...) from the AS, so they should be synchronized.
Best regards,
Stjepan