Joined: Thu Mar 10, 2005 8:11 pm Posts: 9
|
Hibernate version: 3.0
We have a table per sub class hierarchy.
E.g.
I have a sub class "sub" which extends the parent "par".
The tables are subTbl and parTbl
i have defined the <joined-subclass> for the "sub" in the "parent" mapping xml. I do not have a separate mapping file for the "sub" as all properties of "sub" are defined in the joined-subclass tag.
In the client i have created an object of "sub" and when i try to save it i get the error as below. I found a similar post in the forums but it said it was because of a package name for the subclass that didnt exist. It surely does in my case! and I have defined the subclass with fully qualified package name as the "sub" is in the separate package as the "parent".
Any help will be appreciated!
Thanks,
Amol
Full stack trace of any exception that occurs:
java.lang.ExceptionInInitializerError
at org.cityofchicago.chess.eber.surveillance.diseasereport.dao.DiseaseReportDAOImpl.<init>(DiseaseReportDAOImpl.java:31)
at org.cityofchicago.chess.eber.common.dao.HibernateDAOFactory.getDiseaseReportDAO(HibernateDAOFactory.java:50)
at org.cityofchicago.chess.eber.client.DRClient.createDR(DRClient.java:70)
at org.cityofchicago.chess.eber.client.DRClient.main(DRClient.java:85)
Caused by: java.lang.NullPointerException
at org.hibernate.mapping.PersistentClass.getMappedClass(PersistentClass.java:87)
at org.hibernate.tuple.PropertyFactory.getGetter(PropertyFactory.java:148)
at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:41)
at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:104)
at org.hibernate.persister.entity.BasicEntityPersister.<init>(BasicEntityPersister.java:398)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:104)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:199)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1043)
at org.cityofchicago.chess.eber.common.dao.HibernateUtil.<clinit>(HibernateUtil.java:40)
|
|