麻烦大家帮忙看看 struts:多个struts文件用逗号隔开为什么不能总是报错啊(环境wsad5.1.2)

augustfox 2004-11-22 10:53:00
我在web.xml中配置如下
...
<init-param>
<param-name>config</param-name>
<param-value>WEB-INF/struts-config.xml,WEB-INF/struts-config-fox.xml</param-value>
</init-param>
...

在server装入我的EAR时总是报错,我把err全部贴出来,请高手帮忙(我实在找不出原因了。因为在同样的server中装入另一个EAR是没问题的,写法一样的)


04-11-22 10:43:15:281 CST] 3cb6237a PropertyMessa I org.apache.struts.util.PropertyMessageResources Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
[04-11-22 10:43:15:281 CST] 3cb6237a PropertyMessa I org.apache.struts.util.PropertyMessageResources Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
[04-11-22 10:43:15:500 CST] 3cb6237a ActionServlet E org.apache.struts.action.ActionServlet Parsing error processing resource path WEB-INF/struts-config.xml,WEB-INF/struts-config-fox.xml
[04-11-22 10:43:15:500 CST] 3cb6237a ActionServlet E org.apache.struts.action.ActionServlet TRAS0014I: 下列异常已记录 java.lang.NullPointerException
at org.apache.struts.action.ActionServlet.initApplicationConfig(ActionServlet.java:857)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:455)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletInstance.java:82)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycleServlet.java:147)
at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecycleServlet.java:270)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleServlet.java:113)
at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:189)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServletManager.java:870)
at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:224)
at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:542)
at com.ibm.ws.webcontainer.webapp.WebApp.loadServletManager(WebApp.java:1277)
at com.ibm.ws.webcontainer.webapp.WebApp.init(WebApp.java:283)
at com.ibm.ws.webcontainer.srt.WebGroup.loadWebApp(WebGroup.java:387)
at com.ibm.ws.webcontainer.srt.WebGroup.init(WebGroup.java:209)
at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:1005)
at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:136)
at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:356)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:505)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:808)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:354)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:578)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:299)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:256)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:128)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:183)
at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)
at com.ibm.ws.runtime.WsServer.main(WsServer.java:225)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41)
at java.lang.reflect.Method.invoke(Method.java:386)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:105)
at com.ibm.etools.websphere.tools.runner.api.ServerRunnerV5$1.run(ServerRunnerV5.java:97)


...全文
99 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
jerrykey 2004-11-22
  • 打赏
  • 举报
回复
这个好像不是你的.xml的错误,看看自己所有的文件是否已经部署到了相应的包中。
augustfox 2004-11-22
  • 打赏
  • 举报
回复
[04-11-22 10:43:15:547 CST] 3cb6237a TraceNLS u No message text associated with key Parsing.error.processing.resource.path.WEB-INF/struts-config.xml,WEB-INF/struts-config-fox.xml in bundle com.ibm.ejs.resources.seriousMessages
[04-11-22 10:43:15:547 CST] 3cb6237a WebAppServlet E Parsing error processing resource path WEB-INF/struts-config.xml,WEB-INF/struts-config-fox.xml
我觉得这里好像有点提示!()
VRC 2004-11-22
  • 打赏
  • 举报
回复
你这也许有问题
web.xml

...
<init-param>
<param-name>config</param-name>
<param-value>WEB-INF/struts-config.xml,WEB-INF/struts-config-fox.xml</param-value>
</init-param>
...
报错是空指针错误,你在初始化给了两个值 : struts-config.xml和struts-config-fox.xml
web.xml不知道你初始化的是哪一个值.
funcreal 2004-11-22
  • 打赏
  • 举报
回复
看不懂,还有空指针异常,是不是程序问题
augustfox 2004-11-22
  • 打赏
  • 举报
回复
java.lang.NullPointerException
at org.apache.struts.action.ActionServlet.initApplicationConfig(ActionServlet.java:857)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:455)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)

[04-11-22 10:43:15:516 CST] 3cb6237a ServletInstan E SRVE0100E: 未识别出由 servlet action 抛出的 init() 异常:javax.servlet.UnavailableException: Parsing error processing resource path WEB-INF/struts-config.xml,WEB-INF/struts-config-fox.xml
at org.apache.struts.action.ActionServlet.initApplicationConfig(ActionServlet.java:866)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:455)

[04-11-22 10:43:15:531 CST] 3cb6237a WebGroup E SRVE0020E: [Servlet 错误]-[action]:无法装入 servlet:javax.servlet.UnavailableException: Parsing error processing resource path WEB-INF/struts-config.xml,WEB-INF/struts-config-fox.xml
at org.apache.struts.action.ActionServlet.initApplicationConfig(ActionServlet.java:866)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:455)

[04-11-22 10:43:15:547 CST] 3cb6237a TraceNLS u No message text associated with key Parsing.error.processing.resource.path.WEB-INF/struts-config.xml,WEB-INF/struts-config-fox.xml in bundle com.ibm.ejs.resources.seriousMessages
[04-11-22 10:43:15:547 CST] 3cb6237a WebAppServlet E Parsing error processing resource path WEB-INF/struts-config.xml,WEB-INF/struts-config-fox.xml
[04-11-22 10:43:15:562 CST] 3cb6237a ApplicationMg A WSVR0221I: 应用程序已启动:hdfdEAR
cyicecream 2004-11-22
  • 打赏
  • 举报
回复
我的多文件也没问题,没碰到楼主这样的情况,暂时
felixzz 2004-11-22
  • 打赏
  • 举报
回复
websphere自己带的那个struts不支持多个struts-config.xml,可是你用高版本替换了旧的那个,websphere的控制台就不能用了。没办法,等websphere升级吧
augustfox 2004-11-22
  • 打赏
  • 举报
回复
莫名其妙好了
散分
augustfox 2004-11-22
  • 打赏
  • 举报
回复
我用1.1版本(支持的),我另一个EAR中也是用逗号格开的方式做的,
一直运行的好好的。
awaterking 2004-11-22
  • 打赏
  • 举报
回复
/WEB-INF/struts-config.xml,/WEB-INF/struts-config-fox.xml

try this
kui 2004-11-22
  • 打赏
  • 举报
回复
Struts版本是多少,如果是较老版本,就不支持多个配置文件。

JavaWebStudio 2005支持Struts 1.2.4开发:
http://dev.csdn.net/develop/article/50/50737.shtm
JavaWebStudio 2005可从下面地址下载:
http://www.infoxa.com/asp/book/xxnr.asp?id=1574

augustfox 2004-11-22
  • 打赏
  • 举报
回复
我在web.xml中只写struts-config.xml,WEB-INF/struts-config-fox.xml两个中的任何一个都没有问题

而且我server中另一个EAR也是这样做的,真是不得其解啊

58,452

社区成员

发帖
与我相关
我的任务
社区描述
Java Eclipse
社区管理员
  • Eclipse
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧