好多天没来了,今天在用maven 打包的时候遇到了一个jvm相关的问题,so record it。。。
事件还原:
mvn install的时候报错:
Exception in thread "main" java.lang.StackOverflowError
at sun.nio.cs.UTF_8.updatePositions(UTF_8.java:77)
at sun.nio.cs.UTF_8$Encoder.encodeArrayLoop(UTF_8.java:564)
at sun.nio.cs.UTF_8$Encoder.encodeLoop(UTF_8.java:619)
at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:561)
at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:271)
at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125)
at java.io.OutputStreamWriter.write(OutputStreamWriter.java:207)
at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:129)
at java.io.PrintStream.write(PrintStream.java:526)
at java.io.PrintStream.print(PrintStream.java:669)
at java.io.PrintStream.println(PrintStream.java:806)
at org.apache.maven.cli.PrintStreamLogger.info(PrintStreamLogger.java:111)
at org.codehaus.plexus.logging.AbstractLogger.info(AbstractLogger.java:51)
at org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:464)
网上一查,好像是线程堆栈溢出.so 在install的时候指定了下-Xss 10m ...完美解决..嗯.今天好好看看jvm相关参数