[
http://opensource.atlassian.com/projects/hibernate/browse/HV-448?page=com...
]
David J. M. Karlsen commented on HV-448:
----------------------------------------
Full testcase at
https://github.com/davidkarlsen/hibernate-validator/tree/HV-448
java.lang.Exception: Unexpected exception,
expected<javax.validation.ConstraintViolationException> but
was<javax.validation.ConstraintDeclarationException>
at
org.junit.internal.runners.statements.ExpectException.evaluate(ExpectException.java:28)
at
org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
at
org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
at
org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at
org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at
org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: javax.validation.ConstraintDeclarationException: Only the root method of an
overridden method in an inheritance hierarchy may be annotated with parameter constraints.
The following method itself has no parameter constraints but it is not defined on a
sub-type of class org.hibernate.hv448.dummyservice.DummyServiceImpl: MethodMetaData
[method=public abstract void
org.hibernate.hv448.dummyservice.DummyService.doFailWithEmptyArg(java.lang.String),
parameterMetaData=[ParameterMetaData [type=class java.lang.String], [index=0], name=arg0],
constraints=[], isCascading=false]], constraints=[], isCascading=false,
hasParameterConstraints=false]
at
org.hibernate.validator.metadata.AggregatedMethodMetaData$Builder.checkParameterConstraints(AggregatedMethodMetaData.java:230)
at
org.hibernate.validator.metadata.AggregatedMethodMetaData$Builder.build(AggregatedMethodMetaData.java:155)
at
org.hibernate.validator.metadata.BeanMetaDataImpl.buildMethodMetaData(BeanMetaDataImpl.java:266)
at
org.hibernate.validator.metadata.BeanMetaDataImpl.<init>(BeanMetaDataImpl.java:249)
at
org.hibernate.validator.metadata.BeanMetaDataImpl.<init>(BeanMetaDataImpl.java:146)
at org.hibernate.validator.engine.ValidatorImpl.getBeanMetaData(ValidatorImpl.java:1268)
at
org.hibernate.validator.engine.ValidatorImpl.validateParametersInContext(ValidatorImpl.java:903)
at
org.hibernate.validator.engine.ValidatorImpl.validateAllParameters(ValidatorImpl.java:227)
at org.hibernate.hv448.ValidationAspect.validate(ValidationAspect.java:101)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
at
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:603)
at
org.springframework.aop.aspectj.AspectJMethodBeforeAdvice.before(AspectJMethodBeforeAdvice.java:39)
at
org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:49)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy18.doFailWithEmptyArg(Unknown Source)
at
org.hibernate.hv448.ValidationAspectTest.doFailWithEmptyArg(ValidationAspectTest.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at
org.junit.internal.runners.statements.ExpectException.evaluate(ExpectException.java:21)
... 20 more
Regression in beta2
-------------------
Key: HV-448
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HV-448
Project: Hibernate Validator
Issue Type: Bug
Affects Versions: 4.2.0.Beta2
Reporter: David J. M. Karlsen
Attachments: DummyBean.java, DummyService.java, DummyServiceImpl.java,
ValidateMethod.java, ValidationAspect.java, ValidationAspectTest-context.xml,
ValidationAspectTest.java
The attached test and aspect used to pass just fine - but now fails with beta2.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira