[jboss-user] [JBoss Seam] - convertEntity with GF+Toplink
trouby
do-not-reply at jboss.com
Wed Jun 6 13:10:11 EDT 2007
Hey,
I'm trying to use <s:convertEntity/> Seam's tag under GF+Toplink but I get the following exception:
| java.lang.ClassCastException: oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl cannot be cast to org.hibernate.Session
|
Shouldn't it support Toplink's entityManager as well?
In persistence.xml I declare a PU as:
| <persistence-unit name="pu1" transaction-type="JTA">
| ...data source... etc etc...
|
In web.xml I have the PU resource reference as:
| <persistence-unit-ref>
| <persistence-unit-ref-name>edm_acc_em</persistence-unit-ref-name>
| <persistence-unit-name>pu1</persistence-unit-name>
| </persistence-unit-ref>
|
In components.xml I declare the managed persistence conext as:
| <core:managed-persistence-context name="entityManager" auto-create="true" persistence-unit-jndi-name="java:comp/env/edm_acc_em"/>
|
It kinda work well when I try to use s:selectItems with queries defined in 'framework:entity-query', but with the entityConverter it fails,
As always,
Many thanks,
Asaf.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4051834#4051834
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4051834
More information about the jboss-user
mailing list