This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 9317
    
109

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hello World Program Not Running - Null Pointer Exception.
 
Similar Threads
The Session bean cannot be deployed
Can't get Glassfish hello world to work: ClassNotFoundException
ejb3 hello world on was7
new to J2ee – NullPointerException in remote client
Simple EJB3 session beans not deploying in JBOSS6