-->
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.  [ 1 post ] 
Author Message
 Post subject: key-many-to-one: An association refers to an unmapped class
PostPosted: Sat Jul 15, 2006 2:36 pm 
Newbie

Joined: Wed Jan 11, 2006 12:59 pm
Posts: 11
I am having trouble mapping two classes to a legacy DB. The mappings and stack trace are below. I must be doing something wrong with the key-many-to-one elements found in the composite-id, but I don't understand what the message "An association from the table CLMAST refers to an unmapped class: java.lang.String" means. Any help would be appreciated.



Hibernate version: 3.0

Mapping documents:

<class name="ClaimMaster" table="CLMAST" schema="fbmtstdta" catalog="FBMAS270">
<composite-id name="clKey" class="ClaimMasterKey">
<key-many-to-one name="company" column="CMTCO" />
<key-many-to-one name="policy" column="CMTPOL" />
<key-many-to-one name="suffix" column="CMTSFX" />
<key-property name="lossDate" column="CMTLDT" />
<key-property name="sequence" column="CMTSEQ" />

</composite-id>

<property
name="insuredHomePhone"
column="CMTIHP"
type="long"
/>


<many-to-one name="insMaster" class="InsuranceMaster" ></many-to-one>

</class>


<class name="InsuranceMaster" table="INMAST" schema="fbmtstdta" catalog="FBMAS270">
<composite-id name="inKey" class="InsuranceMasterKey">
<key-property name="company" column="INMCMPY" type="string"/>
<key-property name="policy" column="INMPRFX" type="string"/>
<key-property name="suffix" column="INMSUFX" type="string"/>
</composite-id>

<property
name="fedSuffix"
column="INMFEDSX"
type="long"
/>


</class>


Full stack trace of any exception that occurs:

%%%% Error Creating SessionFactory %%%%
org.hibernate.MappingException: An association from the table CLMAST refers to an unmapped class: java.lang.String
at org.hibernate.cfg.Configuration.secondPassCompileForeignKeys(Configuration.java:968)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:921)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:999)
at com.idfbins.adp.SessionFactory.currentSession(SessionFactory.java:49)
at com.idfbins.adp.MyTest.main(MyTest.java:18)
Exception in thread "main" java.lang.NullPointerException
at com.idfbins.adp.MyTest.main(MyTest.java:19)


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

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.