鹰翔宇空

学习和生活

BlogJava 首页 新随笔 联系 聚合 管理
  110 Posts :: 141 Stories :: 315 Comments :: 1 Trackbacks
使用Struts时间长了,对版本之间的更换变化也变得麻木了,因为很少换版本,并且它的版本之间的兼容性挺好的,但是现在出问题了,出在了WebWork上,郁闷之极!
下了一个最新的版本,也没看版本说明,在公司里就试了下,结果搞得灰头灰脸的,后来看了一下说明才知道,必须要JDK1.5的版本,,没办法,又下了个较早的版本,但是耽误了没试成,毕竟在公司嘛,身不由己。回到家里再试,忘了换过版本了,用的是JDK1.5,还是有问题,这下可烦死了,上网查了好久也不明所以然,那个郁闷阿,最后才想起是JDK1.5和WebWork的版本问题,,晕阿。重新更改后,一切OK!
下面是版本不一致时抛的异常:
23:11:52,531 ERROR XmlConfigurationProvider: Caught exception while loading file
 xwork.xml
java.lang.Exception: Could not open file xwork.xml
        at com.opensymphony.xwork.config.providers.XmlConfigurationProvider.load
ConfigurationFile(XmlConfigurationProvider.java:536)
        at com.opensymphony.xwork.config.providers.XmlConfigurationProvider.init
(XmlConfigurationProvider.java:124)
        at com.opensymphony.xwork.config.impl.DefaultConfiguration.reload(Defaul
tConfiguration.java:85)
        at com.opensymphony.xwork.config.ConfigurationManager.getConfiguration(C
onfigurationManager.java:56)
        at com.opensymphony.xwork.DefaultActionProxyFactory.setupConfigIfActionI
sCommand(DefaultActionProxyFactory.java:58)
        at com.opensymphony.xwork.DefaultActionProxyFactory.createActionProxy(De
faultActionProxyFactory.java:43)
        at com.opensymphony.webwork.dispatcher.ServletDispatcher.serviceAction(S
ervletDispatcher.java:270)
        at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(Servlet
Dispatcher.java:237)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:971)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:402)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:305)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:6350)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:317)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
118)
        at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:3635)
        at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2585)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
23:11:52,562 FATAL XmlConfigurationProvider: Could not load XWork configuration
file, failing
com.opensymphony.xwork.config.ConfigurationException: Caught exception while loa
ding file xwork.xml
    with nested exception
java.lang.Exception: Could not open file xwork.xml
        at com.opensymphony.xwork.config.providers.XmlConfigurationProvider.load
ConfigurationFile(XmlConfigurationProvider.java:543)
        at com.opensymphony.xwork.config.providers.XmlConfigurationProvider.init
(XmlConfigurationProvider.java:124)
        at com.opensymphony.xwork.config.impl.DefaultConfiguration.reload(Defaul
tConfiguration.java:85)
        at com.opensymphony.xwork.config.ConfigurationManager.getConfiguration(C
onfigurationManager.java:56)
        at com.opensymphony.xwork.DefaultActionProxyFactory.setupConfigIfActionI
sCommand(DefaultActionProxyFactory.java:58)
        at com.opensymphony.xwork.DefaultActionProxyFactory.createActionProxy(De
faultActionProxyFactory.java:43)
        at com.opensymphony.webwork.dispatcher.ServletDispatcher.serviceAction(S
ervletDispatcher.java:270)
        at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(Servlet
Dispatcher.java:237)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:971)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:402)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:305)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:6350)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:317)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
118)
        at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:3635)
        at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2585)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
with nested exception java.lang.Exception: Could not open file xwork.xml
java.lang.Exception: Could not open file xwork.xml
        at com.opensymphony.xwork.config.providers.XmlConfigurationProvider.load
ConfigurationFile(XmlConfigurationProvider.java:536)
        at com.opensymphony.xwork.config.providers.XmlConfigurationProvider.init
(XmlConfigurationProvider.java:124)
        at com.opensymphony.xwork.config.impl.DefaultConfiguration.reload(Defaul
tConfiguration.java:85)
        at com.opensymphony.xwork.config.ConfigurationManager.getConfiguration(C
onfigurationManager.java:56)
        at com.opensymphony.xwork.DefaultActionProxyFactory.setupConfigIfActionI
sCommand(DefaultActionProxyFactory.java:58)
        at com.opensymphony.xwork.DefaultActionProxyFactory.createActionProxy(De
faultActionProxyFactory.java:43)
        at com.opensymphony.webwork.dispatcher.ServletDispatcher.serviceAction(S
ervletDispatcher.java:270)
        at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(Servlet
Dispatcher.java:237)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:971)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:402)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:305)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:6350)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:317)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
118)
        at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:3635)
        at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2585)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
23:11:52,562 ERROR ServletDispatcher: Could not find action
com.opensymphony.xwork.config.ConfigurationException: Error loading configuratio
n file xwork.xml
    with nested exception
com.opensymphony.xwork.config.ConfigurationException: Caught exception while loa
ding file xwork.xml
    with nested exception
java.lang.Exception: Could not open file xwork.xml
        at com.opensymphony.xwork.config.providers.XmlConfigurationProvider.init
(XmlConfigurationProvider.java:127)
        at com.opensymphony.xwork.config.impl.DefaultConfiguration.reload(Defaul
tConfiguration.java:85)
        at com.opensymphony.xwork.config.ConfigurationManager.getConfiguration(C
onfigurationManager.java:56)
        at com.opensymphony.xwork.DefaultActionProxyFactory.setupConfigIfActionI
sCommand(DefaultActionProxyFactory.java:58)
        at com.opensymphony.xwork.DefaultActionProxyFactory.createActionProxy(De
faultActionProxyFactory.java:43)
        at com.opensymphony.webwork.dispatcher.ServletDispatcher.serviceAction(S
ervletDispatcher.java:270)
        at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(Servlet
Dispatcher.java:237)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:971)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:402)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:305)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:6350)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:317)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
118)
        at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:3635)
        at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2585)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
with nested exception com.opensymphony.xwork.config.ConfigurationException: Caug
ht exception while loading file xwork.xml
    with nested exception
java.lang.Exception: Could not open file xwork.xml
com.opensymphony.xwork.config.ConfigurationException: Caught exception while loa
ding file xwork.xml
    with nested exception
java.lang.Exception: Could not open file xwork.xml
        at com.opensymphony.xwork.config.providers.XmlConfigurationProvider.load
ConfigurationFile(XmlConfigurationProvider.java:543)
        at com.opensymphony.xwork.config.providers.XmlConfigurationProvider.init
(XmlConfigurationProvider.java:124)
        at com.opensymphony.xwork.config.impl.DefaultConfiguration.reload(Defaul
tConfiguration.java:85)
        at com.opensymphony.xwork.config.ConfigurationManager.getConfiguration(C
onfigurationManager.java:56)
        at com.opensymphony.xwork.DefaultActionProxyFactory.setupConfigIfActionI
sCommand(DefaultActionProxyFactory.java:58)
        at com.opensymphony.xwork.DefaultActionProxyFactory.createActionProxy(De
faultActionProxyFactory.java:43)
        at com.opensymphony.webwork.dispatcher.ServletDispatcher.serviceAction(S
ervletDispatcher.java:270)
        at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(Servlet
Dispatcher.java:237)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:971)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:402)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:305)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:6350)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:317)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
118)
        at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:3635)
        at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2585)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
with nested exception java.lang.Exception: Could not open file xwork.xml
java.lang.Exception: Could not open file xwork.xml
        at com.opensymphony.xwork.config.providers.XmlConfigurationProvider.load
ConfigurationFile(XmlConfigurationProvider.java:536)
        at com.opensymphony.xwork.config.providers.XmlConfigurationProvider.init
(XmlConfigurationProvider.java:124)
        at com.opensymphony.xwork.config.impl.DefaultConfiguration.reload(Defaul
tConfiguration.java:85)
        at com.opensymphony.xwork.config.ConfigurationManager.getConfiguration(C
onfigurationManager.java:56)
        at com.opensymphony.xwork.DefaultActionProxyFactory.setupConfigIfActionI
sCommand(DefaultActionProxyFactory.java:58)
        at com.opensymphony.xwork.DefaultActionProxyFactory.createActionProxy(De
faultActionProxyFactory.java:43)
        at com.opensymphony.webwork.dispatcher.ServletDispatcher.serviceAction(S
ervletDispatcher.java:270)
        at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(Servlet
Dispatcher.java:237)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:971)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:402)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:305)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:6350)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:317)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
118)
        at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:3635)
        at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2585)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
posted on 2006-03-02 10:29 TrampEagle 阅读(2411) 评论(2)  编辑  收藏 所属分类: 学习体会

Feedback

# re: WebWork和JDK的版本问题 2006-12-28 09:59 zhengdf
你好
我的问题也跟你差不多。
但都没解决。
说说你的jdk版本和 webwork,tomcat的版本。
谢谢
能把你的代码贴出来吗?  回复  更多评论
  

# re: WebWork和JDK的版本问题[未登录] 2008-11-16 10:04 lelence
不是jdk版本的问题,把xwork.xml配置文件改一下,

<!-- 一定要把这个文件包进来 -->
<include file="webwork-default.xml" />

<!-- name可以随便起,extends有讲究,填写这个就不会错了 -->
<package name="hello" extends="webwork-default">
<!-- 以下的能能看明白吧 -->
<action name="login" class="com.jrtl.login.Zction">
<result name="main" >/main.jsp</result>
<interceptor-ref name="defaultStack"/>
</action>
</package>
  回复  更多评论
  


只有注册用户登录后才能发表评论。


网站导航: