Based on your updated question, I think there error is here:
choice = Integer.parseInt(new String(input));
I'm not sure as I don't know exactly what line number 45 is.
You're trying to parse a new line character as an integer. This is throwing an exception, causing the server to exit its while loop, and the program to close.
So, wrap your parsing routines in try/catch blocks and handle them. The error should go away then.