Friday, July 24, 2015

java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/typehandling/ShortTypeHandling

When I used the following command:

gradle build

I got the following exception:

FAILURE: Build failed with an exception.
             
* Where:    
Build file 'C:\Users\nbp\IdeaProjects\impression-neo\build.gradle' line: 101
             
* What went wrong:
Execution failed for task ':generateGitProperties'.
> java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/typehandling/ShortTypeHandling
             
* Try:      
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
             
BUILD FAILED

When I checked the Gradle version with the following command:

gradle -v

the result was as follows:

------------------------------------------------------------
Gradle 1.11
------------------------------------------------------------

Build time:   2014-02-11 11:34:39 UTC
Build number: none
Revision:     a831fa866d46cbee94e61a09af15f9dd95987421

Groovy:       1.8.6
Ant:          Apache Ant(TM) version 1.9.2 compiled on July 8 2013
Ivy:          2.2.0
JVM:          1.8.0_05 (Oracle Corporation 25.5-b02)
OS:           Windows 7 6.1 amd64

When I upgraded Gradle to 2.5 as follows:

------------------------------------------------------------
Gradle 2.5
------------------------------------------------------------

Build time:   2015-07-08 07:38:37 UTC
Build number: none
Revision:     093765bccd3ee722ed5310583e5ed140688a8c2b

Groovy:       2.3.10
Ant:          Apache Ant(TM) version 1.9.3 compiled on December 23 2013
JVM:          1.8.0_05 (Oracle Corporation 25.5-b02)
OS:           Windows 7 6.1 amd64

the problem was solved.

I guess the problem was caused by the old version of Groovy.

No comments:

Post a Comment