I am working on JBOSS clustering. My JBOSS is configured fine, but client side it's generating following error.
error is javax.naming.CommunicationException: Failed to retrieve stub from server 18.104.22.168:1100 [Root exception is java.io.StreamCorruptedExcepti
on: unexpected block data]
My client side code is:
Properties properties = new Properties();
Object ref; // Get a reference to a PropsHome Bean
jndiContext = new InitialContext( properties );
PropsHome home = null;
ref = jndiContext.lookup("Props");
home = (PropsHome) PortableRemoteObject.narrow (ref, PropsHome.class);
catch( Exception errE )
System.out.println(" error is " + errE );
It's look like error is in searlization, I don't have any idea because EJB is supposed to do that thing by itself.
I greatly appreciate your help.
Make sure your client libs (jbossall-client.jar) are from the same version as the jboss version running on the server.