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.

  • java.lang.NullPointerException at net.sf.hibernate.cfg.Binder.bindCollectionSecondPass(Binder.java:1076) at net.sf.hibernate.cfg.Binder.bindSetSecondPass(Binder.java:923) at net.sf.hibernate.cfg.Binder$SetSecondPass.secondPass(Binder.java:1187) at net.sf.hibernate.cfg.Binder$SecondPass.doSecondPass(Binder.java:1135) at net.sf.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:497) at net.sf.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:352) at net.sf.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:51) at net.sf.hibernate.tool.hbm2ddl.SchemaExportTask.getSchemaExport(SchemaExportTask.java:198) at net.sf.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExportTask.java:129) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:166) at org.apache.tools.ant.Task.perform(Task.java:317) at org.apache.tools.ant.Target.execute(Target.java:309) at org.apache.tools.ant.Target.performTasks(Target.java:334) at org.apache.tools.ant.Project.executeTarget(Project.java:1306) at org.apache.tools.ant.Project.executeTargets(Project.java:1250) at org.apache.tools.ant.Main.runBuild(Main.java:610) at org.apache.tools.ant.Main.start(Main.java:196) at org.apache.tools.ant.Main.main(Main.java:235) The line in the sourcecode is: model.getKey().createForeignKeyOfClass( model.getOwner().getPersistentClass() ); Tinkering with the sourcecode showed that the problem is that model.getKey() returned null.
    via by Ingo Schildmann,
    • java.lang.NullPointerException at net.sf.hibernate.cfg.Binder.bindCollectionSecondPass(Binder.java:1076) at net.sf.hibernate.cfg.Binder.bindSetSecondPass(Binder.java:923) at net.sf.hibernate.cfg.Binder$SetSecondPass.secondPass(Binder.java:1187) at net.sf.hibernate.cfg.Binder$SecondPass.doSecondPass(Binder.java:1135) at net.sf.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:497) at net.sf.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:352) at net.sf.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:51) at net.sf.hibernate.tool.hbm2ddl.SchemaExportTask.getSchemaExport(SchemaExportTask.java:198) at net.sf.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExportTask.java:129) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:166) at org.apache.tools.ant.Task.perform(Task.java:317) at org.apache.tools.ant.Target.execute(Target.java:309) at org.apache.tools.ant.Target.performTasks(Target.java:334) at org.apache.tools.ant.Project.executeTarget(Project.java:1306) at org.apache.tools.ant.Project.executeTargets(Project.java:1250) at org.apache.tools.ant.Main.runBuild(Main.java:610) at org.apache.tools.ant.Main.start(Main.java:196) at org.apache.tools.ant.Main.main(Main.java:235)
    No Bugmate found.