0
我使用橢圓形http://oval.sourceforge.net/進行java bean驗證,並且在使用表達式語言功能時出現異常。使用表達式語言的橢圓形
我的代碼如下所示:
@NotNull(errorCode = "paymentCard.number.invalid", message = "Required", when = "_this.cardType != null")
private String cardNumber;
和結果是
WARNING: Cannot determine constraint when formula based on annotation $Proxy10
java.lang.ArrayIndexOutOfBoundsException: 1
at net.sf.oval.AbstractCheck.setWhen(AbstractCheck.java:276)
at net.sf.oval.configuration.annotation.AbstractAnnotationCheck.configure(AbstractAnnotationCheck.java:183)
at net.sf.oval.configuration.annotation.AnnotationsConfigurer.initializeCheck(AnnotationsConfigurer.java:323)
at net.sf.oval.configuration.annotation.AnnotationsConfigurer.configureFieldChecks(AnnotationsConfigurer.java:143)
at net.sf.oval.configuration.annotation.AnnotationsConfigurer.getClassConfiguration(AnnotationsConfigurer.java:294)
at 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]]
我不知道爲什麼發生這種情況,任何人可以幫助我嗎?
在此先感謝