Added some more extensive debugging and moved a receive buffer from the stack to a longer-lived object; note that you must not use assignment to a Bottle from getNullBottle() to empty a Bottle - use the 'clear' method.