I am using JAXB XMLadapter to marshal and unmarshal Boolean values. The application\'s XML file will be accessed by C# application also. We have to validate this XML file an
From the JavaDoc of XMLAdapter#unmarshal(ValueType):
Throws:
java.lang.Exception
- if there's an error during the conversion. The caller is responsible for reporting the error to the user through ValidationEventHandler.
So, yes - the exception is eaten and then reported using ValidationEventHandler, not thrown to the top of your stack.
Check if you are already using any (custom, perhaps) ValidationEventHandler
that groups your exceptions, or use DefaultValidationEventHandler, like this:
unmarshaller.setEventHandler(new DefaultValidationEventHandler());
It will cause unmarshalling failure on first error.