Throw specific Java exceptions

This change causes SWIG to throw the exceptions expected by the Hot Rod
client test case code, instead of always throwing RuntimeException.