jaxrs: return proper JSON for exceptions

This fixes #45.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>