java - Oval with expression language -


i using oval http://oval.sourceforge.net/ java bean validations , i'm getting exception when using expression language features.

my code looks this:

@notnull(errorcode = "paymentcard.number.invalid", message = "required", when = "_this.cardtype != null") private string cardnumber; 

and outcome

warning: cannot determine constraint when formula based on annotation $proxy10 java.lang.arrayindexoutofboundsexception: 1     @ net.sf.oval.abstractcheck.setwhen(abstractcheck.java:276)     @ net.sf.oval.configuration.annotation.abstractannotationcheck.configure(abstractannotationcheck.java:183)     @ net.sf.oval.configuration.annotation.annotationsconfigurer.initializecheck(annotationsconfigurer.java:323)     @ net.sf.oval.configuration.annotation.annotationsconfigurer.configurefieldchecks(annotationsconfigurer.java:143)     @ net.sf.oval.configuration.annotation.annotationsconfigurer.getclassconfiguration(annotationsconfigurer.java:294) @ org.eclipse.jdt.internal.junit.runner.remotetestrunner.main(remotetestrunner.java:197) 31-jul-2013 18:04:51 net.sf.oval.internal.log info info: available scriptengine language names: [[js, rhino, javascript, javascript, ecmascript, ecmascript]] 

i don't know why happening, can me?

thanks in advance

you have write firstly prefix indicate oval implementation use, it's necessary register expression language implementation want use in project. without step oval won't able figure out implementation using resolve el expressions.

private static final validator validator = new validator(); static {     validator.getexpressionlanguageregistry().registerexpressionlanguage("js",             new expressionlanguagejavascriptimpl()); } 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -