- Published:March 10th, 2008
- Comments:No Comment
- Category:Pages
As I’ve now decided to go ahead and use Serialization in my application and differentiating the data by giving leading bits indicating what type of data is about to come in I am now using ObjectOutputStream and ObjectInputStream. This application needs to be working by Wednesday so obviously I’m in a bit of rush to get this to work and today got completely stuck when the application decided to pause. Of course it’s threaded so the whole thing didn’t just die, but when a window was supposed to pop up, nothing happened. I traced through the code, shoved test cases here and there and still couldn’t figure it out.
The moment that ObjectOutputStream and ObjectInputStream were being created, it got stuck, for no reason. Type Exception wasn’t caught, and nothing else was thrown. I sat and waited thinking that something is just going slow but d’ya know what? Nothing happened.
Eventually I hopped on IRC (a great resource for situations like this) and found that ObjectOutputStream needs to be constructed first as it sends setup data. So, if you’re using Serialization over Sockets and your application decides to stop processing when constructing these types, remember to instantiate ObjectOutputStream before ObjectInputStream.
*grumbles*


No Comments
No comments yet.