Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes EJB and other Java EE Technologies and the fly likes EJB3 client error 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 "EJB3 client error" Watch "EJB3 client error" New topic

EJB3 client error

Vikas Roonwal

Joined: Apr 11, 2008
Posts: 4
I get the following error when I execute my EJB client.
Please note that the Client is being run as a standalone JAVA class in Eclipse and the EJB is deployed in JBoss 4.2 (hence they are in separate JVMs)

The Error
at $Proxy0.login(Unknown Source)
at ejb.client.EJBClient.main2(
at ejb.client.EJBClient.main(


EJB Bean

Local Interface

Remote Interface

Thanks for any help and suggestions
~ Vikas
Bill Shirley
Ranch Hand

Joined: Nov 08, 2007
Posts: 457
If you accidentally double-post (as you did), you can edit one, and in the editing screen, delete.

Bill Shirley - bshirley -
if (Posts < 30) JavaRanchFAQ);
Henrique Ordine
Ranch Hand

Joined: Sep 03, 2004
Posts: 127
Have you tried narrowing your EJB after the lookup?
Since they're one two different VMs, you're probably getting the remote version of it and I believe a call like PortableRemoteObject.narrow(yourObject, YourObject.class) will be needed.

J2EE Architect/Developer
Vikas Roonwal

Joined: Apr 11, 2008
Posts: 4
Hi Henrique,
Thanks for the suggestion. I tried narrowing down, but ended up with the same error.
I am using jboss-4.2.1.GA on windows XP. The client is running as a stand alone code in Eclipse 3.3.1 and has the remote interface in the classpath and also the Jboss jars.
The blunder I made was that the EJB was deployed on Jboss 4.2, but the server jars in eclipse were from Jboss 5.0

I appreciate the help and apologize for my naiveness :-(
Fabian Gutierrez

Joined: Aug 15, 2004
Posts: 22
please, post your new client code

SCJP 1.4, SCWCD 1.4, SCBCD 5, SCJD 5
I agree. Here's the link:
subject: EJB3 client error
It's not a secret anymore!