-->
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: Problem with mapping in hibernate
PostPosted: Mon Jan 23, 2006 4:32 pm 
Newbie

Joined: Mon Jan 23, 2006 4:11 pm
Posts: 1
I am using hibernate 3.0

While trying to start a a Session, some of my hibernate .xml's map but the machine chokes on one in particular, facility.xml, shown below:

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>

<class name="com.redprairie.tm.Facility" table="adrmst">

<id name="addressID" type="string" unsaved-value="null" >
<column name="adr_id"/>
</id>

<property name="externalHostID" column="host_ext_id"/>
<property name="name" column="adrnam"/>
<property name="country" column="ctry_name"/>
<property name="state" column="adrstc"/>
<property name="city" column="adrcty"/>
<property name="postalCode" column="adrpsz"/>

</class>

</hibernate-mapping>

The compiler chokes giving me this problem:

INFO: Mapping file: C:\tmdev\tm6\src\mappings\hibernate\facility.hbm.xml
Jan 23, 2006 2:06:10 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
INFO: Mapping class: com.redprairie.tm.Facility -> adrmst
Jan 23, 2006 2:06:10 PM org.hibernate.cfg.Configuration add
SEVERE: Could not compile the mapping document
org.hibernate.PropertyNotFoundException: field not found: externalHostID

The entire trace is shown below:


Jan 23, 2006 2:06:10 PM org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.0.5
Jan 23, 2006 2:06:10 PM org.hibernate.cfg.Environment <clinit>
INFO: loaded properties from resource hibernate.properties: {hibernate.order_updates=true, hibernate.default_batch_fetch_size=8, hibernate.cglib.use_reflection_optimizer=true, hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider, hibernate.dialect=org.hibernate.dialect.SQLServerDialect, hibernate.max_fetch_depth=1, hibernate.jdbc.use_streams_for_binary=true, hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N', hibernate.cache.region_prefix=hibernate.test, hibernate.jdbc.batch_versioned_data=true, hibernate.connection.pool_size=1}
Jan 23, 2006 2:06:10 PM org.hibernate.cfg.Environment <clinit>
INFO: using java.io streams to persist binary types
Jan 23, 2006 2:06:10 PM org.hibernate.cfg.Environment <clinit>
INFO: using CGLIB reflection optimizer
Jan 23, 2006 2:06:10 PM org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
Jan 23, 2006 2:06:10 PM org.hibernate.cfg.Configuration addFile
INFO: Mapping file: C:\tmdev\tm6\src\mappings\hibernate\chargelayout.hbm.xml
Jan 23, 2006 2:06:10 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
INFO: Mapping class: com.redprairie.tm.rating.ChargeLayout -> tm_chrg_lay
Jan 23, 2006 2:06:10 PM org.hibernate.cfg.Configuration addFile
INFO: Mapping file: C:\tmdev\tm6\src\mappings\hibernate\chargetype.hbm.xml
Jan 23, 2006 2:06:10 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
INFO: Mapping class: com.redprairie.tm.rating.ChargeType -> chargetype
Jan 23, 2006 2:06:10 PM org.hibernate.cfg.Configuration addFile
INFO: Mapping file: C:\tmdev\tm6\src\mappings\hibernate\commodity.hbm.xml
Jan 23, 2006 2:06:10 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
INFO: Mapping class: com.redprairie.tm.Commodity -> commodity
Jan 23, 2006 2:06:10 PM org.hibernate.cfg.Configuration addFile
INFO: Mapping file: C:\tmdev\tm6\src\mappings\hibernate\facility.hbm.xml
Jan 23, 2006 2:06:10 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
INFO: Mapping class: com.redprairie.tm.Facility -> adrmst
Jan 23, 2006 2:06:10 PM org.hibernate.cfg.Configuration add
SEVERE: Could not compile the mapping document
org.hibernate.PropertyNotFoundException: field not found: externalHostID
at org.hibernate.property.DirectPropertyAccessor.getField(DirectPropertyAccessor.java:96)
at org.hibernate.property.DirectPropertyAccessor.getField(DirectPropertyAccessor.java:103)
at org.hibernate.property.DirectPropertyAccessor.getGetter(DirectPropertyAccessor.java:111)
at org.hibernate.util.ReflectHelper.getter(ReflectHelper.java:90)
at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:78)
at org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:275)
at org.hibernate.cfg.HbmBinder.createProperty(HbmBinder.java:1841)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:1827)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:1728)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:318)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:236)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:152)
at org.hibernate.cfg.Configuration.add(Configuration.java:362)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:400)
at org.hibernate.cfg.Configuration.addFile(Configuration.java:245)
at org.hibernate.cfg.Configuration.addDirectory(Configuration.java:530)
at com.redprairie.moca.db.hibernate.HibernateTools.getSession(HibernateTools.java:52)
at com.redprairie.moca.db.hibernate.HibernateTools.getSession(HibernateTools.java:68)
at com.redprairie.tm.dao.hibernate.Test.TU_HibernateOrderDAO.testReadByKey(TU_HibernateOrderDAO.java:26)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Jan 23, 2006 2:06:10 PM org.hibernate.cfg.Configuration addFile
SEVERE: Could not configure datastore from file: C:\tmdev\tm6\src\mappings\hibernate\facility.hbm.xml
org.hibernate.PropertyNotFoundException: field not found: externalHostID
at org.hibernate.property.DirectPropertyAccessor.getField(DirectPropertyAccessor.java:96)
at org.hibernate.property.DirectPropertyAccessor.getField(DirectPropertyAccessor.java:103)
at org.hibernate.property.DirectPropertyAccessor.getGetter(DirectPropertyAccessor.java:111)
at org.hibernate.util.ReflectHelper.getter(ReflectHelper.java:90)
at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:78)
at org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:275)
at org.hibernate.cfg.HbmBinder.createProperty(HbmBinder.java:1841)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:1827)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:1728)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:318)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:236)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:152)
at org.hibernate.cfg.Configuration.add(Configuration.java:362)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:400)
at org.hibernate.cfg.Configuration.addFile(Configuration.java:245)
at org.hibernate.cfg.Configuration.addDirectory(Configuration.java:530)
at com.redprairie.moca.db.hibernate.HibernateTools.getSession(HibernateTools.java:52)
at com.redprairie.moca.db.hibernate.HibernateTools.getSession(HibernateTools.java:68)
at com.redprairie.tm.dao.hibernate.Test.TU_HibernateOrderDAO.testReadByKey(TU_HibernateOrderDAO.java:26)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
E 3940 14:06:11 Unable to load application library C:\tmdev\TM6\bin\TMmsi.dll: The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (MCSi18n)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (MCSbase)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (MCSems)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (MCSdda)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (MOCARPTInt)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (SALlex)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (SALems)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (SALcrud)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (SALora)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (SALmocarpt)
W 3940 14:06:11 The specified module could not be found.

Initializing MOCA library
W 3940 14:06:11 Library could not be loaded (SALrpt)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (SALbase)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (SALweb)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (SALuser)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (SALcbs)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (SALpm)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (SALlbl)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (SALcbsrpt)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (SALpmtd)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (SALarc)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (SALent)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (SALvoc)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (SAL Geoloc)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (libSeamLES)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (slems)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (sltrg)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (SALRFIDtag)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (DCSint)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (DCSvoc)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (DCScbs)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (DCSequip)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (DCSscm)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (DCSrf)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (DCSlm)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (mcsi)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (dcsdyncfg)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (DCSpck)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (DCStm)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (DCSordact)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (DCSserv)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (DCSfdx)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (DCSsup)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (DCScmdrqa)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (DCSpm)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (DCSems)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (DCSrfid)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (DCSi18n)
W 3940 14:06:11 The specified module could not be found.

Initializing MOCA library
W 3940 14:06:11 Library could not be loaded (DCStools)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (dcsmgtopr)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (DCSlbl)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (DCSrpt)
W 3940 14:06:11 The specified module could not be found.

Initializing MOCA library
Initializing MOCA library
W 3940 14:06:11 Library could not be loaded (SALlens)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (DCSlens)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (DCStrlract)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (DCSinvact)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (tmratingC)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (DCSslot)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (DCSintegrtr)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (tmmcsi)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (TMmnt)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (tmosd)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (TMint)
W 3940 14:06:11 The specified module could not be found.

Initializing MOCA library
W 3940 14:06:11 Library could not be loaded (tmwebord)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (TMrpt)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (TMTemperature)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (TMutil)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (tmems)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (tmdistance)
W 3940 14:06:11 The specified module could not be found.

Initializing MOCA library
Initializing MOCA library
Initializing MOCA library
Initializing MOCA library
W 3940 14:06:11 Library could not be loaded (TM6)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (TMdigcarrier)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (TMdigtracker)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (FreightPay)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (tmcost)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (ddslib)
W 3940 14:06:11 The specified module could not be found.

Initializing MOCA library
W 3940 14:06:11 Library could not be loaded (VARint)
W 3940 14:06:11 The specified module could not be found.

W 3940 14:06:11 Library could not be loaded (USRint)
W 3940 14:06:11 The specified module could not be found.

Can anyone help me solve this riddle? Why am I getting that error?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 23, 2006 5:52 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Does your Facility class have get/setExternalHostID() methods?


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.