Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB Standalone Client Remote Lookup Problem  RSS feed

Ned Rowly
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After spending countless hours searching for a solution I've given up and decided I'll need some help.

I deployed my EJB .jar file in the /farm folder (for clustering) and the clustering works fine for the multiple nodes.

However I run into some problems when testing a node using a standalone test client.

The EJB is located in a remote server (server A) and the client jar file is located in another machine. I execute the client jar file via the command line using java -jar client.jar. However it throws me the following exception.

Exception in thread "main" java.lang.ClassCastException: javax.naming.Reference cannot be cast to <Remote Bean Client>

I've added jbossall-client.jar to my classpath (I've added this in the MANIFEST.MF file of the client.jar file). I haven't been using a legacy version of JBoss, consistently using JBoss 6.

My guess is I haven't packaged my client jar correctly. Currently I have the following in there:
> package1: client + beanRemoteInterface

The contents of the Client is as follows:

My EJB jar looks like this: (one package)
> Bean
> EntityBean
> BeanLocal
> BeanRemote

Am I suppose to include the remote bean interface with the client jar? I did some research and some people claim it's a class loader issue loading two instances of the same BeanRemote interface. Anyone got any suggestions? I'm really looking to just get a very simple standalone client to test clustering functions.

Thanks in advance!
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!