This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi, 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 java.lang.ClassCastException: org.jboss.serial.io.MarshalledObjectForLocalCalls at $Proxy0.login(Unknown Source) at ejb.client.EJBClient.main2(EJBClient.java:33) at ejb.client.EJBClient.main(EJBClient.java:14)
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.
Joined: Apr 11, 2008
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 :-(