首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java相关 >

myeclipse起动报错:Servlet /cqEtlRunTask threw load() exception

2013-09-11 
myeclipse启动报错:Servlet /cqEtlRunTask threw load() exception报错内容如下:严重: Servlet /cqEtlRunT

myeclipse启动报错:Servlet /cqEtlRunTask threw load() exception
报错内容如下:
严重: Servlet /cqEtlRunTask threw load() exception
javax.servlet.UnavailableException: Missing configuration resource for path /WEB-INF/struts-config.xml
at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:732)
at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:687)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:333)
at cn.com.starit.inas.ItsaActionServlet.init(ItsaActionServlet.java:30)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4350)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4659)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)


这个代码我是从别的地方移植过来的,/WEB-INF/struts-config.xml这个在原来的代码中也没有。web.xml里面是
 <servlet>


<servlet-name>action</servlet-name>
<servlet-class>
cn.com.starit.inas.ItsaActionServlet
</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>3</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>3</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>

原来的是
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>
cn.com.starit.itsa.web.struts.ItsaActionServlet
</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>
/WEB-INF/perf/struts-config.xml,
/WEB-INF/alarm/struts-config.xml,
/WEB-INF/config/struts-config.xml
</param-value>
</init-param>

<init-param>
<param-name>HqlName</param-name>
<param-value>
cn.com.starit.itsa.web.dao.hqlName
</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>3</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>3</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>

我去掉了中间三个xml的配置,我自己的代码是用不到xml里面的东西的。
为什么会报找不到 /WEB-INF/struts-config.xml这个文件的错误呢? Servlet
[解决办法]
既然没用,就删了吧,另外,搜索的时候,只搜索struts-config.xml,别带WEB-INF

我的异常网推荐解决方案:Servlet.service() for servlet default threw exception,http://www.myexception.cn/eclipse/181756.html

热点排行