hey.
i m developing a multiplayer game using jgn. if i test my game with server and client running on one machine everthing works fine. But when i try to run server and client on separate machines i get the following exception:
com.captiveimagination.jgn.convert.ConversionException: Encountered unregistered class ID: -42
at com.captiveimagination.jgn.convert.Converter.readClass(Converter.java:172)
at com.captiveimagination.jgn.convert.CollectionConverter.readObjectData(CollectionConverter.java:53)
at com.captiveimagination.jgn.convert.Converter.readClassAndObject(Converter.java:185)
at com.captiveimagination.jgn.convert.FieldConverter.readObjectData(FieldConverter.java:108)
at com.captiveimagination.jgn.convert.Converter.readClassAndObject(Converter.java:185)
at com.captiveimagination.jgn.NIOMessageServer.readMessage(NIOMessageServer.java:190)
at com.captiveimagination.jgn.TCPMessageServer.read(TCPMessageServer.java:134)
at com.captiveimagination.jgn.NIOMessageServer.updateTraffic(NIOMessageServer.java:143)
at com.captiveimagination.jgn.clientserver.JGNClient.updateTraffic(JGNClient.java:246)
at com.captiveimagination.jgn.clientserver.JGNClient.update(JGNClient.java:235)
at com.captiveimagination.jgn.UpdatableRunnable.run(JGN.java:435)
at java.lang.Thread.run(Unknown Source)
It occurs when the client try to send any message to the server - but when the server send messages to the client there is no error :? :? :?
what could be the problem?
Sorry, just now noticed this thread.
It would appear that either your client or server is registering (JGN.register(…)) Messages that have not been registered on the other. This isn't a problem when you're running on the same VM because they share registrations since it's static, but when you're running on different VMs you'll encounter this issue so make sure to call JGN.register for all your messages on both clients and servers.