ssh项目错误,请帮我看看!

zzcft2010 发布于 2013/01/05 16:35
阅读 3K+
收藏 0
2013-1-5 16:26:51 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
Unable to load configuration. - action - file:/D:/apache-tomcat-6.0.35/webapps/dianhua51/WEB-INF/classes/struts.xml:63:65
 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:428)
 at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
 at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
 at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
 at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
 at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
 at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4072)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4726)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
 at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
 at org.apache.catalina.core.StandardService.start(StandardService.java:525)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: Unable to load configuration. - action - file:/D:/apache-tomcat-6.0.35/webapps/dianhua51/WEB-INF/classes/struts.xml:63:65
 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69)
 at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:371)
 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:415)
 ... 29 more
Caused by: Error building results for action industry_* in namespace /admin - action - file:/D:/apache-tomcat-6.0.35/webapps/dianhua51/WEB-INF/classes/struts.xml:63:65
 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:378)
 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:479)
 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:275)
 at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
 at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:204)
 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
 ... 31 more
Caused by: There is no result type defined for type 'redirect-action' mapped with name 'toBrowseIndustry'.  Did you mean 'redirectAction'? - result - file:/D:/apache-tomcat-6.0.35/webapps/dianhua51/WEB-INF/classes/struts.xml:67:59
 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildResults(XmlConfigurationProvider.java:632)
 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:376)
 ... 36 more
2013-1-5 16:26:51 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2013-1-5 16:26:51 org.apache.catalina.core.StandardContext start
严重: Context [/dianhua51] startup failed due to previous errors
log4j:WARN No appenders could be found for logger (org.springframework.web.context.support.XmlWebApplicationContext).
log4j:WARN Please initialize the log4j system properly.
2013-1-5 16:26:51 org.apache.catalina.core.ApplicationContext log
信息: Shutting down log4j
2013-1-5 16:26:51 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
2013-1-5 16:26:51 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/dianhua51] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
2013-1-5 16:26:51 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/dianhua51] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak.
2013-1-5 16:26:51 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/dianhua51] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0] but has failed to stop it. This is very likely to create a memory leak.
2013-1-5 16:26:51 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/dianhua51] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1] but has failed to stop it. This is very likely to create a memory leak.
2013-1-5 16:26:51 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/dianhua51] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2] but has failed to stop it. This is very likely to create a memory leak.
2013-1-5 16:26:51 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/dianhua51] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.
2013-1-5 16:26:51 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
严重: The web application [/dianhua51] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@1125a40]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@1e335d7]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
2013-1-5 16:26:51 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
严重: The web application [/dianhua51] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@1e3d80c]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@17d1256]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.
加载中
0
sxgkwei
sxgkwei
struts.xml里面有配置错误。重点看看/dianhua51和industry_*处
0
铂金苍鹰
铂金苍鹰
struts.xml 这个配置文件 industry_*这个入口没有返回值,一般出错是没有 input 返回
0
铂金苍鹰
铂金苍鹰

actionFrom 验证出错时自动返回“input” 的 所以你要有个默认 input返回 指向路径

0
zzcft2010
zzcft2010
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" " http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
    <!-- 设置Web应用的默认编码集为gbk -->
 <constant name="struts.i18n.encoding" value="gbk"/>
 <!-- 设置Web应用的默认Locale为zh_CN -->
 <constant name="struts.locale" value="zh_CN" />
 <!-- 设置Struts2应用的国际化资源文件,多个文件中间可用逗号分隔 -->
 <constant name="struts.custom.i18n.resources" value="messageResource"/>
 <!-- 设置Struts2默认的ObjectFactory为spring -->
 <constant name="struts.objectFactory" value="spring" />
 <!-- 设置Struts2应用是否处于开发模式,通常在开发调试阶段设为true,正式上线后可设为false -->
 <constant name="struts.devMode" value="true" />
 <!-- 设置Struts2的默认主题为simple -->
 <constant name="struts.ui.theme" value="simple" />
 
 <!-- Z定义一个名为dianhua51的包,继承Struts2的默认包    extends没有写struts-default -->
 <package name="dianhua51" extends="struts-default">
  <!-- 配置自定义拦截器LoginedCheckInterceptor -->
  <interceptors>
   <interceptor name="loginedCheck"
    class="com.dianhua51.struts.inteceptor.LoginedCheckInteceptor" />
  </interceptors>
  <!-- 定义全局result -->
  <global-results>
   <!-- 定义名为exception的全局result -->
   <result name="exception">/exception.jsp</result>
   <!-- 定义名为tologin的全局result -->
   <result name="tologin">/admin/tologin.html</result>
   <!-- 定义名为noprim的全局result -->
   <result name="noprim">/admin/error.html</result>
  </global-results>
  <!-- 定义全局异常映射 -->
  <global-exception-mappings>
   <!-- 捕捉到Exception异常(所有异常)时跳转到exception所命名的视图上 -->
   <exception-mapping exception="java.lang.exception"
    result="exception" />
  </global-exception-mappings>
 </package>
 
 <!-- Z定义供异步调用的包,指定命名空间为/ajax -->
    <package name="ajax" extends="json-default" namespace="/ajax">
     <!-- 配置供异步调用的incNewsClicks映射,实现新闻点击数加一 -->
  <action name="incPhoneClicks" class="phoneAction" method="incPhoneClicks">
   <result type="json">
    <!-- 指定不需要序列化输出给客户端的属性列表 -->
    <param name="excludeProperties">
     service,industryService,actionMsg,phoneList,columnId,doubleSelectNodes,column1,column2,pic,picContentType,picFileName,model
    </param>
   </result>
  </action>     
    </package>
 
 <!-- 定义后台管理包,指定命名空间为/admin -->   
    <package name="admin" extends="dianhua51" namespace="/admin">
  <!-- 配置电话行业管理的IndustryAction映射 -->
  <action name="updateIndustry" class="industryAction" method="updateIndustry">
   <result name="input">/admin/editIndustry.jsp</result>
   <interceptor-ref name="loginedCheck"/>
   <interceptor-ref name="defaultStack"/>
  </action>
  <!-- 使用通配符配置实现动态方法调用 --> 
  <action name="industry_*" class="industryAction" method="{1}">
   <result>/admin/{1}.jsp</result>
   <result name="input">/admin/{1}.jsp</result> 
   <!-- 将请求重定向至别的Action,相当重新发起一次请求,并携带请求参数 -->  
   <result name="toBrowseIndustry" type="redirect-action">
    <param name="actionName">industry_browseIndustry</param>
    <param name="namespace">/admin</param>
    <param name="actionMsg">${actionMsg}</param>
   </result>
   <interceptor-ref name="loginedCheck"/>
   <interceptor-ref name="defaultStack"/>
  </action>
 </package>   
</struts>    
这是配置文件,大家看看  63行如下
<action name="industry_*" class="industryAction" method="{1}">
   <result>/admin/{1}.jsp</result>
0
铂金苍鹰
铂金苍鹰
配置文件中的package的属性extends没有设置为struts-default
0
zzcft2010
zzcft2010

设置的有呀!能具体些吗

0
铂金苍鹰
铂金苍鹰
<package name="dianhua51" extends="struts-default">  你这个拦截器是不是配错了
zzcft2010
zzcft2010
你说的我不明白。能不能qq交流 657945828
0
灵魂收割者
<result name="toBrowseIndustry" type="redirect-action">
是不是要写成redirectAction?
0
zzcft2010
zzcft2010

写成redirectAction,直接提示错误

返回顶部
顶部