Sending Geometry through a message

The important part of all of that:

“Caused by: java.lang.IllegalArgumentException: Class has not been registered:class com.jme3.scene.Geometry”



Geometry is not registered to be serialized through SpiderMonkey’s Serializer. And really, this is not a good way to send that data anyway.



You could try registering it but you will end up having to also register half a dozen other classes that may or may not be even possible (vertex buffer, material, shader, etc.) It gets pretty nightmarish pretty quickly.



…and you are likely to overflow the 32k message limit anyway.



Better to send the raw data. If you have access to the mesh data then send that. Otherwise, send the j3o compressed in a byte[] field or make a j3o from it and compress it.

2 Likes