The title says it really. I have the following code:
Code:
Session s = EJBUtil.getEntityMgr().getHibernateSession(com.fcl.greenfield.entity.Player.class).getSession(EntityMode.DOM4J);
Query sq = s.createQuery("from Player");
List l = sq.list();
And it's throwing the error on the list() line (76):
Code:
org.hibernate.HibernateException: No tuplizer found for entity-mode [dom4j]
at org.hibernate.tuple.TuplizerLookup.getTuplizer(TuplizerLookup.java:221)
at org.hibernate.tuple.EntityMetamodel.getTuplizer(EntityMetamodel.java:96)
at org.hibernate.persister.entity.AbstractEntityPersister.getTuplizer(AbstractEntityPersister.java:2970)
at org.hibernate.persister.entity.AbstractEntityPersister.instantiate(AbstractEntityPersister.java:3383)
at org.hibernate.impl.SessionImpl.instantiate(SessionImpl.java:1268)
at org.hibernate.impl.SessionImpl.instantiate(SessionImpl.java:1257)
at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1291)
at org.hibernate.loader.Loader.getRow(Loader.java:1197)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:569)
at org.hibernate.loader.Loader.doQuery(Loader.java:689)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2145)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
at org.hibernate.loader.Loader.list(Loader.java:2024)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:392)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:333)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at com.fcl.servlet.DisplayQuery.doGet(DisplayQuery.java:76)
What's wrong?
Oh, I'm using EJB3 persistence annotated classes, not XML class definitions.
Do I have to add some special Hibernate annotation?