• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hello World Program Not Running - Null Pointer Exception.

 
Sarat Koduri
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • 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)
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See this previous discussion
 
Sarat Koduri
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic