简体   繁体   English

缺少资源异常Websphere门户

[英]Missing Resource Exception websphere portal

Error 500: java.util.MissingResourceException: Can't find resource for bundle com.ibm.abc.nl.abcdf, key en_US . Error 500: java.util.MissingResourceException: Can't find resource for bundle com.ibm.abc.nl.abcdf, key en_US

I am getting this exception. 我收到这个例外。 I have the properties file with abcdf_en under com.ibm.abc.nl package. 我在com.ibm.abc.nl包下有带有abcdf_en的属性文件。 I am not sure if I have to set my local language in Websphere Portal server or WAS. 我不确定是否必须在Websphere Portal服务器或WAS中设置本地语言。 Is there anything that I am missing ? 我有什么想念的吗?

The message says that en_US is the actual key that isn't found in the property file. 该消息表明en_US是在属性文件中找不到的实际密钥 In other words, your property file ( abcdf_en.properties , inside the com.ibm.abc.nl package) is supposed to have a key-value pair there, with the key being en_US . 换句话说,您的属性文件( com.ibm.abc.nl包内的abcdf_en.properties )应该在那里有一个键值对,键为en_US

If you have the key en_US in there (strange name for a key...), then it means that the abcdf_en isn't being picked up. 如果您在其中有密钥en_US (密钥的奇怪名称...),则意味着未获取abcdf_en This is either due to the property file not being in the classpath, or that WebSphere Portal doesn't consider en to be the current request's locale. 这是由于属性文件不在类路径中,或者是WebSphere Portal不将en视为当前请求的语言环境。 Did you try printing out the value of request.getLocale() ? 您是否尝试打印出request.getLocale()的值?

If the value of request.getLocale() is null , that would explain the symptoms you're experiencing. 如果request.getLocale()值为null ,那将解释您遇到的症状。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM