2016-11-30 4 views
0

MissingResourceExceptionの問題が発生したスレッドが多数あります。顔-config.xmlにJSF:java.util.MissingResourceException:ベースのバンドルが見つかりません:コンテキストルートが変更された場合のみ

java.util.MissingResourceException: Can't find bundle for base [...], locale 

<message-bundle>message.erreur.MsgErreurPrimefaces</message-bundle> 

そして、私の情報源で:

enter image description here

私は私の場合はPrimefaces 5.1.3 を使用してい 私はエラーを持っています

戦争はEARに詰め込まれています。私はデフォルトのコンテキストルートを保持してもうまく動作しますが、コンテキストルートを変更するとメッセージが表示されます。

ファイルは、下の戦争のWEB-INFフォルダに存在している:私が遭遇した

WEB-INF /クラス/メッセージ/ erreur/MsgErreurPrimefaces_fr_FR.properties

おかげ

答えて

0

前にこの種のエラーと私の問題は以下のように編集して修正されました。まず、MsgErreurPrimefaces.propertiesファイルを追加してテストすることをお勧めします。

<?xml version='1.0' encoding='UTF-8'?> 
<faces-config version="2.2" 
       xmlns="http://xmlns.jcp.org/xml/ns/javaee" 
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
       xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"> 
    <application> 
     <resource-bundle> 
      <base-name>message.erreur.MsgErreurPrimefaces</base-name> 
      <var>myBundle</var> 
     </resource-bundle> 
    </application> 
    <application> 
     <message-bundle>message.erreur.MsgErreurPrimefaces</message-bundle> 
     <locale-config> 
      <default-locale>fr_FR</default-locale> 
      <supported-locale>fr_FR</supported-locale> 
      <supported-locale>en_US</supported-locale> 
     </locale-config> 
    </application> 
</faces-config> 
関連する問題