-->
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.  [ 4 posts ] 
Author Message
 Post subject: xml mapping problem
PostPosted: Thu Mar 17, 2005 12:16 pm 
Newbie

Joined: Thu Mar 17, 2005 4:40 am
Posts: 2
Hibernate version: 3.0rc1

Mapping documents:

<class entity-name="URR" table="users_roles_regions" node="URR">

<composite-id>
<key-property name="user_id" type="integer"/>
<key-property name="role_id" type="integer"/>
<key-property name="region_id" type="integer"/>
</class>

Code between sessionFactory.openSession() and session.close():
results = dom4jSession.createQuery("from URR").list();

Full stack trace of any exception that occurs:

Exception in thread "main" java.lang.ClassCastException: org.dom4j.tree.DefaultElement
at org.hibernate.type.DynamicComponentType.setPropertyValues(DynamicComponentType.java:102)
at org.hibernate.tuple.AbstractTuplizer.setIdentifier(AbstractTuplizer.java:126)
at org.hibernate.tuple.AbstractTuplizer.instantiate(AbstractTuplizer.java:223)
at org.hibernate.persister.entity.BasicEntityPersister.instantiate(BasicEntityPersister.java:2919)
at org.hibernate.impl.SessionImpl.instantiate(SessionImpl.java:977)
at org.hibernate.impl.SessionImpl.instantiate(SessionImpl.java:969)
at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:824)
at org.hibernate.loader.Loader.getRow(Loader.java:746)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:290)
at org.hibernate.loader.Loader.doQuery(Loader.java:384)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:203)
at org.hibernate.loader.Loader.doList(Loader.java:1499)
at org.hibernate.loader.Loader.list(Loader.java:1482)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:365)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:268)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:782)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
at pzl.copier.Tester.main(Tester.java:55)


Name and version of the database you are using:
postgressql 8.0

Hi,

I'm trying to use hibernate as a tool for importing/exporting data from two different db (oracle/postgresql). I'm having a problem with binding table users_roles_regions to xml i only want to get data like:
<URR>
<user_id>1</user_id>
...
</URR>

any help?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 17, 2005 3:07 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
apparently looks like a bug.

add a failing testcase to the jira.

-max

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 17, 2005 3:29 pm 
Newbie

Joined: Thu Mar 17, 2005 4:40 am
Posts: 2
max wrote:
apparently looks like a bug.

add a failing testcase to the jira.

-max


Done that,

Is there any easy workaround for this?
Can't find one yet :(


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 09, 2007 5:44 am 
Newbie

Joined: Wed Sep 06, 2006 6:08 am
Posts: 11
Location: Rome, Italy
Could you tell us what the bug id is so I can track this problem - I'm having a similar problem on 3.2.4


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.