Exception in thread "main" java.lang.StackOverflowError
at java.text.DecimalFormat.subformat(DecimalFormat.java:903)
at java.text.DecimalFormat.format(DecimalFormat.java:692)
at java.text.DecimalFormat.format(DecimalFormat.java:626)
at java.text.SimpleDateFormat.zeroPaddingNumber(SimpleDateFormat.java:1335)
at java.text.SimpleDateFormat.subFormat(SimpleDateFormat.java:1274)
at java.text.SimpleDateFormat.format(SimpleDateFormat.java:978)
at java.text.SimpleDateFormat.format(SimpleDateFormat.java:948)
at java.text.DateFormat.format(DateFormat.java:336)
at org.apache.log4j.helpers.PatternParser$DatePatternConverter.convert(PatternParser.java:443)
at org.apache.log4j.helpers.PatternConverter.format(PatternConverter.java:65)
at org.apache.log4j.PatternLayout.format(PatternLayout.java:506)
at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:310)
at org.apache.log4j.WriterAppender.append(WriterAppender.java:162)
at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
at org.apache.log4j.Category.callAppenders(Category.java:206)
at org.apache.log4j.Category.forcedLog(Category.java:391)
at org.apache.log4j.Category.log(Category.java:856)
at org.slf4j.impl.Log4jLoggerAdapter.error(Log4jLoggerAdapter.java:498)
StackOverflow 這個問題一般是你的程序裡頭可能是有死循環或遞歸調用所產生的;可以查看一下你的程序,也可以增大你JVM的內存~~~
在Eclipse中JDK的配置中加上 -XX:MaxDirectMemorySize=128 這代碼,就行了,默認是64M,增大一倍,我估計行了,還不行的話,就用256吧,還不行的話,估計就是你程序裡頭有死循環,或遞歸調用沒寫好了。。。