groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cédric Champeau <cedric.champ...@gmail.com>
Subject Re: A reminder about how things are compiled
Date Thu, 28 Dec 2017 16:23:13 GMT
Nope, but I see you're using JDK 9. Maybe that's the reason.

2017-12-28 17:21 GMT+01:00 Daniel Sun <realbluesun@hotmail.com>:

> Hi  Cédric,
>
>       I imported Groovy project into IntelliJ IDEA via opening
> build.gradle,
> but failed to run single test via click the "Run" button.
>
>       Here are the error message:
>
> Information:javac 9.0.1 was used to compile java sources
> Information:2017/12/29 0:06 - Compilation completed with 9 errors and 32
> warnings in 1m 31s 502ms
> Error:Groovyc: While compiling groovy_main: java.lang.RuntimeException:
> java.lang.NoClassDefFoundError: Unable to load class
> org.codehaus.groovy.runtime.DateGroovyMethods due to missing dependency
> java/sql/Date
>
>       Have you ever encountered some compilation issue like this?
>
> Cheers,
> Daniel.Sun
> -----------------------------------------------
> Information:javac 9.0.1 was used to compile java sources
> Information:2017/12/29 0:06 - Compilation completed with 9 errors and 32
> warnings in 1m 31s 502ms
> Error:Groovyc: While compiling groovy_main: java.lang.RuntimeException:
> java.lang.NoClassDefFoundError: Unable to load class
> org.codehaus.groovy.runtime.DateGroovyMethods due to missing dependency
> java/sql/Date
>         at
> org.codehaus.groovy.control.CompilationUnit.convertUncaughtExceptionToComp
> ilationError(CompilationUnit.java:1123)
>         at
> org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(
> CompilationUnit.java:1101)
>         at
> org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(
> CompilationUnit.java:631)
>         at
> org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(
> CompilationUnit.java:609)
>         at
> org.codehaus.groovy.control.CompilationUnit.compile(
> CompilationUnit.java:586)
>         at
> org.jetbrains.groovy.compiler.rt.GroovyCompilerWrapper.
> compile(GroovyCompilerWrapper.java:62)
>         at
> org.jetbrains.groovy.compiler.rt.DependentGroovycRunner.runGroovyc(
> DependentGroovycRunner.java:115)
>         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.
> invoke0(Native
> Method)
>         at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62)
>         at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
>         at java.base/java.lang.reflect.Method.invoke(Method.java:564)
>         at
> org.jetbrains.groovy.compiler.rt.GroovycRunner.intMain2(
> GroovycRunner.java:136)
>         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.
> invoke0(Native
> Method)
>         at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62)
>         at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
>         at java.base/java.lang.reflect.Method.invoke(Method.java:564)
>         at
> org.jetbrains.jps.incremental.groovy.InProcessGroovyc.
> runGroovycInThisProcess(InProcessGroovyc.java:158)
>         at
> org.jetbrains.jps.incremental.groovy.InProcessGroovyc.lambda$runGroovyc$0(
> InProcessGroovyc.java:88)
>         at java.base/java.util.concurrent.FutureTask.run(
> FutureTask.java:264)
>         at
> java.base/java.util.concurrent.ThreadPoolExecutor.
> runWorker(ThreadPoolExecutor.java:1167)
>         at
> java.base/java.util.concurrent.ThreadPoolExecutor$
> Worker.run(ThreadPoolExecutor.java:641)
>         at java.base/java.lang.Thread.run(Thread.java:844)
> Caused by: java.lang.NoClassDefFoundError: Unable to load class
> org.codehaus.groovy.runtime.DateGroovyMethods due to missing dependency
> java/sql/Date
>         at org.codehaus.groovy.vmplugin.v5.Java5.configureClassNode(
> Java5.java:400)
>         at org.codehaus.groovy.ast.ClassNode.lazyClassInit(
> ClassNode.java:283)
>         at org.codehaus.groovy.ast.ClassNode.getMethods(
> ClassNode.java:408)
>         at
> org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport$
> ExtensionMethodCache.scanClassesForDGMMethods(StaticTypeCheckingSupport.
> java:2242)
>         at
> org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport$
> ExtensionMethodCache.getDGMMethods(StaticTypeCheckingSupport.java:2233)
>         at
> org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport$
> ExtensionMethodCache.access$100(StaticTypeCheckingSupport.java:2164)
>         at
> org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport$
> ExtensionMethodCache$1.provide(StaticTypeCheckingSupport.java:2192)
>         at
> org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport$
> ExtensionMethodCache$1.provide(StaticTypeCheckingSupport.java:2170)
>         at
> org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache.getAndPut(
> ConcurrentCommonCache.java:138)
>         at
> org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache.getAndPut(
> ConcurrentCommonCache.java:113)
>         at
> org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport$
> ExtensionMethodCache.getExtensionMethods(StaticTypeCheckingSupport.
> java:2168)
>         at
> org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.
> findDGMMethodsForClassNode(StaticTypeCheckingSupport.java:306)
>         at
> org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.
> findDGMMethodsForClassNode(StaticTypeCheckingSupport.java:292)
>         at
> org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.
> findDGMMethodsByNameAndArguments(StaticTypeCheckingSupport.java:1005)
>         at
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.findMethod(
> StaticTypeCheckingVisitor.java:4184)
>         at
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.
> visitConstructorCallExpression(StaticTypeCheckingVisitor.java:2056)
>         at
> org.codehaus.groovy.transform.sc.StaticCompilationVisitor.
> visitConstructorCallExpression(StaticCompilationVisitor.java:413)
>         at
> org.codehaus.groovy.ast.expr.ConstructorCallExpression.visit(
> ConstructorCallExpression.java:46)
>         at
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.
> visitBinaryExpression(StaticTypeCheckingVisitor.java:713)
>         at
> org.codehaus.groovy.ast.expr.BinaryExpression.visit(
> BinaryExpression.java:60)
>         at
> org.codehaus.groovy.ast.CodeVisitorSupport.visitExpressionStatement(
> CodeVisitorSupport.java:122)
>         at
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitExpressionStatement(
> ClassCodeVisitorSupport.java:197)
>         at
> org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(
> ExpressionStatement.java:42)
>         at
> org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(
> CodeVisitorSupport.java:88)
>         at
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(
> ClassCodeVisitorSupport.java:106)
>         at
> org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:71)
>         at
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(
> ClassCodeVisitorSupport.java:110)
>         at
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(
> ClassCodeVisitorSupport.java:121)
>         at
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.
> visitConstructorOrMethod(StaticTypeCheckingVisitor.java:1962)
>         at
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(
> ClassCodeVisitorSupport.java:132)
>         at
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.
> startMethodInference(StaticTypeCheckingVisitor.java:2317)
>         at
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethod(
> StaticTypeCheckingVisitor.java:2276)
>         at
> org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethod(
> StaticCompilationVisitor.java:224)
>         at org.codehaus.groovy.ast.ClassNode.visitContents(
> ClassNode.java:1095)
>         at
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(
> ClassCodeVisitorSupport.java:54)
>         at
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitClass(
> StaticTypeCheckingVisitor.java:378)
>         at
> org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitClass(
> StaticCompilationVisitor.java:182)
>         at
> org.codehaus.groovy.transform.sc.StaticCompileTransformation.visit(
> StaticCompileTransformation.java:67)
>         at
> org.codehaus.groovy.transform.ASTTransformationVisitor.visitClass(
> ASTTransformationVisitor.java:152)
>         at
> org.codehaus.groovy.transform.ASTTransformationVisitor$2.
> call(ASTTransformationVisitor.java:196)
>         at
> org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(
> CompilationUnit.java:1087)
>         ... 20 more
>
>
>
> --
> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
>

Mime
View raw message