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 and other Java EE Technologies and the fly likes Hello world example using EJB 3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Hello world example using EJB 3" Watch "Hello world example using EJB 3" New topic
Author

Hello world example using EJB 3

rajiv raghunandan
Greenhorn

Joined: Aug 23, 2008
Posts: 2
I just started reading EJB 3 and tried executing a simple Hello world example but ran into some problems. I am using Eclipse along with Weblogic server 10.
I created an EJB project and within it I created a stateless session bean with a remote interface.
The code for the interface is

The code for the bean is

The client code is as follows


I get the following exception


The session bean is getting deployed on the server without any issues and I am able to see it in the deployment list. I am unsure if there is a need for me to use the properties within the client and if thats a reason for the exception. Can anyone help me out in telling me what I am doing wrong . Also can anyone tell me if the format I am using in the lookup is correct.
rajiv raghunandan
Greenhorn

Joined: Aug 23, 2008
Posts: 2
also i forgot to mention that i included weblogic.jar in the build path and i am deploying the session bean directly onto the weblogic server through eclipse
S Sravs
Ranch Hand

Joined: Feb 25, 2008
Posts: 85
rajiv raghunandan wrote:also i forgot to mention that i included weblogic.jar in the build path and i am deploying the session bean directly onto the weblogic server through eclipse


Hi did you find the solution please let me know,i am getting the same problem with same constraints
Thanks
Sravs
Michael Drona
Greenhorn

Joined: Aug 08, 2009
Posts: 5
Here's an example I have that works

Hello.java


HelloBean.java



HelloClient.java


compress the whole org thing into a jar
jar cvf hello.jar org

deploy the jar on the wl server and then run the client.
S Sravs
Ranch Hand

Joined: Feb 25, 2008
Posts: 85
Hey
I am working on Eclipse and Weblogic. In eclipse i didn't remove the Weblogic libraries while debugging so i got that exception
Thanks
Sravanthi
 
 
subject: Hello world example using EJB 3