Mojarra nightly contains the class BeanValidator having an inner class
JsfAwareMessageInterpolator which doesn't correctly implement the methods
"interpolate" inherited from javax.validation.MessageInterpolator.
The interface MessageInterpolator being contained in *trunk of Bean
Validation* (w/o comments):
package javax.validation;
import java.util.Locale;
public interface MessageInterpolator {
String interpolate(String messageTemplate, Context context);
String interpolate(String messageTemplate, Context context, Locale
locale);
static interface Context {
ConstraintDescriptor<?> getConstraintDescriptor();
Object getValidatedValue();
}
}
The class BeanValidator being contained in Mojarra nightly source (also w/o
comments) doesn't implement the 2 inherited methods "interpolate". They are
using both ConstraintDescriptor and Object instead of type Context:
package javax.faces.validator;
public class BeanValidator implements Validator, PartialStateHolder {
...
static class JsfAwareMessageInterpolator implements MessageInterpolator
{
...
public String interpolate(String message, ConstraintDescriptor
descriptor, Object value) {
...
}
public String interpolate(String message, ConstraintDescriptor
descriptor, Object value, Locale locale) {
...
}
}
}
-----Original Message-----
From: Ryan.Lubke_at_Sun.COM [mailto:Ryan.Lubke_at_Sun.COM]
Sent: Monday, April 27, 2009 6:05 PM
To: dev_at_javaserverfaces.dev.java.net
Subject: Re: Mojarra 2.0 nightly vs. Bean Validation
On 4/27/09 1:38 AM, Juergen.Zimmermann_at_HS-Karlsruhe.de wrote:
> I tried to use Mojarra 2.0 as of April/26 together with the latest
reference
> implementation of Bean Validation.
>
What is the latest version of the Bean Validation implementation you're
using?
I'm guessing it's alpha4?
If so, you'll need to build their trunk or obtain their nightly
builds (last I checked, they weren't publishing nightlies).
> However, I get this stacktrace:
>
> java.lang.AbstractMethodError:
>
javax.faces.validator.BeanValidator$JsfAwareMessageInterpolator.interpolate(
>
Ljava/lang/String;Ljavax/validation/MessageInterpolator$Context;)Ljava/lang/
> String;
> at
>
org.hibernate.validation.engine.ExecutionContext.createConstraintViolation(E
> xecutionContext.java:279)
> at
>
org.hibernate.validation.engine.ExecutionContext.createConstraintViolations(
> ExecutionContext.java:269)
> at
>
org.hibernate.validation.engine.ConstraintTree.validateConstraints(Constrain
> tTree.java:120)
> at
>
org.hibernate.validation.engine.MetaConstraint.validateConstraint(MetaConstr
> aint.java:136)
> at
>
org.hibernate.validation.engine.ValidatorImpl.validateValueForGroup(Validato
> rImpl.java:494)
> at
>
org.hibernate.validation.engine.ValidatorImpl.validateValue(ValidatorImpl.ja
> va:443)
> at
>
org.hibernate.validation.engine.ValidatorImpl.validateValue(ValidatorImpl.ja
> va:147)
> at
> javax.faces.validator.BeanValidator.validate(BeanValidator.java:306)
> at javax.faces.component.UIInput.validateValue(UIInput.java:1222)
> ...
>
> IMHO, BeanValidator.JsfAwareMessageInterpolator doesn't correctly
implement
> the interface javax.validation.MessageInterpolator. See
>
https://anonsvn.jboss.org/repos/hibernate/beanvalidation/trunk/validation-ap
> i/src/main/java/javax/validation/MessageInterpolator.java
>
> Is there a coarse estimation, when Mojarra 2.0 will be integrated with
Bean
> Validation?
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net