-->
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.  [ 9 posts ] 
Author Message
 Post subject: could not instantiate id generator
PostPosted: Sat Jul 08, 2006 6:33 pm 
Beginner
Beginner

Joined: Sat Jul 08, 2006 2:58 pm
Posts: 26
I'm new to hibernate and am getting the following error:

C:\Projects\Main\build\build.xml:253: org.hibernate.MappingException: could not instantiate id generator

What I'm trying to do is to run an ant task to do a table drop and recreate a table.

This is the ant task I'm trying to do:

Code:
<target name="schema-recreate"  description="Recreates (with drop) the schema on the server.">
      <echo>  Schema recreate </echo>
      <hibernatetool destdir="${deploy}">
         <classpath refid="compile.classpath" />
         <configuration configurationfile="${conf-classes}/hibernate.cfg.xml" />
         <hbm2ddl drop="false" create="true" export="true" update="false" />
      </hibernatetool>
   </target>



Everything seems to work, until I do the schema-recreate.

All my *.hbm.xml files get created, and my hibernate.cfg.xml file is created. But I don't know what the error is trying to tell me. Can someone suggest what I might do to debug this problem?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 09, 2006 5:05 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
what id generator is it ?

do you have the classes needed for it in the classpath?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 09, 2006 12:09 pm 
Beginner
Beginner

Joined: Sat Jul 08, 2006 2:58 pm
Posts: 26
I think it's finding the classes in its classpath. This is the output from my ant task:

Code:
C:\Projects\Main\build>ant schema-recreate
Buildfile: build.xml

schema-recreate:
     [echo]   Schema recreate
[hibernatetool] Executing Hibernate Tool with a Standard Configuration
[hibernatetool] 1. task: hbm2ddl (Generates database schema)
[hibernatetool] (cfg.Environment                     479 ) Hibernate 3.1.3
[hibernatetool] (cfg.Environment                     509 ) hibernate.properties not found
[hibernatetool] (cfg.Environment                     525 ) using CGLIB reflection optimizer
[hibernatetool] (cfg.Environment                     555 ) using JDK 1.4 java.sql.Timestamp handling
[hibernatetool] (cfg.Configuration                   1342) configuring from file: hibernate.cfg.xml
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Address.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Address -> Address
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Adversereaction.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Adversereaction -> Adversereaction
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Alertinformation.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Alertinformation -> Medhistory
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Allergy.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Allergy -> Allergy
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Alternatebptherapy.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Alternatebptherapy -> Alternatebptherapy
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Appointment.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Appointment -> Appointment
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Association.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Association -> Association
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Birthrecord.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Birthrecord -> Birthrecord
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Bphistory.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Bphistory -> Bphistory
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Bptherapy.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Bptherapy -> Bptherapy
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Card.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Card -> Card
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Cardactivity.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Cardactivity -> Cardactivity
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Ddapform.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Ddapform -> Ddapform
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Demographic.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Demographic -> Demographic
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Diagnosis.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Diagnosis -> Diagnosis
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Document.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Document -> Document
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Emergencycontact.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Emergencycontact -> Emergencycontact
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Encounter.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Encounter -> Encounter
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Exam.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Exam -> Exam
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Examitem.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Examitem -> Examitem
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Familyhistory.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Familyhistory -> Familyhistory
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Formhistory.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Formhistory -> Formhistory
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Growth.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Growth -> Growth
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Insurancebenefit.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Insurancebenefit -> Insurancebenefit
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Insurancebenefitcoverage.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Insurancebenefitcoverage -> Insurancebenefitcoverage
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Insurancecoverage.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Insurancecoverage -> Insurancecoverage
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Insuranceplan.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Insuranceplan -> Insuranceplan
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Intolerance.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Intolerance -> Intolerance
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Medhistory.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Medhistory -> Medhistory
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Medorder.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Medorder -> Medorder
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Medreaction.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Medreaction -> Medreaction
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Occupation.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Occupation -> Occupation
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Organization.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Organization -> Organization
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Person.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Person -> Person
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Personinsurance.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Personinsurance -> Personinsurance
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Personprocedure.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Personprocedure -> Personprocedure
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Personprovider.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Personprovider -> Personprovider
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Phone.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Phone -> Phone
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Photo.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Photo -> Photo
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickaddresstype.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickaddresstype -> Pickaddresstype
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickadministeringprovider.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickadministeringprovider -> Pickadministeringprovider
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickallergen.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickallergen -> Pickallergen
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickallergencategory.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickallergencategory -> Pickallergencategory
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickallergenreaction.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickallergenreaction -> Pickallergenreaction
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickallergentherapy.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickallergentherapy -> Medhistory
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickalternatebptherapytype.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickalternatebptherapytype -> Pickalternatebptherapytype
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickappointmenttype.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickappointmenttype -> Pickappointmenttype
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickassociationtype.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickassociationtype -> Pickassociationtype
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickbpsymptom.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickbpsymptom -> Pickbpsymptom
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickcardaction.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickcardaction -> Pickcardaction
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickcardreason.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickcardreason -> Pickcardreason
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickcardstatus.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickcardstatus -> Pickcardstatus
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickcontact.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickcontact -> Pickcontact
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickdocumenttype.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickdocumenttype -> Pickdocumenttype
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickdose.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickdose -> Pickdose
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickformtype.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickformtype -> Pickformtype
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickicdcode.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickicdcode -> Pickicdcode
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickintolerance.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickintolerance -> Pickintolerance
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickintolerancecategory.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickintolerancecategory -> Pickintolerancecategory
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickintolerancereaction.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickintolerancereaction -> Pickintolerancereaction
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickmeddiagnosis.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickmeddiagnosis -> Pickmeddiagnosis
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickmedduration.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickmedduration -> Pickmedduration
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickmedexamitem.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickmedexamitem -> Pickmedexamitem
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickmedexamtype.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickmedexamtype -> Pickmedexamtype
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickmedfamily.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickmedfamily -> Pickmedfamily
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickmedfrequency.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickmedfrequency -> Pickmedfrequency
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickmedprocedure.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickmedprocedure -> Pickmedprocedure
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickmedreaction.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickmedreaction -> Pickmedreaction
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickmedreactiontype.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickmedreactiontype -> Pickmedreactiontype
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickmedstrength.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickmedstrength -> Pickmedstrength
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickmedsubtype.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickmedsubtype -> Pickmedsubtype
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickmedtype.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickmedtype -> Pickmedtype
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickorganizationtype.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickorganizationtype -> Pickorganizationtype
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickpersonrace.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickpersonrace -> Pickpersonrace
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickpersonrelationship.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickpersonrelationship -> Pickpersonrelationship
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickpersonreligion.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickpersonreligion -> Pickpersonreligion
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickphonenumbertype.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickphonenumbertype -> Pickphonenumbertype
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickroute.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickroute -> Pickroute
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Picksite.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Picksite -> Picksite
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickstatuscode.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickstatuscode -> Pickstatuscode
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Picksuppliertype.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Picksuppliertype -> Picksuppliertype
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Picksymptom.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Picksymptom -> Picksymptom
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickvaccinefamily.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickvaccinefamily -> Pickvaccinefamily
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickvaccineschedule.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickvaccineschedule -> Pickvaccineschedule
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Pickvaccinetype.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Pickvaccinetype -> Pickvaccinetype
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Signature.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Signature -> Signature
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Socialhistory.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Socialhistory -> Socialhistory
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Vaccinehistory.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Vaccinehistory -> Vaccinehistory
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Vaccineorder.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Vaccineorder -> Vaccineorder
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Vitalsign.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Vitalsign -> Vitalsign
[hibernatetool] (cfg.Configuration                   469 ) Reading mappings from resource: com/chisq/common/bo/Webpart.hbm.xml
[hibernatetool] (cfg.HbmBinder                       309 ) Mapping class: com.chisq.common.bo.Webpart -> Webpart
[hibernatetool] (cfg.Configuration                   1419) Configured SessionFactory: null
[hibernatetool] (dialect.Dialect                     103 ) Using dialect: org.hibernate.dialect.MySQLDialect

BUILD FAILED
C:\Projects\Main\build\build.xml:253: org.hibernate.MappingException: could not instantiate id generator

Total time: 5 seconds


I don't know what you mean by the term id generator, but in all my *.java files I have an XDoclet tag like this:

Code:
    /**
   * @hibernate.id
   * column="AddressID"
   * generator-class="native"
   */
   public Long getId() {
      return id;
   }
   public void setId(Long id) {
      this.id = id;
   }


And in all my *.hbm.xml files, XDoclet creates:

Code:
<id
            name="id"
            column="AddressID"
            type="java.lang.Long"
        >
            <generator class="native">
              <!-- 
                  To add non XDoclet generator parameters, create a file named
                  hibernate-generator-params-Address.xml
                  containing the additional parameters and place it in your merge dir.
              -->
            </generator>
        </id>



So all that looks ok. But I guess I'm missing something else. Is it safe to assume that my classpath is ok from looking at the console ouput from my ant task?

BTW, what is a id generator? Is that where I specify generator class="native"?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 09, 2006 12:13 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
yes - that is the id generator.

how about showing us the full stacktrace?

via ant you can get that by adding -verbose when you start it.

e..g "ant -verbose schema-recreate"

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 09, 2006 12:59 pm 
Beginner
Beginner

Joined: Sat Jul 08, 2006 2:58 pm
Posts: 26
Here is the full stacktrace:
Code:
C:\Projects\Main\build\build.xml:253: org.hibernate.MappingException: could not instantiate id generator
        at org.apache.tools.ant.Task.perform(Task.java:373)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
        at org.apache.tools.ant.Main.runBuild(Main.java:668)
        at org.apache.tools.ant.Main.startAnt(Main.java:187)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: org.hibernate.MappingException: could not instantiate id generator
        at org.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:97)
        at org.hibernate.mapping.SimpleValue.createIdentifierGenerator(SimpleValue.java:152)
        at org.hibernate.cfg.Configuration.iterateGenerators(Configuration.java:601)
        at org.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:712)
        at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:91)
        at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:59)
        at org.hibernate.tool.ant.Hbm2DDLExporterTask.execute(Hbm2DDLExporterTask.java:43)
        at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:143)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        ... 10 more
Caused by: org.hibernate.MappingException: could not interpret id generator strategy:
        at org.hibernate.id.IdentifierGeneratorFactory.getIdentifierGeneratorClass(IdentifierGeneratorFactory.java:108)
        at org.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:91)
        ... 19 more
--- Nested Exception ---
org.hibernate.MappingException: could not instantiate id generator
        at org.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:97)
        at org.hibernate.mapping.SimpleValue.createIdentifierGenerator(SimpleValue.java:152)
        at org.hibernate.cfg.Configuration.iterateGenerators(Configuration.java:601)
        at org.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:712)
        at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:91)
        at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:59)
        at org.hibernate.tool.ant.Hbm2DDLExporterTask.execute(Hbm2DDLExporterTask.java:43)
        at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:143)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
        at org.apache.tools.ant.Main.runBuild(Main.java:668)
        at org.apache.tools.ant.Main.startAnt(Main.java:187)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: org.hibernate.MappingException: could not interpret id generator strategy:
        at org.hibernate.id.IdentifierGeneratorFactory.getIdentifierGeneratorClass(IdentifierGeneratorFactory.java:108)
        at org.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:91)
        ... 19 more

Total time: 5 seconds
C:\Projects\Main\build>


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 09, 2006 5:54 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
"could not interpret id generator strategy:"

looks like you have an empty string generator strategy.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 09, 2006 10:55 pm 
Beginner
Beginner

Joined: Sat Jul 08, 2006 2:58 pm
Posts: 26
OK, so are you saying that my *.hbm.xml files are not being read in after all? Because as I mentioned earlier, all of them have something like the following in the file:

Code:
        <id
            name="id"
            column="AddressID"
            type="java.lang.Long"
        >
            <generator class="native">
              <!-- 
                  To add non XDoclet generator parameters, create a file named
                  hibernate-generator-params-Address.xml
                  containing the additional parameters and place it in your merge dir.
              -->
            </generator>
        </id>


Am I specifying the id generator incorrectly?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 10, 2006 1:56 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
i'm saying that some id generator name is broken. looks like it is the empty string.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 10, 2006 2:27 am 
Beginner
Beginner

Joined: Sat Jul 08, 2006 2:58 pm
Posts: 26
Max, thank you for your help. You were correct. One of my .java class files had a typo in my XDoclet tag:

I had

/**
* @hibernate.id
* column=.bpSymptomID"
* generator-class="native"
*/


and it should have been

/**
* @hibernate.id
* column="bpSymptomID"
* generator-class="native"
*/


So naturally when I generated my .hbm.xml file the

the generator class was a empty string as you said.


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