Yes, it is possible to throw java exception using java mapping too. You can create custom exception and catch those exception and inside catch block use throw statement with error message. Please see this link for example
http://www.javamex.com/tutorials/exceptions/exceptions_throwing.shtml