TOMCAT控制台不输出异常信息,何解?

jingyukxy 2010-08-18 10:06:01
如题~
LOG4J信息如下:

# For JBoss: Avoid to setup Log4J outside $JBOSS_HOME/server/default/deploy/log4j.xml!
# For all other servers: Comment out the Log4J listener in web.xml to activate Log4J.
log4j.rootLogger=INFO, stdout

#console
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d %p (%F:%L) - [%m]%n
log4j.appender.stdout.Target=System.out

#logfile
#log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender
#log4j.appender.logfile.File=${catalina.home}/logs/background.log
log4j.appender.logfile.threshold = logfile
log4j.appender.logfile.DatePattern = '.'yyyy-MM-dd
log4j.appender.logfile.Append = true
#log4j.appender.logfile=org.apache.log4j.RollingFileAppender
# Log4j Max File Size
#log4j.appender.logfile.MaxFileSize=5120KB
# Keep three backup files.
#log4j.appender.logfile.MaxBackupIndex=5
# Pattern to output: date priority [category] - message
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%d %5p (%F:%L) - [%m]%n


# WARNING: Setting the org.springframework logger to DEBUG displays debug information about
# the request parameter values being bound to the command objects. This could expose your
# password in the log file. If you are sharing your log files, it is recommend you selectively
# apply DEBUG level logging on a an org.springframework.* package level (i.e. org.springframework.dao)
log4j.logger.org.springframework.jdbc=ERROR
#log4j.logger.org.springframework.web.servlet.i18n=DEBUG
#log4j.logger.org.springframework.web.servlet.view=DEBUG
#log4j.logger.org.quartz=DEBUG
log4j.logger.org.jasig=INFO
log4j.logger.org.hibernate=ERROR
log4j.logger.org.hibernate.SQL=ERROR
log4j.logger.org.apache.struts=ERROR

控制台不输出任何信息
...全文
1002 23 打赏 收藏 转发到动态 举报
写回复
用AI写文章
23 条回复
切换为时间正序
请发表友善的回复…
发表回复
liuyiwu 2010-08-23
  • 打赏
  • 举报
回复
你如果用的是myeclipse,开服务器是不是通过MyEclipse开的?如果不是,在测试的时候,控制台也可能出不来东西的,我前一阵也碰到这种问题,希望对你有帮助。
jingyukxy 2010-08-23
  • 打赏
  • 举报
回复
XML也没有什么问题啊,一般都是这么配置的吧
yangxuebao123 2010-08-23
  • 打赏
  • 举报
回复
配置文件有问题,你好好看看你的配置文件吧!!!
多半是xml文件那里出错了。。
jingyukxy 2010-08-23
  • 打赏
  • 举报
回复
[Quote=引用 19 楼 owen_008 的回复:]
给楼主顶一个·~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~呵呵
[/Quote]
多谢~
估计很少人遇到这种情况吧?
owen_008 2010-08-23
  • 打赏
  • 举报
回复






给楼主顶一个·~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~呵呵
jingyukxy 2010-08-23
  • 打赏
  • 举报
回复
还是没人回答啊?
jingyukxy 2010-08-18
  • 打赏
  • 举报
回复
WEB.XML:
    <!-- context-param -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml /WEB-INF/applicationContext-security.xml</param-value>
</context-param>

<!-- listener -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.security.ui.session.HttpSessionEventPublisher</listener-class>
</listener>

<!-- filter -->
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<!-- hibernate 延迟加载的错误 failed to lazily initialize a collection of role (make sure the session of hibernate is only one in a web http request )-->
<filter>
<filter-name>hibernateFilter</filter-name>
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>hibernateFilter</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>
jingyukxy 2010-08-18
  • 打赏
  • 举报
回复
SSH架构,再NEW CONSOLE也不行啊~
madFatso 2010-08-18
  • 打赏
  • 举报
回复
new console view
king138888 2010-08-18
  • 打赏
  • 举报
回复
你采用什么结构来架设的???
应该是你的web.xml没有配置好
madFatso 2010-08-18
  • 打赏
  • 举报
回复
window-->preferences-->MyEclipse Enterprise Workbench-->Servers-->Tomcat-->Tomcat5.x,定义好Tomcat的所在路径,
选择Tomcat5.x-->JDK-->Add,点Browse 找到JDK的安装路径.
如果都正确,随便改动下
jingyukxy 2010-08-18
  • 打赏
  • 举报
回复
别下去了,各位给看一下吧
jingyukxy 2010-08-18
  • 打赏
  • 举报
回复
只是输出这种信息,异常看不到
2010-8-18 10:44:02 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2010-8-18 10:44:02 org.apache.catalina.core.StandardContext start
严重: Context [/backgroundmanager] startup failed due to previous errors
2010-8-18 10:44:02 org.apache.catalina.core.ApplicationContext log
jingyukxy 2010-08-18
  • 打赏
  • 举报
回复
还是不行
madFatso 2010-08-18
  • 打赏
  • 举报
回复
单击Console视图,将控制台输出内容选择为Java Stack Trace Console
jingyukxy 2010-08-18
  • 打赏
  • 举报
回复
还是不行,我把LOG4J删了都不行
DAVE_LUO 2010-08-18
  • 打赏
  • 举报
回复
log4j.rootLogger=INFO, stdout
将stdout改成console。
jingyukxy 2010-08-18
  • 打赏
  • 举报
回复
恩,是啊
madFatso 2010-08-18
  • 打赏
  • 举报
回复
myeclipse 启动tomcat?
jingyukxy 2010-08-18
  • 打赏
  • 举报
回复
何解?各位无遇此问题乎?
加载更多回复(3)

81,092

社区成员

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

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