[
https://issues.apache.org/jira/browse/BVAL-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13399672#comment-13399672
]
Matt Benson commented on BVAL-107:
----------------------------------
Actually I don't think this example contains everything I need to run the test
successfully. What I'm getting is:
{quote}
javax.naming.NamingException: Unable to find injection meta-data for
de.ergodirekt.test.constraintTest.ConstraintValidationTest. Ensure that class
was annotated with @org.apache.openejb.api.LocalClient and was successfully
discovered and deployed. See
http://openejb.apache.org/3.0/local-client-injection.html
at
org.apache.openejb.client.LocalInitialContext.inject(LocalInitialContext.java:198)
at
org.apache.openejb.client.LocalInitialContext.bind(LocalInitialContext.java:172)
at javax.naming.InitialContext.bind(InitialContext.java:400)
at
de.ergodirekt.test.constraintTest.AbstractOpenEjbTest.setUpOpenEjb(AbstractOpenEjbTest.java:146)
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.RunBefores.evaluate(RunBefores.java:27)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at
org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
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.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
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)
{quote}
> Validation of Return-Values
> ---------------------------
>
> Key: BVAL-107
> URL: https://issues.apache.org/jira/browse/BVAL-107
> Project: BVal
> Issue Type: Bug
> Components: jsr303
> Affects Versions: 0.4
> Environment: JDK 1.6, Windows, Eclipse 3.7
> Reporter: Sascha Vujevic
> Attachments: ValidationTest.jar
>
>
> In the Test i have attached i have a @Size-Constraint on a method for
> validation of the returnvalue. In version 0.3 of bval-jsr303 it worked.
> In version 0.4 there is a change in the code:
> The method
> org.apache.bval.jsr303.extensions.patchFactoryContextForMethodValidation is
> no longer activ. Therefore all Jsr303MetaBeanFactory were no longer changed
> to MethodValidatorMetaBeanFactory.
> This has the affect that the method hasValidationConstraintsDefined() is used
> from Jsr303MetaBeanFactory which checks if there is a Constraint on the
> Method. If it is, a exception is thrown "Property %myMethod% does not follow
> javabean conventions".
> Mayby i use the annotions for validating returnvalues in a wrong way.
> I have attached an example.
> Thank you for your help.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira