GeeCON Prague 2014*
The moose likes Object Relational Mapping and the fly likes Association mapping Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Association mapping" Watch "Association mapping" New topic
Author

Association mapping

Jack Scott
Greenhorn

Joined: Mar 13, 2006
Posts: 2
I've looked through the current topics, but I haven't found an answer. So, here is another question on how to get Hibernate3 association mapping to work. Please let me know if you see why I get the following error: Association references unmapped class: ListValueDTO.

Thanks


I get the following error message in the server.log file:

2006-03-13 21:10:14,526 DEBUG [org.jboss.deployment.MainDeployer] Deployed package: file:/C:/Program Files/jboss-4.0.3SP1/
server/default/deploy/jaw.ear
2006-03-13 21:10:14,526 DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Watch URL for: file:/C:/Program Files/
jboss-4.0.3SP1/server/default/deploy/jaw.ear -> file:/C:/Program Files/jboss-4.0.3SP1/server/default/deploy/jaw.ear
2006-03-13 21:10:14,526 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] Incomplete Deployment listing:

--- MBeans waiting for other MBeans ---
ObjectName: jboss.har:service=Hibernate
State: FAILED
Reason: org.hibernate.MappingException: Association references unmapped class: ListValueDTO
I Depend On:
jboss.jca:service=RARDeployer
jboss.jca:service=LocalTxCM,name=JBossAtWorkDS

--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.har:service=Hibernate
State: FAILED
Reason: org.hibernate.MappingException: Association references unmapped class: ListValueDTO
I Depend On:
jboss.jca:service=RARDeployer
jboss.jca:service=LocalTxCM,name=JBossAtWorkDS

I have two classes, below, that get data from two tables created with the following statements:

Here are the class files:

and the second class:


Finally, here are the two .hbm files:

and the second file, ListValueDTO.hbm.xml:

[ March 14, 2006: Message edited by: Jack Scott ]

[Added code tage - Paul Sturrock]
[ March 27, 2006: Message edited by: Paul Sturrock ]
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Are both mapping files getting generated?

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Jack Scott
Greenhorn

Joined: Mar 13, 2006
Posts: 2
Mark, Yes both mapping files are in my posting: CoinDTO.hbm.xml and ListValueDTO.hbm.xml. The ListValueDTO.hbm.xml file doesn't appear to be valid for some reason. Could there be a problem with the foreign key setup in the Hypersonic database I'm using? Please see the two table create scripts at the beginning of my submittal.
[ March 15, 2006: Message edited by: Jack Scott ]
Avinash Rawana
Ranch Hand

Joined: Feb 22, 2006
Posts: 31
You are deploying with a HAR correct?

I would unzip the HAR and get the directory structure to make sure everything is in the right place.

-Avinash


--------------<br />Avinash A. Ramana<br />NYIT Student<br /><a href="http://www.aramana.org" target="_blank" rel="nofollow">http://www.aramana.org</a><br />avinash@styleempire.com
Steve Canny
Greenhorn

Joined: Apr 15, 2006
Posts: 1
You need to use a fully qualified class name in the class attribute of the <many-to-one> and <set> tags. Just add the package prefix and it should work.
Arun Kumar
Ranch Hand

Joined: May 22, 2006
Posts: 62
This is bang on target.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Association mapping