-->
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: Joined-sub class NullPointer Exception
PostPosted: Wed Apr 13, 2005 9:13 pm 
Newbie

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)


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.