apache / apache/grails-intellij-plugin

Groovy-Eclipse Support for groovy 2.4.3 has compiling issues

Open
#207 0 comments 0 reactions 0 assignees View on GitHub
bug imported-from-youtrack
Dominant language
Java
Stars
17
Forks
4
Avg merge
5d 15h
Merged PRs (30d)
4

Description

First I tried to compile my project with this new compiler and unfortunately I get various errors (always the same) but in different classes. These classes also all seem to be Spock spec. So, to give it another go I created an empty grails 2.5 project and added a test class. The result was the same. Below is that I found on the Intellij logs:

2015-07-06 13:35:18,677 [13475148] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: General error during canonicalization: java.lang.NoClassDefFoundError: junit/framework/TestCase
2015-07-06 13:35:18,677 [13475148] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: java.lang.RuntimeException: java.lang.NoClassDefFoundError: junit/framework/TestCase
2015-07-06 13:35:18,677 [13475148] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: at org.codehaus.groovy.control.CompilationUnit.convertUncaughtExceptionToCompilationError(CompilationUnit.java:1257)

Followed by:

2015-07-06 13:35:18,678 [13475149] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.grails.compiler.injection.test.MockTransformation
2015-07-06 13:35:18,678 [13475149] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
2015-07-06 13:35:18,678 [13475149] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
2015-07-06 13:35:18,678 [13475149] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
2015-07-06 13:35:18,678 [13475149] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
2015-07-06 13:35:18,678 [13475149] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: at java.lang.Class.newInstance(Class.java:383)
2015-07-06 13:35:18,678 [13475149] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: at org.codehaus.groovy.transform.ASTTransformationVisitor.visitClass(ASTTransformationVisitor.java:99)
2015-07-06 13:35:18,678 [13475149] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: at org.codehaus.groovy.transform.ASTTransformationVisitor$2.call(ASTTransformationVisitor.java:227)
2015-07-06 13:35:18,678 [13475149] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1221)
2015-07-06 13:35:18,678 [13475149] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: ... 32 more

If I just switch the the normal javac compiler, then all is fine and no error appears.

I am using Intellij 14.1.3

---

*Imported from [IDEA-142447](https://youtrack.jetbrains.com/issue/IDEA-142447) · Type: Bug · Votes: 1*
*Comments, attachments, dates and reporter are not part of the export — follow the link above for the full history.*

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the NoClassDefFoundError in the empty Grails 2.5 project with IntelliJ 14.1.3 and Groovy-Eclipse, then compare the result with the normal javac compiler. Done means the Grails test project compiles without the junit/framework/TestCase or MockTransformation errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy, java
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.