An easy way to create tickets at jira is to send a simple email . You can also use the Rest API (thanks to aphex).
In Spring Web MVC, you can use ExceptionHandler to "do something" when an exception occurs. You can also use HandlerExceptionResolver to globally handle all exceptions in the same way.
Maybe this article can help you handle exceptions.
However, as Andreas pointed out in the comments, you must make sure that you do not report the same error multiple times. This can easily lead to jira tickets.
micha source share