Grails-core 2.4.x branch doesn't compile

50 views
Skip to first unread message

Iván López

unread,
Aug 10, 2014, 10:23:25 AM8/10/14
to grails-de...@googlegroups.com
Hello,

I want to compile grails-core to try to fix a bug and submit a PR but I cann't compile the branch 2.4.x. When I execute ./gradlew test it starts to download all dependencies and finally the process throws the following NoClassDefFoundError:

ivan@nobita ~/workspaces/grails-dev/grails-core $ ./gradlew test
:buildSrc:compileJava UP-TO-DATE
:buildSrc:compileGroovy UP-TO-DATE
:buildSrc:processResources UP-TO-DATE
:buildSrc:classes UP-TO-DATE
:buildSrc:jar UP-TO-DATE
:buildSrc:assemble UP-TO-DATE
:buildSrc:compileTestJava UP-TO-DATE
:buildSrc:compileTestGroovy UP-TO-DATE
:buildSrc:processTestResources UP-TO-DATE
:buildSrc:testClasses UP-TO-DATE
:buildSrc:test UP-TO-DATE
:buildSrc:check UP-TO-DATE
:buildSrc:build UP-TO-DATE
:grails-bootstrap:compileJava UP-TO-DATE
:grails-bootstrap:compileGroovy UP-TO-DATE
:grails-bootstrap:processResources UP-TO-DATE
:grails-bootstrap:classes UP-TO-DATE
:grails-bootstrap:compileUaaJava UP-TO-DATE
:grails-bootstrap:compileUaaGroovy UP-TO-DATE
:grails-bootstrap:jar UP-TO-DATE
:grails-aether:compileJava UP-TO-DATE
:grails-aether:compileGroovy UP-TO-DATE
:grails-aether:processResources UP-TO-DATE
:grails-aether:classes UP-TO-DATE
:grails-aether:compileTestJava UP-TO-DATE
:grails-aether:compileTestGroovy UP-TO-DATE
:grails-aether:processTestResources UP-TO-DATE
:grails-aether:testClasses UP-TO-DATE
:grails-aether:test UP-TO-DATE
:grails-async:compileJava UP-TO-DATE
:grails-async:compileGroovy UP-TO-DATE
:grails-async:processResources UP-TO-DATE
:grails-async:classes UP-TO-DATE
:grails-async:compileTestJava UP-TO-DATE
:grails-async:compileTestGroovy UP-TO-DATE
:grails-async:processTestResources UP-TO-DATE
:grails-async:testClasses UP-TO-DATE
:grails-async:test UP-TO-DATE
:grails-bootstrap:compileTestJava UP-TO-DATE
:grails-bootstrap:compileTestGroovy UP-TO-DATE
:grails-bootstrap:processTestResources UP-TO-DATE
:grails-bootstrap:testClasses UP-TO-DATE
:grails-bootstrap:test UP-TO-DATE
:grails-spring:compileJava UP-TO-DATE
:grails-spring:compileGroovy UP-TO-DATE
:grails-spring:processResources UP-TO-DATE
:grails-spring:classes UP-TO-DATE
:grails-spring:jar UP-TO-DATE
:grails-core:compileJava UP-TO-DATE
:grails-core:compileGroovy
startup failed:
General error during conversion: java.lang.NoClassDefFoundError: org/springframework/web/context/ServletContextAware

java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/springframework/web/context/ServletContextAware
at org.codehaus.groovy.control.CompilationUnit.convertUncaughtExceptionToCompilationError(CompilationUnit.java:1083)
at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1061)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:583)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:561)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:538)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:517)
at org.gradle.api.internal.tasks.compile.ApiGroovyCompiler.execute(ApiGroovyCompiler.java:119)
at org.gradle.api.internal.tasks.compile.ApiGroovyCompiler.execute(ApiGroovyCompiler.java:40)
at org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonServer.execute(CompilerDaemonServer.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:355)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NoClassDefFoundError: org/springframework/web/context/ServletContextAware
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
at org.gradle.internal.classloader.TransformingClassLoader.findClass(TransformingClassLoader.java:50)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:412)
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:655)
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:523)
at org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:183)
at org.codehaus.groovy.control.ClassNodeResolver.findClassNode(ClassNodeResolver.java:168)
at org.codehaus.groovy.control.ClassNodeResolver.resolveName(ClassNodeResolver.java:124)
at org.codehaus.groovy.control.ResolveVisitor.resolveToOuter(ResolveVisitor.java:617)
at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:269)
at org.codehaus.groovy.control.ResolveVisitor.resolveFromModule(ResolveVisitor.java:551)
at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:269)
at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:237)
at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:221)
at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:233)
at org.codehaus.groovy.control.ResolveVisitor.visitConstructorOrMethod(ResolveVisitor.java:163)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:123)
at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1063)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:50)
at org.codehaus.groovy.control.ResolveVisitoClass(ResolveVisitor.java:1202)
at org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:142)
at org.codehaus.groovy.tools.javac.JavaAwareCompilationUnit$1.call(JavaAwareCompilationUnit.java:67)
at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1047)
... 18 more
Caused by: java.lang.ClassNotFoundException: org.springframework.web.context.ServletContextAware
at org.gradle.internal.classloader.TransformingClassLoader.findClass(TransformingClassLoader.java:41)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 44 more

1 error

:grails-core:compileGroovy FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':grails-core:compileGroovy'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 18.411 secs


It seems that some dependecy is missing. Does anybody know what I have to do?

Regards, Iván.

Bobby Warner

unread,
Aug 10, 2014, 11:11:54 AM8/10/14
to grails-de...@googlegroups.com
Hi Iván,

The 2.4.x branch builds fine for me.  Can you please try these two commands?  Please let me know.

git clean -fdx

./gradlew --refresh-dependencies clean populateDependencies checkDuplicateDependencies install


Hope that helps!
Bobby

Iván López

unread,
Aug 10, 2014, 11:27:58 AM8/10/14
to grails-de...@googlegroups.com
Thank you very much Bobby, now it works.

I think there was a problem with old .class files. "./gradlew clean" did the trick.

Regards, Iván.



--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-disc...@googlegroups.com.
To post to this group, send email to grails-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/de0d5b8d-88cb-4e1c-9296-9ba663cbf06f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages