问题

Tomcat7在启动时报错,详细信息如下:

十一月 23, 2013 7:21:58 下午 org.apache.catalina.core.StandardContext startInter
nal
严重: Error filterStart
十一月 23, 2013 7:21:58 下午 org.apache.catalina.core.StandardContext startInter
nal
严重: Context [/st] startup failed due to previous errors

分析

Tomcat后台信息太少以至于不能得出问题空间出在哪儿(Tomcat的日志目录也无相关信息)。网上查询得知,通过配置Tomcat的Log,让它记录更多的日志信息,方能进一步分析原因。

在不能启动的Web应用目录(我这里是st)下WEB-INF/classes目录中,新建logging.properties文件,内容参考如下:

handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################ org.apache.juli.FileHandler.level = FINE
org.apache.juli.FileHandler.directory = ${catalina.base}/logs
org.apache.juli.FileHandler.prefix = error-debug. java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

再启动Tomcat后,后台显示出了错误原因,并且Tomcat的日志目录中也出现了文件“error-debug.2013-11-23.log”,其中记录了错误详细信息。下面内容供参考(每个人出错的原因不一样,需要具体问题具体分析解决):

严重: Exception starting filter struts2
Unable to load configuration. - action - file:/D:/Work/helloworld/WebContent/WEB
-INF/classes/struts.xml::
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOp
erations.java:)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
.init(StrutsPrepareAndExecuteFilter.java:)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(Applicati
onFilterConfig.java:)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(Applicatio
nFilterConfig.java:)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applica
tionFilterConfig.java:)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFi
lterConfig.java:)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.
java:)
at org.apache.catalina.core.StandardContext.startInternal(StandardContex
t.java:)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.
java:)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.
java:)
at java.util.concurrent.FutureTask.run(FutureTask.java:)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:)
at java.lang.Thread.run(Thread.java:)
Caused by: Unable to load configuration. - action - file:/D:/Work/helloworld/Web
Content/WEB-INF/classes/struts.xml::
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(
ConfigurationManager.java:)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Di
spatcher.java:)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:)
... more
Caused by: Action class [com.clzhang.ssh.action.LoginAction] not found - action
- file:/D:/Work/helloworld/WebContent/WEB-INF/classes/struts.xml::
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.ver
ifyAction(XmlConfigurationProvider.java:)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.add
Action(XmlConfigurationProvider.java:)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.add
Package(XmlConfigurationProvider.java:)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loa
dPackages(XmlConfigurationProvider.java:)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages
(StrutsXmlConfigurationProvider.java:)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContai
ner(DefaultConfiguration.java:)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(
ConfigurationManager.java:)
... more 十一月 , :: 下午 org.apache.catalina.core.StandardContext startInter
nal
严重: Error filterStart
十一月 , :: 下午 org.apache.catalina.core.StandardContext startInter
nal
严重: Context [/st] startup failed due to previous errors
十一月 , :: 下午 org.apache.catalina.startup.HostConfig deployDirect
ory

解决

是程序的问题,配置的相关Action类的包名更改了,但没有及时更改struts.xml文件导致上述结果。

有关Tomcat的日志相关配置参考:http://tomcat.apache.org/tomcat-7.0-doc/logging.html

本文参考:

http://grails.1312388.n4.nabble.com/Deployment-problems-td4628710.html

可能有同学打不开上述页面,因为它被屏蔽了。摘录部分内容如下,供参考:

Just for future reference; even though the app worked fine in development mode, there were some bugs in the BootStrap when deploying to a real server. I realized errors in the BootStrap were creating the cryptic listererStart error.

In order to get better debug logging, place a file called "logging.properties" in the webapps WEB-INF/classes folder.  Then, your server logs will show descriptive errors for debugging:

handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler


############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################
org.apache.juli.FileHandler.level = FINE
org.apache.juli.FileHandler.directory = ${catalina.base}/logs
org.apache.juli.FileHandler.prefix = servlet-examples.


java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter 

This will create a servlet-examples.log file in your appserver's log folder. This data was found at http://tomcat.apache.org/tomcat-7.0-doc/logging.html under the "Using java.util.logging (default)" header.

Hopefully this will help save someone some time and frustration when deploying their app, especially if, like me, they are unfamiliar with tomcat and the logging facilities.

Tomcat7启动报Error listenerStart错误的更多相关文章

  1. Tomcat7启动报Error listenerStart错误--转载

    原文地址:http://www.cnblogs.com/nayitian/p/3439336.html 问题 Tomcat7在启动时报错,详细信息如下: 十一月 23, 2013 7:21:58 下午 ...

  2. (转)Tomcat启动报Error listenerStart错误

    今天启动Tomcat启动不了,报以下错: org.apache.catalina.core.StandardContext startInternalSEVERE: Error listenerSta ...

  3. Tomcat启动报Error listenerStart错误

    http://xpenxpen.iteye.com/blog/1545648 今天启动Tomcat启动不了,报以下错: org.apache.catalina.core.StandardContext ...

  4. Tomcat启动报Error listenerStart错误 Context [] startup failed due to previous errors

    本文转载自xpenxpen 今天启动Tomcat启动不了,报以下错: org.apache.catalina.core.StandardContext startInternal SEVERE: Er ...

  5. Tomcat启动报Error listenerStart错误 | "beans" 必须匹配 DOCTYPE 根 "null" | java.lang.reflect.MalformedParameterizedTypeException

    maven打包发布工程时,发布上去却报错FAIL - Deployed application at context path /ch but context failed to start 在服务器 ...

  6. 解决软件启动报error while loading shared libraries: libgd.so.2: cannot open shared object错误

    解决软件启动报error while loading shared libraries: libgd.so.2: cannot open shared object错误 今天安装启动nginx的时候报 ...

  7. Jetty启动报Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/ProcessIdUtil.class

    近日在项目中集成Elasticsearch后,Jetty启动报错. 错误日志如下: Suppressed: |java.lang.RuntimeException: Error scanning en ...

  8. springboot 配置jpa启动报Error processing condition on org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration.pageableCustomizer

    springboot +gradle 配置jpa启动报Error processing condition on org.springframework.boot.autoconfigure.data ...

  9. MySQL创建函数报“ERROR 1418 ”错误,不能创建函数

    MySQL创建函数报ERROR 1418错误,不能创建函数,根据官方提示是说,不能创建函数可能是一个安全设置方面的配置或功能未开启原因,下面我们一起来看.   错误 ERROR 1418 (HY000 ...

随机推荐

  1. Hibernate学习笔记五:反向工程快速开发

    转载请注明原文地址:http://www.cnblogs.com/ygj0930/p/6768513.html  一:反向工程 Myeclipse提供由 数据库表 生成 java pojo 和 hib ...

  2. Tomcat上文件的绝对路径访问笔记

    部署到Tomcat上的web项目的文件在代码中访问,可以先通过request获取到项目的根目录绝对路径,然后自己拼接子目录路径,直到文件.方法如下: String realpath=request.g ...

  3. Python接收邮件并保存至MySQL

    转自:http://www.360doc.com/content/14/0103/13/11789990_342303735.shtml 参考了一些网络上的资料,做了个简单程序,使用python接收邮 ...

  4. nginx 和php设置上传大小及可以提交的内容限制

    1. 以下代码加入 /etc/nginx/nginx.conf 文件中的 http{ ... } 块中 client_max_body_size 8M; 2. PHP 设置上传大小 打开 /etc/p ...

  5. linux mysql 数据库开启外部访问设置指南

    Linux下设置MySQL和允许外部机器访问,具体目录是具体情况而定,有的人是安装了在个人目录下,则找到对应的目录则可以 Linux下设置MySQL和允许外部机器访问sudo vi /etc/my.c ...

  6. 【转载】Mysql主从复制、和MySQL集群(主主复制)

    转载:https://www.cnblogs.com/phpstudy2015-6/p/6485819.html 请同时参考和结合这篇文件进行处理:https://blog.csdn.net/envo ...

  7. 使用Idea添加PYTHONPATH的一种方案

    工作中我们常常需要更改PYTHONPATH,为项目添加一些依赖. 而不同的项目依赖的PYTHONPATH是不一样的,这就导致项目之间的PYTHONPATH发生混乱. 另一方面,有的电脑上PYTHON2 ...

  8. 【Oracle】Oracle基本数据类型总结

    ORACLE基本数据类型(亦叫内置数据类型 built-in datatypes)可以按类型分为:字符串类型.数字类型.日期类型.LOB类型.LONG RAW& RAW类型.ROWID &am ...

  9. 解决方案,org.hibernate.LazyInitializationException: could not initialize proxy - no Session

    org.hibernate.LazyInitializationException: could not initialize proxy - no Session org.hibernate.pro ...

  10. Installation error: INSTALL_FAILED_CONFLICTING_PROVIDER 解决方案

    主要是由于调试的环境中已有一个同名的Provider存在. 解决方法是修改AndroidManifest.xml中的 <provider android:name=".apps.App ...