I have been trying to get a basic RMI client to work. It has been throwing a stack overflow error (which causes client connects to time out) and I am not sure why. I am literally using the example code for RMI server (https://github.com/EsotericSoftware/kryonet/tree/master/examples/com/esotericsoftware/kryonet/examples/chatrmi)
On starting the server, it throws this:
Exception in thread “Server” java.lang.StackOverflowError
at sun.reflect.UnsafeObjectFieldAccessorImpl.get(Unknown Source)
at java.lang.reflect.Field.get(Unknown Source)
at com.esotericsoftware.kryo.serializers.FieldSerializer$ObjectField.write(FieldSerializer.java:552)
at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:213)
at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:504)
at com.esotericsoftware.kryo.serializers.FieldSerializer$ObjectField.write(FieldSerializer.java:564)
at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:213)
at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:504)
And on and on (this series is repeated around 50 times, cut out the rest which is identical).
Basically, I have read the documentation and tried to use the examples and I don’t get what I am doing wrong. I know its a lot of source to look at, but if anyone can help me I would really appreciate it.
Thanks!