Why the hell am I getting StreamCorruptedException?

Hi folks.

I have a really irritating problem. I am using JBoss 2.2.2 as my ejb server, and have successfully deployed the worlds most simple Session bean. I wrote a quick client app in JBuilder to test my bean and see that all was well with the world, but have come accross this problem:

Everytime I run the client, and the jndi lookup of the bean's remote reference is looked up I get a:

javax.naming.CommunicationException [Root exception is java.io.StreamCorruptedException: Type code out of range, is 125]

Why is this? How do I get rid of it?

My code is as follows:

Properties env = new Properties();

env.put(javax.naming.InitialContext.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");

env.put(javax.naming.InitialContext.PROVIDER_URL, "localhost:1099");

env.put(javax.naming.Context.URL_PKG_PREFIXES, "org.jboss.naming");

try{

javax.naming.InitialContext ctx = new javax.naming.InitialContext(env);

jTextArea1.append("Got Context\n");

Object ref = ctx.lookup("testbean/insultHome");

jTextArea1.append("Got home reference\n");

insultHome home = (insultHome) javax.rmi.PortableRemoteObject.narrow(ref, insultHome.class);

jTextArea1.append("Got Home\n");

insult in = home.create();

jTextArea1.append("Created Home\n");

jTextArea1.append(in.getInsult());

}catch(Exception name){

jTextArea1.append(name.toString());

}

This code works fine on another machine with the same setup for JBoss, and the same ejb deployed. Is it my system setup? Could it be that I have another jndi service running somewhere? I simply have had enough of this error!!! Please help me!!!!!

In your hands,

Andy

[1784 byte] By [andymoose] at [2007-9-26 1:47:30]
# 1
Never mind.I solved it myself.No-one ever replies to my posts anyway. I must have posted up 3 or 4 "problems" in the past and they have always been ignored. I always stop to answer someones question if I think I can help....
andymoose at 2007-6-29 2:46:40 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
I had this problem as well....looks to be caused by using a client with jdk1.2.2 connecting to a server running jdk/Jre 1.3.1......updgrading the client JDK solves it.
GChapman at 2007-6-29 2:46:40 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
Hi Andy,I'm having the same problem!!! PLEASE, can you HELP ME and tell me how you resolved it? It's urgent!!!!TRANKS in advance,Christianochrisgonc@hotmail.com
bunitu at 2007-6-29 2:46:40 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4
Client uses the wrong jdk ... the app server runing the different jdk
kenken64 at 2007-6-29 2:46:40 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...