|
Thanks Huseyn Guliyev for the bug report. Much appreciated. FYI, Hibernate Validator is not officially supported on App Engine. Obviously we are happy it does (or did) and we made already in the past minor modifications to fix issues, but we don't test against App Engine and we cannot guarantee that it will in the future.
That said, the problems seems to be the use of java.util.ResourceBundle.Control which is a legit way of customizing the resource bundle loading process. For example the java docs says:
Applications can specify ResourceBundle.Control instances returned by the getControl factory methods or created from a subclass of ResourceBundle.Control to customize the bundle loading process. The following are examples of changing the default bundle loading process.
Why {{ java.util.ResourceBundle.Control}} is a restricted class on Google App Engine I am not clear about. I was not yet able to find an explanation. Other frameworks seem to run into this as well - eg http://stackoverflow.com/questions/32565284/spring-4-2-1-on-gae-and-java-util-resourcebundlecontrol-is-a-restricted-class
From our perspective, the use of {{ java.util.ResourceBundle.Control}} is needed to allow the aggregation of resource bundle as part of the ConstraintDefinitionContributor feature.
To work around the issue you can always try to bootstrap your ValidatorFactory using a custom ResourceBundleLocator. See also http://docs.jboss.org/hibernate/validator/5.2/reference/en-US/html_single/#section-resource-bundle-locator. For example you could use the bundle locator from a previous version of Validator. Depending on how you use Validator and whether it gets bootstrapped for your by another framework, you could set a custom/different MessageInterpolator altogether (this can be done via validation.xml).
Long term we can investigate whether the current use of ResourceBundle.Contro could be replaced by something else providing the same functionality. If not we could consider whether we want to provide a App Engine enabled bundle locator and/or message interpolator for use in App Engine.
|