欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Could not reload resource bundles java.lang.NoSuchFieldException: cacheList

程序员文章站 2024-02-23 14:11:28
...

在使用struts2发布到weblogic10的时候报这个异常

Could not reload resource bundles java.lang.NoSuchFieldException: cacheList

 

 

You can't work with Struts 2 in devMode and Websphere. There isn't many information on the Internet (in French) but what I can understand with my limited French knowledge is that you have to put the server with production settings. 

I mean that your struts.xml must be like this to make Struts2 work on Websphere:
<struts>
   <constant name="struts.devMode" value="false" />
   <constant name="struts.i18n.reload" value="false" />
   <constant name="struts.configuration.xml.reload" value="false" />
   ...
</struts>

 The reason that why is this happening is not very clear. The blog explains that maybe is for a different JVM implementation by IBM and maybe it differs in the implementation of the ResourceBundle class that has no private field cacheList and then raises an error when it reloads the i18n labels.