[ 
https://issues.apache.org/jira/browse/DELTASPIKE-386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13690495#comment-13690495
 ] 

Jason Porter commented on DELTASPIKE-386:
-----------------------------------------

Larger patches require an iCLA to be on file, but with small patches we should 
be okay w/o one.
                
> PropertyFileUtils.getResourceBundle() fails in EAR
> --------------------------------------------------
>
>                 Key: DELTASPIKE-386
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-386
>             Project: DeltaSpike
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.4
>         Environment: JBoss AS 7.2.0.Final (EAP 6.1.0.Alpha1)
>            Reporter: Richard DiCroce
>
> The method PropertyFileUtils.getResourceBundle(String bundleName, Locale 
> locale) doesn't work correctly in an EAR.
> I have the DS core JARs in the EAR /lib and I'm trying to use the JsfMessage 
> feature in one of my WARs. Because getResourceBundle() calls 
> ResourceBundle.getBundle(String bundleName, Locale locale), Java attempts to 
> load the resource bundle using the classloader that was used to load 
> PropertyFileUtils, which is the EAR's classloader. The property files are in 
> the WAR, so Java can't find them.
> Changing
> return ResourceBundle.getBundle(bundleName, locale);
> to
> return ResourceBundle.getBundle(bundleName, locale, 
> Thread.currentThread().getContextClassLoader());
> fixes the problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to