[SOLVED]com.jme3.network.connection.TCPConnection cannot be cast to com.jme3.network.connection.Clie

Hello,

I have some new problems. I try to send some message:

this.game.getNetworkManager().getClient().send(me);



And get the message: com.jme3.network.connection.TCPConnection cannot be cast to com.jme3.network.connection.Client



me is the Message (public class ChatMessage extends Message)

Before that I sent some other Messages to the server (some login information), there wasn’t a problem :confused:





Okay I get some other Messages in the File TCPConnection.java



The class network.messages.ChatMessage is not registered in the serializer!



How do I have to register it? I had something like that:

com.jme3.network.serializing.Serializer.registerClass(network.messages.ChatMessage.class);





Ahhh okay, I found it:

I forgot the

@Serializable()

before my ChatMessage class.