错误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
解决方法1:
移除项目目录中的xerces.jar
原因there was a conflict between tomcat’s internal XML parser and the xerces I was using inside my project.
解决方法2:
将xerces.jar 包放到tomcat/lib下面,作为公共jar使用,webapp里面的都删掉,这个是要和xml-api.jar一定移过去
问题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的分词作者给我的回复是这样的:
本文探讨了在Struts2、Hibernate3、Spring2框架下使用Tomcat5.5.12进行热部署时遇到的问题及解决方案,包括log4j配置冲突、XML解析器冲突以及IKAnalyzer分词器导致的内存溢出等问题。
706

被折叠的 条评论
为什么被折叠?



