Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Meta search engine

 
Indira purohit
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everyone ,
I am trying to build a meta search engine , deploying it on Netbeans ...Struts Framework Having a null pointer exception ... Tried all that`s possible ... means of removing it .. no clue y it isnt working
Capture.PNG
[Thumbnail for Capture.PNG]
image of the error
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15272
37
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch. Please copy and paste the text of the error message next time you ask a question - it's easier to read than a screenshot, and screenshots are not searchable (the search function of the forums doesn't work on images).

NullPointerExceptions are usually easy to track down. Look at the error message. It shows you a stack trace - the sequence of methods that was called up to the point where the exception happened. It tells you exactly where the NullPointerException occurred: in line 535 of RequestProcessor.java.

So, open up RequestProcessor.java and go to line 535. A NullPointerException happens when you try to call a method on a variable that's null. Check what method is being called on line 535. Why is the variable that you call the method on, null?

Also have a look at TestingHtmlParser line 204.
 
Indira purohit
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Jesper de Jong : sorry was not aware point noted
Checked the line too ... Nothing seems wrong !!
Will recheck it
Thank you
 
Swastik Dey
Rancher
Posts: 1604
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please show us the code, this might help us to figure out the issue.
 
Indira purohit
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually its a code from Google code ..
webpage
Checked it out ...
Tired making few changes did not work and now landed up on ... Null pointer exception
 
Maneesh Godbole
Saloon Keeper
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Indira purohit wrote:Actually its a code from Google code ..
webpage
Checked it out ...
Tired making few changes did not work and now landed up on ... Null pointer exception


So did you follow this?
Jesper de Jong wrote:NullPointerExceptions are usually easy to track down. Look at the error message. It shows you a stack trace - the sequence of methods that was called up to the point where the exception happened. It tells you exactly where the NullPointerException occurred: in line 535 of RequestProcessor.java.

So, open up RequestProcessor.java and go to line 535. A NullPointerException happens when you try to call a method on a variable that's null. Check what method is being called on line 535. Why is the variable that you call the method on, null?
 
Indira purohit
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Maneesh Godbole : Sorry , i actually posted in again ... Wondering something else.. could have gone wrong
Yup looked on the suggestions .. Still isnt working
 
Maneesh Godbole
Saloon Keeper
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. If you are still getting a NPE, its not working
Did you run your application in the debugger to see which variable is null as Jesper suggested?
 
Indira purohit
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maneesh Godbole wrote:Yes. If you are still getting a NPE, its not working
Did you run your application in the debugger to see which variable is null as Jesper suggested?

Yup , did that ... no error found in debugging ... Will try it again with patience Hope it works
 
Campbell Ritchie
Sheriff
Posts: 48904
58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it your own Google Code project?
If there was a null exception, there must have been an error. You simply didn’t find it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic