当前位置: 代码迷 >> J2EE >> 求解决办法MissingResourceException: Can't find bundle for base name javax.faces
  详细解决方案

求解决办法MissingResourceException: Can't find bundle for base name javax.faces

热度:586   发布时间:2016-04-22 01:55:29.0
求解决方法MissingResourceException: Can't find bundle for base name javax.faces.
环境是:eclipse3.4.1+oracle11+weblogic10.3. 开发用的是:JSF+Spring+Hibernate
Java code
这是异常:Error 500--Internal Server Error java.util.MissingResourceException: Can't find bundle for base name javax.faces.Messages, locale ja_JP    at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1521)    at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1260)    at java.util.ResourceBundle.getBundle(ResourceBundle.java:962)    at com.sun.faces.util.MessageFactory.getMessage(MessageFactory.java:177)    at com.sun.faces.util.MessageFactory.getMessage(MessageFactory.java:136)    at com.sun.faces.util.MessageUtils.getExceptionMessageString(MessageUtils.java:351)    at com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:173)    at jsp_servlet.__memberdetail._jsp__tag0(__memberdetail.java:125)    at jsp_servlet.__memberdetail._jspService(__memberdetail.java:97)    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)    at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:408)    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:318)    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)    at weblogic.security.service.SecurityManager.runAs(Unknown Source)    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) 


下边是代码:
Java code
<%@ page language="java" contentType="text/html; charset=windows-31j" pageEncoding="windows-31j"%><%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%><%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-31j"><title>会員登録画面</title><style type="text/css">.errormsg {color:red;font-weight:bold}.grid {padding-left: 50px;}.column1 {background-color: #FFDAB9; text-align: center;width: 100px}.column2 {background-color: #F5F5F5;}.text {width: 100%;}.button {width: 100px;}.buttonrow {text-align: center;}</style></head><body><f:view>    <h:outputText value="#{MemberCreate.msg}" styleClass="errormsg"></h:outputText>    <h:messages/>    <br><br>    項目を入力して、登録ボタンを押してください。    <h:form>        <h:panelGrid width="400" columnClasses="column1,column2" border="1" columns="2">            <h:outputText value="会員番号"></h:outputText>            <h:inputText value="#{Member.number}" id="number" styleClass="text" maxlength="6" required="true" requiredMessage="会員番号は必須です。"></h:inputText>            <h:outputText value="氏名"></h:outputText>            <h:inputText id="name" value="#{Member.name}" styleClass="text" required="true" requiredMessage="氏名は必須です。"></h:inputText>            <h:outputText value="住所"></h:outputText>            <h:inputText id="address" value="#{Member.address}" styleClass="text" required="true" requiredMessage="住所は必須です。"></h:inputText>            <h:outputText value="電話番号"></h:outputText>            <h:inputText id="telno" value="#{Member.telno}" styleClass="text" maxlength="11" required="true" requiredMessage="電話番号は必須です。"></h:inputText>            <h:outputText value="職業"></h:outputText>            <h:inputText id="job" value="#{Member.job}" styleClass="text" required="true" requiredMessage="職業は必須です。"></h:inputText>        </h:panelGrid>        <br>        <h:panelGrid width="400" styleClass="grid" border="0" columns="2" rowClasses="buttonrow">            <h:commandButton id="back" action="#{MemberCreate.back}" value="戻る" styleClass="button" immediate="true"></h:commandButton>            <h:commandButton id="create" action="#{MemberCreate.create}" value="登録" styleClass="button"></h:commandButton>        </h:panelGrid>    </h:form></f:view></body></html>
  相关解决方案