Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValidationMessages.properties problem with castor #68

Open
matejsp opened this issue Mar 28, 2017 · 1 comment
Open

ValidationMessages.properties problem with castor #68

matejsp opened this issue Mar 28, 2017 · 1 comment
Labels

Comments

@matejsp
Copy link

matejsp commented Mar 28, 2017

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));

@wguttmn wguttmn added the bug label Mar 28, 2017
@wguttmn
Copy link
Contributor

wguttmn commented Mar 28, 2017

Sounds reasonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants