-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: JPA entities to XML
PostPosted: Tue Jun 30, 2009 5:15 am 
Newbie

Joined: Tue Jun 30, 2009 5:12 am
Posts: 2
I am using JPA for persistence and using Hibernate as persistence provider. I want to get XML output from query. This is supported in Hibernate by using following code:

Code:
  Session sess = session.getSession(EntityMode.DOM4J);
Element elem = (Element) sess.load(Test.class, 2); 


Where this 'elem' is DOM4J element which is XML element. This is working fine when I am using hbm files for storing meta-data, but whem I am using JPA annotation for storing metadata, code is giving following error.

Code:
  org.hibernate.HibernateException: No tuplizer found for entity-mode [dom4j]
   at org.hibernate.tuple.EntityModeToTuplizerMapping.getTuplizer(EntityModeToTuplizerMapping.java:68)
   at org.hibernate.tuple.entity.EntityMetamodel.getTuplizer(EntityMetamodel.java:105)
   at org.hibernate.persister.entity.AbstractEntityPersister.createProxy(AbstractEntityPersister.java:3455)
   at org.hibernate.event.def.DefaultLoadEventListener.createProxyIfNecessary(DefaultLoadEventListener.java:257)
   at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:191)
   at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103)
   at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
   at org.hibernate.impl.SessionImpl.load(SessionImpl.java:795)
   at org.hibernate.impl.SessionImpl.load(SessionImpl.java:788)

 


What would be the solution for getting the result in XML from JPA entity?


Top
 Profile  
 
 Post subject: Re: JPA entities to XML
PostPosted: Wed Jul 01, 2009 12:22 am 
Newbie

Joined: Tue Jun 30, 2009 5:12 am
Posts: 2
That has been fixed in the new release 3.3


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.