[jboss-jira] [JBoss JIRA] (WFLY-5318) Resource files under META-INF not found by ClassLoader.getResources

David Lloyd (JIRA) issues at jboss.org
Thu Sep 10 07:46:00 EDT 2015


     [ https://issues.jboss.org/browse/WFLY-5318?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Lloyd resolved WFLY-5318.
-------------------------------
    Resolution: Rejected


This is a usage problem.  If you want to include META-INF resources, you must declare that fact in a jboss-deployment-structure.xml descriptor for the consuming deployment JAR.

> Resource files under META-INF not found by ClassLoader.getResources
> -------------------------------------------------------------------
>
>                 Key: WFLY-5318
>                 URL: https://issues.jboss.org/browse/WFLY-5318
>             Project: WildFly
>          Issue Type: Bug
>          Components: Class Loading
>    Affects Versions: 9.0.1.Final
>            Reporter: Arto Huusko
>            Assignee: David Lloyd
>
> ClassLoader.getResources("META-INF/example.properties") returns only such resources that are available in JAR files that are deployed as EJB modules in the EAR.
> That is, if a POJO JAR that has META-INF/example.properties is on the class path of an EJB session, and the session does (any of the following)
> - Thread.currentThread().getContextClassLoader().getResources("META-INF/example.properties");
> - getClass().getClassLoader().getResources("META-INF/example.properties");
> - MySessionBean.class.getClassLoader().getResources("META-INF/example.properties");
> then the resource from the POJO jar is not returned. Resource files with the requested name from all deployed EJB modules, however, are returned.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list