<div dir="ltr">Thanks Hardy,<div><br></div><div>When I get through my hurdles (I just sent another one) I will make an example for bug-checking.</div><div><br></div><div>Actually, after I did 2 or 3, the constraint errors went away so it wasn't so bad. But it still may be an issue.</div>
<div><br></div><div>Thanks for getting back to me.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 26, 2014 at 3:04 PM, Hardy Ferentschik <span dir="ltr"><<a href="mailto:hardy@hibernate.org" target="_blank">hardy@hibernate.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Mike,<br>
<br>
a couple of more remarks on top of Emmanuel’s.<br>
<br>
First of all, as Emmanuel is saying method and constructor validation should behave the same<br>
on Glassfish and Wildfly. The Bean Validation specification (part of EE 7) says that method and<br>
constructor validation occurs per default as soon as Bean Validation constraint annotations are<br>
used on methods or constructors. You find the relevant specification section here -<br>
<a href="http://beanvalidation.org/1.1/spec/#integration-general-executable" target="_blank">http://beanvalidation.org/1.1/spec/#integration-general-executable</a><br>
<br>
To answer your question on how to disable validation. You can add a validation.xml file disabling<br>
executable validation:<br>
<br>
<?xml version="1.0" encoding="UTF-8"?><br>
<validation-config xmlns="<a href="http://jboss.org/xml/ns/javax/validation/configuration" target="_blank">http://jboss.org/xml/ns/javax/validation/configuration</a>"<br>
xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>"<br>
xsi:schemaLocation="<a href="http://jboss.org/xml/ns/javax/validation/configuration" target="_blank">http://jboss.org/xml/ns/javax/validation/configuration</a> validation-configuration-1.1.xsd"<br>
version="1.1"><br>
<br>
<executable-validation enabled="false"/><br>
<br>
</validation-config><br>
<br>
Last but not least, open an issue with test case, so that we can check whether there is a bug or not.<br>
<span class="HOEnZb"><font color="#888888"><br>
—Hardy<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
On 26 Jan 2014, at 16:40, Emmanuel Bernard <<a href="mailto:emmanuel@hibernate.org">emmanuel@hibernate.org</a>> wrote:<br>
<br>
> Does your offending method actually override another method?<br>
> Because that would definitely be an error on your part.<br>
> Glassfish uses Hibernate Validator for the validation engine so I don't<br>
> think your code is at fault here. Unless they have a broken integration<br>
> and nothing is validated.<br>
><br>
> But it could be due to a bug on how Weld does subclassing for proxies and<br>
> copy constraint annotations but I thought we had that base covered<br>
> already.<br>
><br>
> The best would be to open an issue with a reproducible minimal test<br>
> case. From there we could either fix the offending bug and if there is<br>
> none see how we could report several errors in one go.<br>
><br>
> Emmanuel<br>
><br>
> On Wed 2014-03-26 10:16, Mike Hostetler wrote:<br>
>> I'm probably one of the many that is moving away from Glassfish to WildFly.<br>
>> I have done some trivial changes but now Weld is giving validation failures<br>
>> like the following on some of our EJB3 beans:<br>
>><br>
>> javax.validation.ConstraintDeclarationException: HV000151: A method<br>
>> overriding another method must not alter the parameter constraint<br>
>> configuration<br>
>><br>
>> The worse thing is that only see one at a time: so I fix one, do the<br>
>> build-redeploy dance, and then see the next one. Most of the problems is<br>
>> that in the overriding class we use javax.validation.constraints.NotNull<br>
>> annotation on the parameter, which is what Weld doesn't seem to like.<br>
>> Obviously these worked in Glassfish.<br>
>><br>
>> My first thought is: how can I shut off Weld validation? If that is not<br>
>> possible (which I'm willing to accept), then how can I see these validation<br>
>> errors all at once instead of one at a time during deployment?<br>
>><br>
>> Thanks<br>
>> --<br>
>> Mike Hostetler<br>
>> <a href="http://mike.hostetlerhome.com/" target="_blank">http://mike.hostetlerhome.com/</a><br>
><br>
>> _______________________________________________<br>
>> wildfly-dev mailing list<br>
>> <a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
>> <a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a><br>
><br>
> _______________________________________________<br>
> wildfly-dev mailing list<br>
> <a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Mike Hostetler<br><a href="http://mike.hostetlerhome.com/">http://mike.hostetlerhome.com/</a><br><br>
</div>