Second Client Fails to Connect

Use Case
Server Broadcasts unfiltered a Message of GameData
first Client gets the message correctly
When I launch a second instance of the Client I get the following error

SEVERE: Termining connection due to unhandled error
java.lang.RuntimeException: Error deserializing object
at com.jme3.network.base.MessageProtocol.createMessage(MessageProtocol.java:184)
at com.jme3.network.base.MessageProtocol.addBuffer(MessageProtocol.java:160)
at com.jme3.network.base.ConnectorAdapter.run(ConnectorAdapter.java:169)
Caused by: com.jme3.network.serializing.SerializerException: Class not found for buffer data.
at com.jme3.network.serializing.Serializer.readClassAndObject(Serializer.java:356)
at com.jme3.network.base.MessageProtocol.createMessage(MessageProtocol.java:180)
… 2 more

Note1 if I stop the first client and restart the second it works fine.
Note2 my serialized classes are registered in a Utiltiy Class static method so they Match on Server and Client

Any Ideas?
-Greg

Also Note that I am trying to run all 3 on the same machine.

Not sure. Somehow your second client is getting junk data.

Do the TestChatClient and TestChatServer work for you?

The TestChat* Worked.
I switched to message.reliable(false) like it shows in the TestChat Classes and it seems to be working.
I will have to figure out if why TCP is not working. I was using it for location data and the docs said not to. So maybe it was just to many messages on the same port.

Thanks for the help

@gbluntzer said: The TestChat* Worked. I switched to message.reliable(false) like it shows in the TestChat Classes and it seems to be working. I will have to figure out if why TCP is not working. I was using it for location data and the docs said not to. So maybe it was just to many messages on the same port.

Thanks for the help

The test chat uses both depending on which button you click. So you can test that in the chat too. Actually, it used to only send reliable so the option was added later to send UDP.

You might have a too many messages problem if you are something bad like sending 10,000 messages a second per client or something… in which case: don’t do that.