日期:2014-05-20  浏览次数:20794 次

log4j 会导致这个问题吗?
Java code

2012-3-15 9:20:56 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet jsp threw exception
java.lang.OutOfMemoryError: PermGen space
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1850)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:890)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1354)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at freemarker.core.BuiltIn.<clinit>(BuiltIn.java:162)
    at freemarker.core.FMParser.BuiltIn(FMParser.java:790)
    at freemarker.core.FMParser.AddSubExpression(FMParser.java:726)
    at freemarker.core.FMParser.PrimaryExpression(FMParser.java:273)
    at freemarker.core.FMParser.UnaryExpression(FMParser.java:319)
    at freemarker.core.FMParser.MultiplicativeExpression(FMParser.java:435)
    at freemarker.core.FMParser.AdditiveExpression(FMParser.java:385)
    at freemarker.core.FMParser.RangeExpression(FMParser.java:556)
    at freemarker.core.FMParser.RelationalExpression(FMParser.java:511)
    at freemarker.core.FMParser.EqualityExpression(FMParser.java:476)
    at freemarker.core.FMParser.AndExpression(FMParser.java:595)
    at freemarker.core.FMParser.OrExpression(FMParser.java:608)
    at freemarker.core.FMParser.Expression(FMParser.java:221)
    at freemarker.core.FMParser.Parenthesis(FMParser.java:283)
    at freemarker.core.FMParser.PrimaryExpression(FMParser.java:256)
    at freemarker.core.FMParser.UnaryExpression(FMParser.java:319)
    at freemarker.core.FMParser.MultiplicativeExpression(FMParser.java:435)
    at freemarker.core.FMParser.AdditiveExpression(FMParser.java:385)
    at freemarker.core.FMParser.RangeExpression(FMParser.java:556)
    at freemarker.core.FMParser.RelationalExpression(FMParser.java:511)
    at freemarker.core.FMParser.EqualityExpression(FMParser.java:476)
    at freemarker.core.FMParser.AndExpression(FMParser.java:585)
    at freemarker.core.FMParser.OrExpression(FMParser.java:608)
    at freemarker.core.FMParser.Expression(FMParser.java:221)


真的很纠结 我一般都是Logger log=Logger.getLogger(Test.Class)
然后log.info(message)

最近redeploy后,调试老出这问题,难道一定要加大内存?

------解决方案--------------------
探讨
哦,如果等web项目发布出去了,不会出这种问题吧!要不然客户不是很纠结了.