• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

nullpointerexception in a bean

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I' am retrieving data in HashMaps for multiple columns to be displayed in a jsp from two database tables. As I' am calling the data from two tables, the columns set as the key in each hashmap is not present in both tables. Thereby passing the values in a bean to be displayed on a jsp returns a null pointer exception as the keys for all the values are not the same. In such cases, the data on the jsp the data may be be set as a blank column. but first i need a way to handle the nullpointerexception.
Please help me.

Thanks in advance,
regards,
Komal
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
try to debug and find the line which cause NullPointerException. also post your code *part*.

by the way: I feel your explanation(question) is not clear
 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well simply check if the target object is null.
reply
    Bookmark Topic Watch Topic
  • New Topic