Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.util.MissingResourceException: Can't find bundle

Vitaliy OrbidanFeb 7 2006 — edited Feb 7 2006

hello all,
I am trying to closely follow Steve Muench's SRDemoSampleADFBC application to create a prototype of my app. I am runnig into java.util.MissingResourceException.
Here is how my faces-config.xml looks like:

  <application>
    <default-render-kit-id>oracle.adf.core</default-render-kit-id>
    <message-bundle>mypackage.dcedit.view.UIResources</message-bundle>
    <locale-config>
      <default-locale>en</default-locale>
    </locale-config>
  </application>

  <managed-bean>
    <managed-bean-name>resources</managed-bean-name>
    <managed-bean-class>
      mypackage.dcedit.view.resources.ResourceAdapter
    </managed-bean-class>
    <managed-bean-scope>application</managed-bean-scope>
  </managed-bean>

As soon as I add the following reference in my faces-config.xml, I am getting this error:

  <managed-bean>
    <managed-bean-name>menuItem_Modules</managed-bean-name>
    <managed-bean-class>
      mypackage.dcedit.view.menu.MenuItem</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
      <property-name>label</property-name>
      <value>#{resources['dcedit.modules']}</value>
    </managed-property>
    <managed-property>
      <property-name>viewId</property-name>
      <value>/modules.jspx</value>
    </managed-property>
    <managed-property>
      <property-name>outcome</property-name>
      <value>ShowModules</value>
    </managed-property>
  </managed-bean>

If I replace the bold text above with a string constant, everything works fine...

When I try to get a reference to the resource bundle from a .jsp page - everything works fine. It seems that the problem only occures, when I try to reference the resource from a faces-config.xml file....

Here is the error I am getting:

javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.el.EvaluationException: java.util.MissingResourceException: Can't find bundle for base name mypackage.dcedit.view.UIResources, locale en

.....

Caused by: java.util.MissingResourceException: Can't find bundle for base name mypackage.dcedit.view.UIResources, locale en
	at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:837)
	at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:806)
	at java.util.ResourceBundle.getBundle(ResourceBundle.java:700)
	at mypackage.dcedit.view.util.JSFUtils.getBundle(JSFUtils.java:186)
	at mypackage.dcedit.view.util.JSFUtils.getStringFromBundle(JSFUtils.java:122)
	at mypackage.dcedit.view.resources.ResourceAdapter.get(ResourceAdapter.java:16)
	at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:59)
	at oracle.adfinternal.view.faces.model.FacesPropertyResolver.getValue(FacesPropertyResolver.java:92)
	at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:167)
	at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:151)
	at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
	at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)

Any help is greatly appreciated.

Vitaliy

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 7 2006
Added on Feb 7 2006
2 comments
7,462 views