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 accessing from parent to children I get following exception: log4j:WARN No appenders could be found for logger (net.sf.hibernate.cfg.Environment). log4j:WARN Please initialize the log4j system properly. de.jdufner.BestellKopf@7bc56beb bestelldatum=java.util.GregorianCalendar[time=1086386400000,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Europe/Berlin",offset=3600000,dstSavings=3600000,useDaylight=true,transitions=143,lastRule=java.util.SimpleTimeZone[id=Europe/Berlin,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2004,MONTH=5,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=5,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=?,HOUR=?,HOUR_OF_DAY=?,MINUTE=?,SECOND=?,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?] exportnummer=0 lieferdatum=null bestellwert=0.0 uptimestamp=2004-06-05 00:00:00.0 upprog=UNKNOWN Exception in thread "main" java.lang.NullPointerException at net.sf.hibernate.collection.Set.toString(Set.java:218) at java.lang.String.valueOf(String.java:2177) at java.io.PrintStream.print(PrintStream.java:462) at java.io.PrintStream.println(PrintStream.java:599) at de.jdufner.Main.main(Main.java:46) No nested exception, nothing else. This exception is not limited to the toString() method, if I try to iterator over all elements in collection I get the exception too. I found bug HB-753, it is very similar to my bug, but I didn't get an exception from my hashCode() method. I'll attach all files to reproduce this bug. Thanks, Jurgen
    via by Jurgen Dufner,
  • When accessing from parent to children I get following exception: log4j:WARN No appenders could be found for logger (net.sf.hibernate.cfg.Environment). log4j:WARN Please initialize the log4j system properly. de.jdufner.BestellKopf@7bc56beb bestelldatum=java.util.GregorianCalendar[time=1086386400000, areFieldsSet=false,areAllFieldsSet=false,lenient=true, zone=sun.util.calendar.ZoneInfo[id="Europe/Berlin",offset=3600000, dstSavings=3600000,useDaylight=true,transitions=143, lastRule=java.util.SimpleTimeZone[id=Europe/Berlin,offset=3600000, dstSavings=3600000,useDaylight=true,startYear=0,startMode=2, startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000, startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1, endTime=3600000,endTimeMode=2]],firstDayOfWeek=2, minimalDaysInFirstWeek=4,ERA=1,YEAR=2004,MONTH=5,WEEK_OF_YEAR=?, WEEK_OF_MONTH=?,DAY_OF_MONTH=5,DAY_OF_YEAR=?,DAY_OF_WEEK=?, DAY_OF_WEEK_IN_MONTH=?,AM_PM=?,HOUR=?,HOUR_OF_DAY=?,MINUTE=?, SECOND=?,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?] exportnummer=0 lieferdatum=null bestellwert=0.0 uptimestamp=2004-06-05 00:00:00.0 upprog=UNKNOWN Exception in thread "main" java.lang.NullPointerException at net.sf.hibernate.collection.Set.toString(Set.java:218) at java.lang.String.valueOf(String.java:2177) at java.io.PrintStream.print(PrintStream.java:462) at java.io.PrintStream.println(PrintStream.java:599) at de.jdufner.Main.main(Main.java:46) No nested exception, nothing else. This exception is not limited to the toString() method, if I try to iterator over all elements in collection I get the exception too. I found bug HB-753, it is very similar to my bug, but I didn't get an exception from my hashCode() method. I'll attach all files to reproduce this bug. Thanks, Jurgen
    via by Jurgen Dufner,
  • When accessing from parent to children I get following exception: log4j:WARN No appenders could be found for logger (net.sf.hibernate.cfg.Environment). log4j:WARN Please initialize the log4j system properly. de.jdufner.BestellKopf@7bc56beb bestelldatum=java.util.GregorianCalendar[time=1086386400000,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Europe/Berlin",offset=3600000,dstSavings=3600000,useDaylight=true,transitions=143,lastRule=java.util.SimpleTimeZone[id=Europe/Berlin,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2004,MONTH=5,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=5,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=?,HOUR=?,HOUR_OF_DAY=?,MINUTE=?,SECOND=?,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?] exportnummer=0 lieferdatum=null bestellwert=0.0 uptimestamp=2004-06-05 00:00:00.0 upprog=UNKNOWN Exception in thread "main" java.lang.NullPointerException at net.sf.hibernate.collection.Set.toString(Set.java:218) at java.lang.String.valueOf(String.java:2177) at java.io.PrintStream.print(PrintStream.java:462) at java.io.PrintStream.println(PrintStream.java:599) at de.jdufner.Main.main(Main.java:46) No nested exception, nothing else. This exception is not limited to the toString() method, if I try to iterator over all elements in collection I get the exception too. I found bug HB-753, it is very similar to my bug, but I didn't get an exception from my hashCode() method. I'll attach all files to reproduce this bug. Thanks, Jurgen
    via by Jurgen Dufner,
  • When accessing from parent to children I get following exception: log4j:WARN No appenders could be found for logger (net.sf.hibernate.cfg.Environment). log4j:WARN Please initialize the log4j system properly. de.jdufner.BestellKopf@7bc56beb bestelldatum=java.util.GregorianCalendar[time=1086386400000, areFieldsSet=false,areAllFieldsSet=false,lenient=true, zone=sun.util.calendar.ZoneInfo[id="Europe/Berlin",offset=3600000, dstSavings=3600000,useDaylight=true,transitions=143, lastRule=java.util.SimpleTimeZone[id=Europe/Berlin,offset=3600000, dstSavings=3600000,useDaylight=true,startYear=0,startMode=2, startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000, startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1, endTime=3600000,endTimeMode=2]],firstDayOfWeek=2, minimalDaysInFirstWeek=4,ERA=1,YEAR=2004,MONTH=5,WEEK_OF_YEAR=?, WEEK_OF_MONTH=?,DAY_OF_MONTH=5,DAY_OF_YEAR=?,DAY_OF_WEEK=?, DAY_OF_WEEK_IN_MONTH=?,AM_PM=?,HOUR=?,HOUR_OF_DAY=?,MINUTE=?, SECOND=?,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?] exportnummer=0 lieferdatum=null bestellwert=0.0 uptimestamp=2004-06-05 00:00:00.0 upprog=UNKNOWN Exception in thread "main" java.lang.NullPointerException at net.sf.hibernate.collection.Set.toString(Set.java:218) at java.lang.String.valueOf(String.java:2177) at java.io.PrintStream.print(PrintStream.java:462) at java.io.PrintStream.println(PrintStream.java:599) at de.jdufner.Main.main(Main.java:46) No nested exception, nothing else. This exception is not limited to the toString() method, if I try to iterator over all elements in collection I get the exception too. I found bug HB-753, it is very similar to my bug, but I didn't get an exception from my hashCode() method. I'll attach all files to reproduce this bug. Thanks, Jurgen
    via by Jurgen Dufner,
  • After discussing this error on the Forum, emmanuel asked me to put this thing into the JIRA. I got this error java.lang.NullPointerException at net.sf.hibernate.collection.Set.toString(Set.java:219) at java.lang.String.valueOf(String.java:2177) at java.lang.StringBuffer.append(StringBuffer.java:361) at hu.pmmedia.test.hibernate.HibernateCase.testHibernate(HibernateCase.java:56) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:410) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:294) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:182) I have the following scenario -> parent table, child table PARENT table has a string (instanz) and a calendar (beginndatum) as a COMPOSITE primary key CHILD table has the same two from the parent plus a calendar (erfassungsbeginn) field as composite key. IF I load the parent object, I got that error when I call the getChildren() on the parent. I tried having bidirectional mapping, error is the same ALTHOUGH from the child I can always get the parent object loaded :))) in this example I don't have bidirection to make it less complicated
    via by Istvan Orban,
  • After discussing this error on the Forum, emmanuel asked me to put this thing into the JIRA. I got this error java.lang.NullPointerException at net.sf.hibernate.collection.Set.toString(Set.java:219) at java.lang.String.valueOf(String.java:2177) at java.lang.StringBuffer.append(StringBuffer.java:361) at hu.pmmedia.test.hibernate.HibernateCase.testHibernate(HibernateCase.java:56) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:410) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:294) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:182) I have the following scenario -> parent table, child table PARENT table has a string (instanz) and a calendar (beginndatum) as a COMPOSITE primary key CHILD table has the same two from the parent plus a calendar (erfassungsbeginn) field as composite key. IF I load the parent object, I got that error when I call the getChildren() on the parent. I tried having bidirectional mapping, error is the same ALTHOUGH from the child I can always get the parent object loaded :))) in this example I don't have bidirection to make it less complicated
    via by Istvan Orban,
    • java.lang.NullPointerException at net.sf.hibernate.collection.Set.toString(Set.java:218) at java.lang.String.valueOf(String.java:2177) at java.io.PrintStream.print(PrintStream.java:462) at java.io.PrintStream.println(PrintStream.java:599) at de.jdufner.Main.main(Main.java:46)
    No Bugmate found.