java - Glassfish 4.1 / validation.xml not loaded -
java - Glassfish 4.1 / validation.xml not loaded -
i've ported application jee6 jee7 (glassfish 3.1.2.2 4.1),
i've upgraded meta-inf/validation.xml latest version (as stated here): http://antoniogoncalves.org/2013/06/04/java-ee-7-deployment-descriptors/):
<validation-config xmlns="http://jboss.org/xml/ns/javax/validation/configuration" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://jboss.org/xml/ns/javax/validation/configuration validation-configuration-1.1.xsd" version="1.1"> <message-interpolator>com.infomaxgroup.adaecommerce.validation.databasemessageinterpolator</message-interpolator> </validation-config>
the custom messageinterpolator never called, i've tried set name of non existent class:
<message-interpolator>foo.foo.foo.bar</message-interpolator>
and tried insert error (xxx after opening tag):
<message-interpolatorxxx>foo.foo.foo.bar</message-interpolator>
i've no exception log, seems validation.xml (that jee6 application processes good) not loaded @ ported jee7 application...
any thought on how solve issue ?
many in advance...
solved myself,
the problem validation.xml must placed meta-inf/validation.xml folder of "ejb module", jee6 application had file web-inf folder of "web module" (strangely jee6 application works good...), jee7 application correctly load validation.xml configuration , works using message interpolator, !
java xml glassfish
Comments
Post a Comment