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.  [ 3 posts ] 
Author Message
 Post subject: hbm2ddl: An association refers to an unmapped class !
PostPosted: Thu Dec 11, 2003 11:08 am 
Beginner
Beginner

Joined: Wed Oct 29, 2003 5:27 am
Posts: 30
win2000 pro, ant 1.5.4, j2sdk 1.4.2-03
My build.xml was modified based on the Workshop Toolset Example. hbm2java works very well.
But hbm2ddl met with problems.
Code:
F:\workshop_toolset_java>ant topdown.hbm2ddl
Buildfile: build.xml
topdown.hbm2ddl:
    [javac] Compiling 10 source files to F:\workshop_toolset_java\classes
    [copy] Copying 6 files to F:\workshop_toolset_java\classes
[schemaexport] (cfg.Environment                     403 ) Hibernate 2.0.3
[schemaexport] (cfg.Environment                     432 ) hibernate.properties not found
[schemaexport] (cfg.Environment                     452 ) using CGLIB reflection optimizer
[schemaexport] (cfg.Environment                     462 ) JVM proxy support: true
[schemaexport] (cfg.Configuration                   703 ) Configuration resource: /hibernate.cfg.xml

[schemaexport] (cfg.Configuration                   270 ) Mapping resource: /PowerSystemResource.hbm
.xml
[schemaexport] (cfg.Configuration                   270 ) Mapping resource: /PowerSystemResource.hbm
.xml
[schemaexport] (cfg.Binder                          178 ) Mapping class: com.hhy.core.PowerSystemResource -> cim_core_powersystemresource
[schemaexport] (cfg.Binder                          456 ) Mapping collection: com.hhy.core.PowerSyst
emResource.companies -> cim_core_psr_x_c
[schemaexport] (cfg.Binder                          146 ) Mapping joined-subclass: com.hhy.core.EquipmentContainer -> cim_core_equipmentcontainer
[schemaexport] (cfg.Binder                          146 ) Mapping joined-subclass: com.hhy.core.VoltageLevel -> voltagelevel
[schemaexport] (cfg.Binder                          146 ) Mapping joined-subclass: com.hhy.core.ConductingEquipment -> cim_core_conductingeq
[schemaexport] (cfg.Binder                          146 ) Mapping joined-subclass: com.hhy.core.ProtectionEquipment -> cim_core_protectioneq
[schemaexport] (cfg.Configuration                   885 ) Configured SessionFactory: null
[schemaexport] (dialect.Dialect                     83  ) Using dialect: net.sf.hibernate.dialect.OracleDialect
[schemaexport] (cfg.Configuration                   492 ) processing one-to-many association mappings
[schemaexport] (cfg.Binder                          1025) Mapping collection: com.hhy.core.EquipmentContainer.equipments -> cim_core_powersystemresource
[schemaexport] (cfg.Configuration                   503 ) processing foreign key constraints

BUILD FAILED
file:F:/workshop_toolset_java/build.xml:114: Schema text failed: An association from the table voltagelevel refers to an unmapped class: com.hhy.core.BaseVoltage

Actually, com.hhy.core.BaseVoltage.class is right there !! Just along with other .class files in the right directories !
It's so curious that no posts on this forum have talked it about.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 11, 2003 9:40 pm 
Beginner
Beginner

Joined: Wed Oct 29, 2003 5:27 am
Posts: 30
Is my problem really very difficult?
I need your help.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 12, 2003 12:34 am 
Beginner
Beginner

Joined: Wed Oct 29, 2003 5:27 am
Posts: 30
ok
I solved my problem by myself!

Add all .hbm.xml files in hibernate.cfg.xml.
Never only write them in a short way as *.hbm.xml.
You should them in a complete way as /com/aaa/bbb/father.hbm.xml and so.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.