groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dimitry Polivaev (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GROOVY-8727) JDK 11 Compilation Failure: ClassVisitor.visitNestMemberExperimental throws UnsupportedOperationException
Date Mon, 03 Sep 2018 07:29:00 GMT

    [ https://issues.apache.org/jira/browse/GROOVY-8727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16601841#comment-16601841
] 

Dimitry Polivaev commented on GROOVY-8727:
------------------------------------------

Groovy 2.5.1 and 2.5.2 claim to support Java 11. Because of this issue effectively it does'nt.

I am developer of Freeplane ([https://sourceforge.net/projects/freeplane/)] which is a popular
Java desktop application which is supposed to run on any released Java version.

Here is a part of my exception stack trace:

 
{noformat}
java.lang.UnsupportedOperationException
    at groovyjarjarasm.asm.ClassVisitor.visitNestMemberExperimental(ClassVisitor.java:248)
    at groovyjarjarasm.asm.ClassReader.accept(ClassReader.java:651)
    at groovyjarjarasm.asm.ClassReader.accept(ClassReader.java:391)
    at org.codehaus.groovy.ast.decompiled.AsmDecompiler.parseClass(AsmDecompiler.java:83)
    at org.codehaus.groovy.control.ClassNodeResolver.findDecompiled(ClassNodeResolver.java:254)
    at org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:192)
    at org.codehaus.groovy.control.ClassNodeResolver.findClassNode(ClassNodeResolver.java:172)
    at org.codehaus.groovy.control.ClassNodeResolver.resolveName(ClassNodeResolver.java:128)
    at org.codehaus.groovy.control.ResolveVisitor.resolveToOuter(ResolveVisitor.java:744)
    at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:394)
    at org.codehaus.groovy.control.ResolveVisitor.resolveFromDefaultImports(ResolveVisitor.java:522)
    at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:392)
    at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:355)
    at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:339)
    at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:351)
    at org.codehaus.groovy.control.ResolveVisitor.transformConstructorCallExpression(ResolveVisitor.java:1141)
    at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:774)
    at org.codehaus.groovy.control.ResolveVisitor.transformMethodCallExpression(ResolveVisitor.java:1156)
    at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:770)
    at org.codehaus.groovy.control.ResolveVisitor.transformMethodCallExpression(ResolveVisitor.java:1156)
    at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:770)
    at org.codehaus.groovy.control.ResolveVisitor.transformBinaryExpression(ResolveVisitor.java:1048)
    at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:768)
    at org.codehaus.groovy.control.ResolveVisitor.transformBinaryExpression(ResolveVisitor.java:1109)
    at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:768)
    at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitExpressionStatement(ClassCodeExpressionTransformer.java:144)
    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.control.ResolveVisitor.visitBlockStatement(ResolveVisitor.java:1430)
    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.ast.ClassCodeExpressionTransformer.visitConstructorOrMethod(ClassCodeExpressionTransformer.java:55)
    at org.codehaus.groovy.control.ResolveVisitor.visitConstructorOrMethod(ResolveVisitor.java:249)
    at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:132)
    at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1103)
    at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:54)
    at org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:1375)
    at org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:222)
    at org.codehaus.groovy.control.CompilationUnit$13.call(CompilationUnit.java:691)
    at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:968)
    at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:633)
    at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:582)
    at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:354)
    at groovy.lang.GroovyClassLoader.access$300(GroovyClassLoader.java:87)
    at groovy.lang.GroovyClassLoader$5.provide(GroovyClassLoader.java:323)
    at groovy.lang.GroovyClassLoader$5.provide(GroovyClassLoader.java:320)
    at org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache.getAndPut(ConcurrentCommonCache.java:147)
    at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:318)
{noformat}
The exception is thrown when AsmDecompiler.parseClass is calles with argument "jrt:/java.base/java/io/File.class"
. It means that  currently embedded groovy running under Java 11 can not even compile any
script using standard java File class . 

Please consider creating a working stable version with a fix before Java 11 is released or
describe a work around.

 

> JDK 11 Compilation Failure: ClassVisitor.visitNestMemberExperimental throws UnsupportedOperationException

> ----------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-8727
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8727
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 2.5.2
>            Reporter: Misagh Moayyed
>            Priority: Major
>
> *Description:*
> Using JDK 11 and Gradle 4.9, the following compilation error is seen:
>  
> {code:java}
> > Task :core:cas-server-core-tickets:compileTestGroovy FAILED
> startup failed:
> General error during class generation: java.lang.UnsupportedOperationException
> java.lang.UnsupportedOperationException
> 	at groovyjarjarasm.asm.ClassVisitor.visitNestMemberExperimental(ClassVisitor.java:248)
> 	at groovyjarjarasm.asm.ClassReader.accept(ClassReader.java:651)
> 	at groovyjarjarasm.asm.ClassReader.accept(ClassReader.java:391)
> 	at org.codehaus.groovy.ast.decompiled.AsmDecompiler.parseClass(AsmDecompiler.java:83)
> 	at org.codehaus.groovy.control.ClassNodeResolver.findDecompiled(ClassNodeResolver.java:254)
> 	at org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:192)
> 	at org.codehaus.groovy.control.ClassNodeResolver.findClassNode(ClassNodeResolver.java:172)
> 	at org.codehaus.groovy.control.ClassNodeResolver.resolveName(ClassNodeResolver.java:128)
> 	at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveClassNullable(AsmReferenceResolver.java:59)
> 	at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveClass(AsmReferenceResolver.java:46)
> 	at org.codehaus.groovy.ast.decompiled.TypeSignatureParser.visitEnd(TypeSignatureParser.java:112)
> 	at groovyjarjarasm.asm.signature.SignatureReader.parseType(SignatureReader.java:206)
> 	at groovyjarjarasm.asm.signature.SignatureReader.parseType(SignatureReader.java:235)
> 	at groovyjarjarasm.asm.signature.SignatureReader.accept(SignatureReader.java:114)
> 	at org.codehaus.groovy.ast.decompiled.MemberSignatureParser.createMethodNode(MemberSignatureParser.java:95)
> 	at org.codehaus.groovy.ast.decompiled.DecompiledClassNode.lazyInitMembers(DecompiledClassNode.java:195)
> 	at org.codehaus.groovy.ast.decompiled.DecompiledClassNode.getMethods(DecompiledClassNode.java:103)
> 	at org.codehaus.groovy.ast.ClassNode.getMethods(ClassNode.java:399)
> 	at org.codehaus.groovy.classgen.AnnotationVisitor.checkIfMandatoryAnnotationValuesPassed(AnnotationVisitor.java:168)
> 	at org.codehaus.groovy.classgen.AnnotationVisitor.visit(AnnotationVisitor.java:80)
> 	at org.codehaus.groovy.classgen.ExtendedVerifier.visitAnnotation(ExtendedVerifier.java:311)
> 	at org.codehaus.groovy.classgen.ExtendedVerifier.visitAnnotations(ExtendedVerifier.java:157)
> 	at org.codehaus.groovy.classgen.ExtendedVerifier.visitConstructorOrMethod(ExtendedVerifier.java:112)
> 	at org.codehaus.groovy.classgen.ExtendedVerifier.visitMethod(ExtendedVerifier.java:108)
> 	at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1103)
> 	at org.codehaus.groovy.classgen.ExtendedVerifier.visitClass(ExtendedVerifier.java:91)
> 	at org.codehaus.groovy.control.CompilationUnit$18.call(CompilationUnit.java:827)
> 	at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1087)
> 	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.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:565)
> 	at org.gradle.api.internal.tasks.compile.ApiGroovyCompiler.execute(ApiGroovyCompiler.java:179)
> 	at org.gradle.api.internal.tasks.compile.ApiGroovyCompiler.execute(ApiGroovyCompiler.java:57)
> 	at org.gradle.api.internal.tasks.compile.GroovyCompilerFactory$DaemonSideCompiler.execute(GroovyCompilerFactory.java:77)
> 	at org.gradle.api.internal.tasks.compile.GroovyCompilerFactory$DaemonSideCompiler.execute(GroovyCompilerFactory.java:65)
> 	at org.gradle.api.internal.tasks.compile.daemon.AbstractDaemonCompiler$CompilerCallable.call(AbstractDaemonCompiler.java:88)
> 	at org.gradle.api.internal.tasks.compile.daemon.AbstractDaemonCompiler$CompilerCallable.call(AbstractDaemonCompiler.java:76)
> 	at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:42)
> 	at org.gradle.workers.internal.WorkerDaemonServer.execute(WorkerDaemonServer.java:46)
> 	at org.gradle.workers.internal.WorkerDaemonServer.execute(WorkerDaemonServer.java:30)
> 	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:566)
> 	at org.gradle.process.internal.worker.request.WorkerAction.run(WorkerAction.java:101)
> 	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:566)
> 	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
> 	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
> 	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:155)
> 	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:137)
> 	at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404)
> 	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
> 	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
> 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> 	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
> 	at java.base/java.lang.Thread.run(Thread.java:834)
> 1 error
> {code}
> *Logs:*
> Full output of the failure can be seen at: [https://travis-ci.org/apereo/cas/jobs/409569424]
>  
> *To duplicate:*
>  # Install JDK 11
>  # Clone the branch below
>  # 
> {code:java}
> git clone depth 1 --single-branch branch=travis-ci-jdk11 git@github.com:apereo/cas.git{code}
>  # 
> {code:java}
> Execute the following command as does Travis CI:
> ./gradlew --stacktrace --build-cache --configure-on-demand --no-daemon build -x test
-x javadoc -x check -DskipNpmLint=true -DskipNestedConfigMetadataGen=true --parallel{code}
> The failure should occur in:
> {code:java}
> :core:cas-server-core-tickets:compileTestGroovy FAILED{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message