Error during Maven compilation: java.lang.stackoverflowerror
preface
Most of this error is caused by the java thread stack, but it is not caused by this reason. I don’t know if I’ve heard of [in scala-2.10. X version, when there are more than 22 elements of case class, an error will be reported after compilation]. I really do this because there are more than 130 member variables in a case class, But mine is Scala_ 2.11 so I don’t think the problem is caused by the version. During the experiment, when the membership is limited to about 100, it’s OK. Of course, I’m lazy to disassemble the case class
Online solution (my solution)
Another problem on the Internet is to solve my problem. This method is to add the configuration parameters directly to the POM file
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.4.0</version>
<!-- Add-->
<configuration>
<displayCmd>true</displayCmd>
<jvmArgs>
<jvmArg>-Xss20m</jvmArg>
</jvmArgs>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
Read More:
- [Solved] scala Error: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:exe
- IDEA reports an error. Error XXX reports an error. The class cannot be found
- An error was reported when Maven package was running the packaged jar package: there is no main list attribute in xxx.jar, which can be solved by configuring Maven plugin
- [Solved] A needed class was not found. This could be due to an error in your runpath. Missing class: scala/co
- Springboot package error: failed to execute goal org.apache.maven.plugins:maven-resources-plugin: 3.2.0…
- The Ajax return value reports an error, and the spring boot development Ajax return value reports an error
- [Solved] presto Compile Error: Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.0.0:check
- How to Solve Error in importing scala word2vecmodel
- Error:scalac: Scala compiler JARs not found [How to Solve]
- IDEA Create Scala Project Error: scalac: Error: Error compiling the sbt component ‘compiler-interface-2.10.0-52.0‘
- Android studio reports an error when running the main() method
- [Solved] Jquery addclass reports an error under Firefox
- IDEA reports an error Could not reserve enough space for xxxxKB object heap processing
- [Solved] Laravel reports an error when executing composer update
- [kubernetes] the pod instance of calico node always reports an error and restarts
- Spark Error: java.lang.StackOverflowError [How to Solve]
- The index.nvue page of uniapp reports an error about CSS
- Log4j2 reports ERROR StatusLogger Unrecognized format specifier
- mybatis-plus calls its own selectById method and reports an error: org.apache.ibatis.binding.BindingException:
- Git under Windows reports an error: warning: LF will be replaced by CRLF in ××××.××