java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • When having a table with more than one PK, middlegen generates an xml file with elements similar to this (as well as generating a QwDataGrpVwPK class): <composite-id name="comp_id" class="testQwb.hibernate.persistent.QwDataGrpVwPK"> <meta attribute="field-description"> @hibernate.id generator-class="assigned" </meta> <!-- bi-directional many-to-one association to QwDataGrp --> <key-many-to-one name="qwDataGrp" class="testQwb.hibernate.persistent.QwDataGrp" > <column name="DATA_GRP_NUM" /> </key-many-to-one> <!-- uni-directional many-to-one association to QwVw --> <key-many-to-one name="qwVw" class="testQwb.hibernate.persistent.QwVw" > <column name="VW_NUM" /> </key-many-to-one> </composite-id> The problem is that Hibernate is choking when it sees the <meta> attribute here. If I comment out the <meta> portion then it works ok. In previous versions this also worked fine. Something about the presence of the meta tag over here messes up the parsing. The exception I get is: 16:58:13,505 ERROR Configuration:276 - Could not configure datastore from input stream java.lang.NullPointerException at net.sf.hibernate.util.StringHelper.qualify(StringHelper.java:239) at net.sf.hibernate.cfg.Binder.bindComponent(Binder.java:734) at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:263) at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1173) at net.sf.hibernate.cfg.Configuration.add(Configuration.java:245) at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:268) at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:291) at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:935) at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:890) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:826) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:812) at org.ifmc.qw.hibernate.HibernateSession.init(HibernateSession.java:44) Best Regards, Daniel Rosenbaum
    via by Daniel Rosenbaum,
  • When having a table with more than one PK, middlegen generates an xml file with elements similar to this (as well as generating a QwDataGrpVwPK class): <composite-id name="comp_id" class="testQwb.hibernate.persistent.QwDataGrpVwPK"> <meta attribute="field-description"> @hibernate.id generator-class="assigned" </meta> <!-- bi-directional many-to-one association to QwDataGrp --> <key-many-to-one name="qwDataGrp" class="testQwb.hibernate.persistent.QwDataGrp" > <column name="DATA_GRP_NUM" /> </key-many-to-one> <!-- uni-directional many-to-one association to QwVw --> <key-many-to-one name="qwVw" class="testQwb.hibernate.persistent.QwVw" > <column name="VW_NUM" /> </key-many-to-one> </composite-id> The problem is that Hibernate is choking when it sees the <meta> attribute here. If I comment out the <meta> portion then it works ok. In previous versions this also worked fine. Something about the presence of the meta tag over here messes up the parsing. The exception I get is: 16:58:13,505 ERROR Configuration:276 - Could not configure datastore from input stream java.lang.NullPointerException at net.sf.hibernate.util.StringHelper.qualify(StringHelper.java:239) at net.sf.hibernate.cfg.Binder.bindComponent(Binder.java:734) at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:263) at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1173) at net.sf.hibernate.cfg.Configuration.add(Configuration.java:245) at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:268) at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:291) at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:935) at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:890) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:826) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:812) at org.ifmc.qw.hibernate.HibernateSession.init(HibernateSession.java:44) Best Regards, Daniel Rosenbaum
    via by Daniel Rosenbaum,
  • Help with mapping strange table
    via by Martin Podrouzek,
    • java.lang.NullPointerException at net.sf.hibernate.util.StringHelper.qualify(StringHelper.java:239) at net.sf.hibernate.cfg.Binder.bindComponent(Binder.java:734) at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:263) at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1173) at net.sf.hibernate.cfg.Configuration.add(Configuration.java:245) at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:268) at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:291) at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:935) at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:890) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:826) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:812) at org.ifmc.qw.hibernate.HibernateSession.init(HibernateSession.java:44)
    No Bugmate found.