• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Hello World Program Not Running - Null Pointer Exception.

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
The following hello world program is not running and it is giving Null Pointer exception. I understand that EJB is not initialized but did not get, why it is not initialized.
I am using Netbean's and Glassfish server.Please help me.

interface


Bean Class


Client -test



Output


.............
before pringing my name.......
in test funnnnnnnnnnnnn
Exception in thread "main" java.lang.NullPointerException
at Myprint.testfun(Myprint.java:36)
at Myprint.main(Myprint.java:29)

 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See this previous discussion
 
Sarat Koduri
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey, Thanks a lot. Actually I read about this ACC and to avoide that problem I created Servlet and but by mistakenly from servlet i am calling again this stand alone java program. Now after seeing your replying I recalled the mistake i did and now I could see output . Thank you very much.
reply
    Bookmark Topic Watch Topic
  • New Topic