File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Hello World Program Not Running - Null Pointer Exception. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Hello World Program Not Running - Null Pointer Exception." Watch "Hello World Program Not Running - Null Pointer Exception." New topic
Author

Hello World Program Not Running - Null Pointer Exception.

Sarat Koduri
Ranch Hand

Joined: Jul 08, 2008
Posts: 83
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

Joined: Jul 20, 2005
Posts: 10146
    
165

See this previous discussion


[My Blog] [JavaRanch Journal]
Sarat Koduri
Ranch Hand

Joined: Jul 08, 2008
Posts: 83
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.
 
GeeCON Prague 2014
 
subject: Hello World Program Not Running - Null Pointer Exception.