• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Association mapping

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are both mapping files getting generated?

Mark
 
Jack Scott
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is bang on target.
reply
    Bookmark Topic Watch Topic
  • New Topic