There is a conflict with ValidationMessages.properties provided in castor-xml.
According to validation specification there should be only one ValidationMessage.properties available in the classpath. However since castor-xml already includes one, after we included jasperreports in our application broke validation broke. Actually the worst part is that it works randomly on different system (due to non deterministic jar loading order).
Possible solution:
since it is a library castor should include it's own prefixed version of ValiadtionMessage.properties.
ResourceBundleLocator resourceBundleLocator = new PlatformResourceBundleLocator("CastorValidationMessages");
config.messageInterpolator(new ResourceBundleMessageInterpolator(resourceBundleLocator));
There is a conflict with ValidationMessages.properties provided in castor-xml. According to validation specification there should be only one ValidationMessage.properties available in the classpath. However since castor-xml already includes one, after we included jasperreports in our application broke validation broke. Actually the worst part is that it works randomly on different system (due to non deterministic jar loading order).
Relevant issues: https://hibernate.atlassian.net/browse/BVAL-252 https://hibernate.atlassian.net/browse/BVAL-251 http://stackoverflow.com/questions/11599208/conflict-between-validationmessages-properties-files
Possible solution: since it is a library castor should include it's own prefixed version of ValiadtionMessage.properties. ResourceBundleLocator resourceBundleLocator = new PlatformResourceBundleLocator("CastorValidationMessages"); config.messageInterpolator(new ResourceBundleMessageInterpolator(resourceBundleLocator));