Currently my JSF (1.2) application produces the following failure during the start of the Servlet Engine (Tomcat 6.0.32)....
java.util.MissingResourceException: Can't find bundle for base name javax.faces.Messages, locale de
java.util.ResourceBundle.throwMissingResourceException(Unknown Source)
java.util.ResourceBundle.getBundleImpl(Unknown Source)
java.util.ResourceBundle.getBundle(Unknown Source)
com.sun.faces.util.MessageFactory.getMessage(MessageFactory.java:177)
com.sun.faces.util.MessageFactory.getMessage(MessageFactory.java:136)
com.sun.faces.util.MessageUtils.getExceptionMessageString(MessageUtils.java:351)
com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:187)
com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:105)
com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:368)
com.sun.faces.mgbean.BeanManager.create(BeanManager.java:230)
com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:86)
javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:69)
org.apache.el.parser.AstValue.getValue(AstValue.java:112)
org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
com.sun.faces.application.ValueBindingValueExpressionAdapter.getValue(ValueBindingValueExpressionAdapter.java:113)
javax.faces.component.ValueExpressionValueBindingAdapter.getValue(ValueExpressionValueBindingAdapter.java:70)
org.apache.myfaces.custom.aliasbean.Alias.computeEvaluatedExpression(Alias.java:113)
org.apache.myfaces.custom.aliasbean.Alias.make(Alias.java:137)
org.apache.myfaces.custom.aliasbean.AliasBean.makeAlias(AliasBean.java:357)
org.apache.myfaces.custom.aliasbean.AliasBean.makeAlias(AliasBean.java:342)
org.apache.myfaces.custom.aliasbean.AliasBeanTagHandler.applyNextHandler(AliasBeanTagHandler.java:90)
com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
com.sun.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:109)
com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:274)
com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:159)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:19)
com.icesoft.faces.context.View$2$1.respond(View.java:48)
com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:201)
com.icesoft.faces.context.View$2.serve(View.java:77)
com.icesoft.faces.context.View.servePage(View.java:149)
com.icesoft.faces.webapp.http.core.SingleViewServer.service(SingleViewServer.java:52)
com.icesoft.faces.webapp.http.common.ServerProxy.service(ServerProxy.java:11)
com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$4.service(MainSessionBoundServlet.java:149)
com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:53)
com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:131)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)
org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter.doFilter(AbstractPreAuthenticatedProcessingFilter.java:89)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
de.konsens.wwwkmv.security.KmvExceptionTranslationFilter.doFilter(KmvExceptionTranslationFilter.java:54)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:57)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
I have configured a message bundle in the faces-config.xml file
<application>
<view-handler>com.icesoft.faces.facelets.D2DFaceletViewHandler</view-handler>
<locale-config>
<default-locale>de</default-locale>
<supported-locale>de</supported-locale>
<supported-locale>de_DE</supported-locale>
</locale-config>
<message-bundle>Messages</message-bundle>
</application>
I have put the property file into WEB-INF/classes/ folder (Messages_de.properties, Messages_de_DE.properties) but i always get this message....the most mysterious thing is that i only changed things in the configuration reading of the application but didn't change things in faces-config.xml or jspx files.
java.util.MissingResourceException: Can't find bundle for base name javax.faces.Messages, locale de
This is actually a misleading exception and a bug in error reporting of older JSF 1.2 versions. The real problem is that the <message-bundle>
cannot be found.
You mentioned that you placed Messages_de.properties
and Messages_de_DE.properties
in /WEB-INF/classes
folder, which is fine, but you should also supply a default Messages.properties
file. It can be kept empty.
Another possible cause is that you're actually developing using an IDE and that you placed it literally in the /WEB-INF/classes
folder by the IDE navigator. You should not do this. This will be overriden whenever you build and deploy the WAR. Instead, you should place the .properties
files in the source root of the project, there where all your Java packages also are.