-
In @AssertURL, there's a message key 'net.sf.oval.constraint.AssertURL.violated', but I can't find that in the Properties files.
2009-11-02 13:13:13 UTC in OVal
-
Hi
I'm seeing a strange error in the log which repeats over and over again
2009-11-02 09:35:07,579 FINE [net.sf.oval.configuration.annotation.AbstractAnnotationCheck] (WorkerThread#2[172.27.90.29:2775]) Cannot determine constraint when formula based on annotation $Proxy338
java.lang.NoSuchMethodException: $Proxy338.when()
at java.lang.Class.getDeclaredMethod(Class.java:1937)
at...
2009-11-02 09:53:01 UTC in OVal
-
Hmmm... looks like my problem.
However, I noticed that in my Exception Translator, sometimes I get a ValidationFailedException instead of a ConstraintsViolatedException.
When is which Exception thrown? (I'm asking because I'm creating my own error messages, and I can't do that with ValidationFailedException)
Best regards,
Eric.
2009-10-26 14:39:37 UTC in OVal
-
Hmm... there's still something that's not clear to me: I override checkConstraint(), but in some cases, I don't get this far, since validateMethodParameters() fails first.
I'm not quite sure why this happens. Shouldn't validateMethodParameters() call checkContraint() in the end?.
2009-10-26 12:36:40 UTC in OVal
-
Thanks!
Now all I need are the translations :-)
Perhaps I could help with the French and Italian ones, if there's nobody else you know.
2009-10-26 07:55:53 UTC in OVal
-
Yes, but our use case is a bit different.
We want to have a hierarchical view of the messages.
For instance: Object A contains object B which contains field C.
If field C is invalid, we return
"A is invalid"
"B is invalid"
"C must be between 1 and 17"
For this to work, we also need an I18N key for @AssertValid. While generating our stuff (you may...
2009-10-23 15:55:12 UTC in OVal
-
Ok, thanks for reassuring me! :-)
Best regards,
Eric.
2009-10-23 15:47:59 UTC in OVal
-
To answer my own question: I think I solved the problem.
I initialize my aspect with my own guard
`public aspect ParameterValidation extends GuardAspect {
public ParameterValidation()
{
super(new MethodParameterGuard());
}
}`
And in that class, I override
`protected void checkConstraint(final List<ConstraintViolation> violations, final Check check,
final...
2009-10-23 15:17:56 UTC in OVal
-
Hi
I think a message is missing in the Properties files: The @AssertValid annotation shows net.sf.oval.constraint.AssertValid.violated as message, but I can't find that key in the Properties.
Is this handled in a different way or am I just blind? ;-)
Best regards,
Eric.
2009-10-23 15:13:05 UTC in OVal
-
Hi
I'm trying to make the distinction between method parameters. Some should be validated as usual (according to the annotation), but for some, I would want the @AssertValid to work in a different way.
There's an interface we use with a validate() method which indicates that an object can validate itself, using OVal. However, these objects also have additional profiles that they only know...
2009-10-22 15:29:03 UTC in OVal