• Post Reply Bookmark Topic Watch Topic
  • New Topic

NullPointerException  RSS feed

 
henri henri
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I there some debugging technique that will allow me to find the null pointer in my application? I am using NetBeans to develop the application and I got this message.


Exception in thread "main" java.lang.NullPointerException
at film_titles.AddActorFrame.populateActorBean(Unknown Source)
at film_titles.AddActorFrame.main(Unknown Source)
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Normally, instead of "Unknown Source", you'd see a filename and line number. You must be doing something special to eliminate those, like compiling with "javac -O" or "javac -g:none". Don't do that!
 
jiju ka
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I there some debugging technique that will allow me to find the null pointer in my application?


In eclipse, WSAD you can put a breakpoint such that if a nullpointerexception happens the execution will pause at breakpoint. At this point you can see the classvariables and method variables to see what was null when you got null pointer exception

This is a netbeans specific question. If you know any netbeans community you may ask them or refer the help manual for netbeans
[ November 14, 2005: Message edited by: jiju ka ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!