29 mai 2014

GRAILS and java.lang.NoClassDefFoundError: org/codehaus/jackson/annotate/JacksonAnnotation

Working on a new grails 2.3.5 application, one (and only one) of my developers was stuck running the Grails application "run-app". The error occurs one time on two.
What makes it even more weird is that we all share the same development environnement configuration...


2014-05-28 11:13:24,920 [localhost-startStop-1] ERROR context.GrailsContextLoader  - Error initializing the application: Error creating bean with name 'annotationHandlerMapping': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/codehaus/jackson/annotate/JacksonAnnotation
Message: Error creating bean with name 'annotationHandlerMapping': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/codehaus/jackson/annotate/JacksonAnnotation
    Line | Method
->>  262 | run       in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    744 | run       in java.lang.Thread

Caused by NoClassDefFoundError: org/codehaus/jackson/annotate/JacksonAnnotation
->> 3178 | initAnnotationsIfNecessary in java.lang.Class
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   3137 | getAnnotation in     ''
|   3150 | isAnnotationPresent in     ''
|    262 | run       in java.util.concurrent.FutureTask
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run       in java.util.concurrent.ThreadPoolExecutor$Worker
^    744 | run . . . in java.lang.Thread

Caused by ClassNotFoundException: org.codehaus.jackson.annotate.JacksonAnnotation
->>  175 | findClass in org.codehaus.groovy.tools.RootLoader
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    425 | loadClass in java.lang.ClassLoader
|    147 | loadClass in org.codehaus.groovy.tools.RootLoader
|    358 | loadClass in java.lang.ClassLoader
|   3178 | initAnnotationsIfNecessary in java.lang.Class
|   3137 | getAnnotation in     ''
|   3150 | isAnnotationPresent in     ''
|    262 | run       in java.util.concurrent.FutureTask
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run       in java.util.concurrent.ThreadPoolExecutor$Worker

No clue in the dependency-report.
Not acceptable to clean and delete $HOME/.grails folder everytime he wants to run the application...

To solve it, just add the dependency !

compile "com.fasterxml.jackson.core:jackson-core:2.1.4"

That's it.

0 commentaires:

Enregistrer un commentaire

Fourni par Blogger.