bval-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roman Stumm (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (BVAL-97) More than one META-INF/validation.xml in tomcat webapp
Date Thu, 25 Aug 2011 15:51:29 GMT

     [ https://issues.apache.org/jira/browse/BVAL-97?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Roman Stumm reassigned BVAL-97:
-------------------------------

    Assignee: Roman Stumm

> More than one META-INF/validation.xml in tomcat webapp
> ------------------------------------------------------
>
>                 Key: BVAL-97
>                 URL: https://issues.apache.org/jira/browse/BVAL-97
>             Project: BeanValidation
>          Issue Type: Bug
>    Affects Versions: 0.3-incubating
>         Environment: Tomcat 7.0.16 + OpenEJB 4.0.0-SNAPSHOT
>            Reporter: Romain Manni-Bucau
>            Assignee: Roman Stumm
>
> To be spec compliant bval check there is only one validation.xml in the classloader.
> However in tomcat WEB-INF/classes/META-INF/validation.xml is returned twice so it fails
because of the following code in ValidationParser:
> {code}
>            if ( path.equals("META-INF/validation.xml") ) {
>                 Enumeration<URL> urls = loader.getResources(path);
>                 if ( urls.hasMoreElements() && (urls.nextElement() != null) &&
urls.hasMoreElements() ) {
>                     throw new ValidationException("More than one " + path + " is found
in the classpath");
>                 }
>             }
> {code}
> To fix it urls should be check to see if they are all equals or loader.findResources(path)
could be used instead of loader.getResources(path).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message