pom.xml file throws java.lang.StackOverflowError" when project is reloaded like project-->Maven-->Reload project

114 views Asked by At

I have an maven appium, testNG, cucumber project which is running fine, but when pom.xml is changed and project-->Maven-->Reload project, it is showing simply one line error with out a stack trace. I am using JDK 17.0.7, maven 3.8.3, testng 7.8.0

    - Sync-->
     - pom.xml (1 error)-->
        - java.lang.StackOverflowError

Also in a separate post I reported a problem, where, none of the pom.xml file dependencies are being taken, and shown as non existing

1

There are 1 answers

0
gogognome On

I use JDK 17.0.7 and IntelliJ 2023.3.4 (Ultimate Edition). I sometimes get this error:

java: An exception has occurred in the compiler (17.0.7). Please file a bug against the Java compiler via the Java bug reporting page (https://bugreport.java.com) after checking the Bug Database (https://bugs.java.com) for duplicates. Include your program, the following diagnostic, and the parameters passed to the Java compiler in your report. Thank you.
java: java.lang.StackOverflowError
java:   at jdk.compiler/com.sun.tools.javac.code.Type$TypeVar.accept(Type.java:1681)
java:   at jdk.compiler/com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:4900)
java:   at jdk.compiler/com.sun.tools.javac.code.Type$StructuralTypeMapping.visitArrayType(Type.java:280)
java:   at jdk.compiler/com.sun.tools.javac.code.Type$StructuralTypeMapping.visitArrayType(Type.java:244)
java:   at jdk.compiler/com.sun.tools.javac.code.Type$ArrayType.accept(Type.java:1336)
java:   at jdk.compiler/com.sun.tools.javac.code.Type.map(Type.java:324)
java:   at jdk.compiler/com.sun.tools.javac.code.Types.subst(Types.java:3319)
java:   at jdk.compiler/com.sun.tools.javac.comp.InferenceContext.asUndetVar(InferenceContext.java:208)
java:   at jdk.compiler/com.sun.tools.javac.comp.Resolve$MethodCheckContext.compatible(Resolve.java:1036)
java:   at jdk.compiler/com.sun.tools.javac.comp.Check.checkType(Check.java:614)
java:   at jdk.compiler/com.sun.tools.javac.comp.Attr$ResultInfo.check(Attr.java:530)
java:   at jdk.compiler/com.sun.tools.javac.comp.Resolve$MethodResultInfo.check(Resolve.java:1083)
java:   at jdk.compiler/com.sun.tools.javac.comp.Resolve$4.checkArg(Resolve.java:903)
java:   at jdk.compiler/com.sun.tools.javac.comp.Resolve$AbstractMethodCheck.argumentsAcceptable(Resolve.java:791)
java:   at jdk.compiler/com.sun.tools.javac.comp.Resolve$4.argumentsAcceptable(Resolve.java:912)
java:   at jdk.compiler/com.sun.tools.javac.comp.Infer.instantiateMethod(Infer.java:182)
java:   at jdk.compiler/com.sun.tools.javac.comp.Resolve.rawInstantiate(Resolve.java:621)
java:   at jdk.compiler/com.sun.tools.javac.comp.Resolve.selectBest(Resolve.java:1582)
java:   at jdk.compiler/com.sun.tools.javac.comp.Resolve.findMethodInScope(Resolve.java:1788)
java:   at jdk.compiler/com.sun.tools.javac.comp.Resolve.findMethod(Resolve.java:1858)
java:   at jdk.compiler/com.sun.tools.javac.comp.Resolve.findMethod(Resolve.java:1832)
java:   at jdk.compiler/com.sun.tools.javac.comp.Resolve$11.doLookup(Resolve.java:2747)
java:   at jdk.compiler/com.sun.tools.javac.comp.Resolve$BasicLookupHelper.lookup(Resolve.java:3464)
java:   at jdk.compiler/com.sun.tools.javac.comp.Resolve.lookupMethod(Resolve.java:3716)
java:   at jdk.compiler/com.sun.tools.javac.comp.Resolve.resolveQualifiedMethod(Resolve.java:2744)
java:   at jdk.compiler/com.sun.tools.javac.comp.Resolve.resolveQualifiedMethod(Resolve.java:2738)
java:   at jdk.compiler/com.sun.tools.javac.comp.Attr.selectSym(Attr.java:4417)
java:   at jdk.compiler/com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:4297)
java:   at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:2450)
java:   at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:677)
java:   at jdk.compiler/com.sun.tools.javac.comp.Attr.visitApply(Attr.java:2567)
java:   at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1797)
java:   at jdk.compiler/com.sun.tools.javac.comp.DeferredAttr.attribSpeculative(DeferredAttr.java:500)
java:   at jdk.compiler/com.sun.tools.javac.comp.DeferredAttr.attribSpeculative(DeferredAttr.java:480)
java:   at jdk.compiler/com.sun.tools.javac.comp.DeferredAttr.attribSpeculative(DeferredAttr.java:467)
java:   at jdk.compiler/com.sun.tools.javac.comp.ArgumentAttr.lambda$processArg$0(ArgumentAttr.java:220)
java:   at jdk.compiler/com.sun.tools.javac.comp.ArgumentAttr.processArg(ArgumentAttr.java:242)
java:   at jdk.compiler/com.sun.tools.javac.comp.ArgumentAttr.processArg(ArgumentAttr.java:219)
java:   at jdk.compiler/com.sun.tools.javac.comp.ArgumentAttr.visitApply(ArgumentAttr.java:313)
java:   at jdk.compiler/com.sun.tools.javac.comp.ArgumentAttr.attribArg(ArgumentAttr.java:197)
java:   at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:675)
java:   at jdk.compiler/com.sun.tools.javac.comp.Attr.attribArgs(Attr.java:778)
java:   at jdk.compiler/com.sun.tools.javac.comp.Attr.visitApply(Attr.java:2558)
java:   at jdk.compiler/com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:4269)
java: Compilation failed: internal java compiler error

This typically happens when I build the project after having made a few changes. A rebuild of the project succeeds.

I guess the original poster has a similar StackOverflowError.

When I try to search for StackOverflowError in the bug database, I am redirected to a site of Oracle, which does not seem to be related to a bug database...

So when you use Maven, perhaps doing a clean before compiling the code makes a difference?

So perhaps this does not answer the question exactly, but hopefully the stack trace gives other people a clue of the cause of the problem.