struts2重启tomcat后的错误的排除过程
错误1: Could not load org.apache.log4j.spi.ThrowableInformation. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
错误2: SEVERE: Exception starting filter Struts2
Caught exception while loading file struts-default.xml – [unknown location]
org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
解决方法:
移除项目目录中的xerces.jar
原因there was a conflict between tomcat’s internal XML parser and the xerces I was using inside my project.
问题3重启后,使用浏览器访问时正常,只有使用lucene查询时,报java.lang.OutOfMemoryError: Java heap space
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.lang.AbstractStringBuilder.<init>(Unknown Source)
at java.lang.StringBuffer.<init>(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
at org.wltea.analyzer.dic.Dictionary.loadMainDict(Dictionary.java:95)
这里就需要看这个方法到底干什么呢,原来我使用了IKAnalyzer3.2.0Stable 分词,换了其它的分词就没异常了,IK的分词作者给我的回复是这样的:
欢迎转载,请注明出处:亲亲宝宝