错误信息 :
1. org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Network error IOException: Connection refused: connect)
2. Caused by: java.sql.SQLException: Network error IOException: Connection refused: connect
3. Caused by: java.net.ConnectException: Connection refused: connect
解决方法:数据库未开情况下运行tomcat出现的问题,把数据库打开就行了
错误信息 : WARN [struts2.config.Settings] Settings: Could not parse struts.locale setting, substituting default VM locale
解决方法 : 在 struts.properties 文件中加上 struts.locale=en_utf-8
错误信息 : log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
解决方法 : 在WEB-INF/classes/路径下加上文件 log4j.properties 其参考内容如下
# Set root logger level to error
log4j.rootLogger=INFO, Console, File
###### Console appender definition #######
# All outputs currently set to be a ConsoleAppender.
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{3}] %m%n
#log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n
###### File appender definition #######
log4j.appender.File=org.apache.log4j.DailyRollingFileAppender
log4j.appender.File.File=spring.log
log4j.appender.File.Append=false
log4j.appender.File.layout=org.apache.log4j.PatternLayout
log4j.appender.File.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n
###### Hibernate specific appender definition #######
#log4j.appender.file=org.apache.log4j.FileAppender
#log4j.appender.file.File=hibernate.log
#log4j.appender.file.layout=org.apache.log4j.PatternLayout
#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
###### Log level overrides #######
# Hibernate
log4j.logger.org.hibernate.cache.EhCacheProvider=warn
log4j.logger.org.hibernate.type=warn
# log4j.logger.org.hibernate.persister.collection=DEBUG
# Spring
log4j.logger.org.springframework=warn
# Axis/WSS4J
log4j.logger.org.apache.axis=info
log4j.logger.org.apache.ws=info
# MyFaces
log4j.logger.org.apache.myfaces.util.DebugUtils=info
log4j.logger.org.apache.myfaces.el.VariableResolverImpl=error
log4j.logger.org.apache.myfaces.application.jsp.JspViewHandlerImpl=error
# log prepared statement cache activity ###
log4j.logger.org.hibernate.ps.PreparedStatementCache=info
###### Examples #######
# To dump performance results on VM termination
#log4j.logger.performance.summary.vm=debug
# To dump performance stats on every call
#log4j.logger.performance.summary.method=debug
# Examples of activating performance logging on various beans
#log4j.logger.performance.nodeDaoService=debug
#log4j.logger.performance.dbNodeService=debug
#log4j.logger.performance.indexingNodeService=debug
#log4j.logger.performance.indexerComponent=debug
错误信息 : WARN [ehcache.config.ConfigurationFactory] No configuration found. Configuring ehcache from ehcache-failsafe.xml
解决方法 : 在WEB-INF/classes/路径下加上文件 ehcache.xml 其参考内容如下
<ehcache>
<diskStore path="java.io.tmpdir"/>
<defaultCache
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="10000"
timeToLiveSeconds="10000"
overflowToDisk="true"
/>
<cache name="com.hour41.hibernate.vo.common.City"
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="10000"
timeToLiveSeconds="10000"
overflowToDisk="true"
/>
</ehcache>
错误信息:java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
at net.sf.cglib.core.ClassEmitter.begin_class(ClassEmitter.java:77)
解决方法:Spring 和 Hibernate 共用的一些 jar 文件发生了版本冲突, 删除 WEB-INF/lib/asm-2.2.3.jar 然后重启 Tomcat.
错误信息:javax.servlet.jsp.JspException: Invalid argument looking up property usersVO.account of bean loginForm
解决方法:Form中的usersVO没被实例化,在reset方法中new一下就OK了
错误信息:org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV
解决方法:加入standard.jar,重启tomcat
错误信息:严重: Exception loading sessions from persistent storage
解决方法:tomcat安装目录\work\Catalina\localhost\{webAppName}\SESSIONS.ser,删除此文件