Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

EJB3 client error

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)

Client



EJB Bean


Local Interface


Remote Interface


Thanks for any help and suggestions
~ Vikas
 
Ranch Hand
Posts: 457
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you accidentally double-post (as you did), you can edit one, and in the editing screen, delete.
 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Vikas Roonwal
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 :-(
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please, post your new client code
 
Is this the real life? Is this just fantasy? Is this a tiny ad?
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic