com.captiveimagination.jgn.DefaultUncaughtExceptionHandler uncaughtException

again a problem :slight_smile:

i get the following errormessage out of the blue sky:

12.11.2008 01:13:21 com.captiveimagination.jgn.DefaultUncaughtExceptionHandler uncaughtException
SCHWERWIEGEND: Uncaught exception: Terminating Thread.
   at com.captiveimagination.jgn.synchronization.SynchronizationManager.serverNextId(
   at com.captiveimagination.jgn.synchronization.SynchronizationManager.messageReceived(
   at com.captiveimagination.jgn.MessageServer.sendToListener(
   at com.captiveimagination.jgn.MessageServer.notifyIncoming(
   at com.captiveimagination.jgn.MessageServer.updateEvents(
   at com.captiveimagination.jgn.clientserver.JGNClient.updateEvents(
   at com.captiveimagination.jgn.clientserver.JGNClient.update(

I think the error comes from my SynchronizationManager for my vehilce...

how could i find out the reason for the error, because from the errormessage i can only guess where the null pointer could be.

when i switch client and server (execute the same code on a different computer in my network) i get:

[code]12.11.2008 01:35:10 com.captiveimagination.jgn.DefaultUncaughtExceptionHandler uncaughtException
SCHWERWIEGEND: Uncaught exception: Terminating Thread.
   at com.captiveimagination.jgn.convert.ArrayConverter.readObjectData(
   at com.captiveimagination.jgn.convert.Converter.readObject(
   at com.captiveimagination.jgn.convert.FieldConverter.readObjectData(
   at com.captiveimagination.jgn.convert.Converter.readClassAndObject(
   at com.captiveimagination.jgn.NIOMessageServer.readMessage(
   at com.captiveimagination.jgn.NIOMessageServer.updateTraffic(
   at com.captiveimagination.jgn.clientserver.JGNServer.updateTraffic(
   at com.captiveimagination.jgn.clientserver.JGNServer.update(
   at Source)[/code]


It looks like you're sending some object that JGN is not able to properly serialize / deserialize and causes it to fail.  What does your Message object look like?

Just an observation from looking at the stack, wouldnt you be better pushing read bytes to a queue that is processed by other threads, that way you maximise the network socket reading ??

I do both…I separate the functionality out because there's a lot of logic about how messages get where they belong, so in the end I fill up a ByteBuffer with as many messages as it will hold and continue to push that to the NIO connection until it's empty.