[hibernate-issues] [Hibernate-JIRA] Commented: (HV-456) The MethodValidator could not handle Proxied objects like in EJB environment

Kevin Pollet (JIRA) noreply at atlassian.com
Mon Mar 21 13:34:08 EDT 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HV-456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41807#action_41807 ] 

Kevin Pollet commented on HV-456:
---------------------------------

Hi,

First of all thanks for testing Beta2 :) 

What do you mean by "real" class ? If it's the implementation class it's because you have annotated the implementation method {{ResourceBundleFacadeBean#get()}} and not the contract method {{ResourceBundleFacadeBean#get()}}. As of 4.2.0.Beta1 some changes have been made on method validation as you can see here HV-421. I think this issue is a duplicate of HV-448.

Hope this help.

> The MethodValidator could not handle Proxied objects like in EJB environment
> ----------------------------------------------------------------------------
>
>                 Key: HV-456
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-456
>             Project: Hibernate Validator
>          Issue Type: Bug
>          Components: engine
>    Affects Versions: 4.2.0.Beta2
>         Environment: linux, java 1.6.0_24, hibernate-validator-4.2.0.Beta2, JBoss-5.1.0.GA
>            Reporter: Ingo Bruell
>
> Using the MethodValidator with proxied objects via an interceptor in an ejb environment throws the following exception:
> 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 de.enexoma.smartmeter.server.facade.config.ResourceBundleFacadeBean: MethodMetaData [method=public abstract java.util.Map de.enexoma.smartmeter.server.facade.ResourceBundleFacade.get(java.lang.String) throws de.enexoma.smartmeter.server.error.EnexomaException, parameterMetaData=[ParameterMetaData [type=class java.lang.String], [index=0], name=arg0], constraints=[], isCascading=false]], constraints=[], isCascading=false, hasParameterConstraints=false]
> The method in the "real" class has constraints defined:
> 	public Map<Locale,List<ResourceBundle>> get(@NotNull @Size(min=1)final String appName) 

-- 
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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list