aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes How to run client for EJB3, Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "How to run client for EJB3," Watch "How to run client for EJB3," New topic
Author

How to run client for EJB3,

Ram Venkat
Greenhorn

Joined: Nov 28, 2007
Posts: 29
Hi ,

I am very new to EJB3, configure following environment.
JAVA_HOME=java 5.0
J2EE_HOME=j2ee 1.5
Application server = glassfish,
BOOK = EJB3 IN ACTION


i successfully deplyed ear file (contails Interface ,bean class),
i written simple client with main method. looks like following

@EJB
RemoteInt remote = null;
p s v m(){
remote.display();
}

i am getting NullPointerException,


What are the class/jar files in need to place in CLASSPATH


Thanks


Ram Venkat<br />----------<br />SCJP 1.4<br />SCWCD 1.4<br />SCBCD 5 (In Process..)
Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3710
    
    5

NullPointer exceptions are insanely common, you might want to be a tad more specific. Also consult glassfish tutorials for getting started with glassfish.


My Blog: Down Home Country Coding with Scott Selikoff
Bill Shirley
Ranch Hand

Joined: Nov 08, 2007
Posts: 457
particularly, give the exact copy/pasted code (or a snippet), and the exact output, and

use the CODE tags


Bill Shirley - bshirley - frazerbilt.com
if (Posts < 30) you.read( JavaRanchFAQ);
Ram Venkat
Greenhorn

Joined: Nov 28, 2007
Posts: 29
Finally i found solution for this problem



@EJB
RemoteInt remote = null; It's creating problem because it's assigned to null;
p s v m(){
remote.display();
}

i changed to above code to
@EJB
[B]RemoteInt remote;

It's working now.

but can any one give explanation on this.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to run client for EJB3,