You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
A clear and concise description of the issue. We recommend using the latest snapshot builds to replicate the issue as bugs are constantly being fixed in the master branch
Using Groovy classes under native-image results in UnsupportedFeatureError .
Steps to reproduce the issue
Please include both build steps as well as run steps
GraalVM version (latest snapshot builds can be found here), or commit id if built from source: [e.g. EE 19.3, CE 20.0, CE 20.1.0-dev-20200304_0848]CE 22.3.0
JDK major version: [e.g.:8]11
OS: [e.g. macOS Catalina]Linux Ubuntu 22.04
Architecture: [e.g.: AMD64]AMD64
More details
Consider adding the --native-image-info and --verbose flags when building your native image and paste output below.
Add any other information about the problem here. Especially important are stack traces or log output. Feel free to link to gists or to screenshots if necessary.
I have followed the steps below to generate GraalVM reachability metadata directly through Native Build Tools Standard Mode.
./gradlew -Pagent clean test
./gradlew metadataCopy --task test
> Task :nativeTest FAILED
JUnit Platform on Native Image - report
----------------------------------------
com.lingh.GroovyTest >assertEvaluateForArray() FAILED
com.lingh.GroovyTest >assertEvaluateForRange() FAILED
com.lingh.GroovyTest >assertEvaluateForLiteral() FAILED
com.lingh.GroovyTest >assertEvaluateForExpressionIsNull() SUCCESSFUL
com.lingh.GroovyTest >assertEvaluateForLong() FAILED
com.lingh.GroovyTest >assertEvaluateForNull() FAILED
com.lingh.GroovyTest >assertEvaluateForComplex() FAILED
com.lingh.GroovyTest >assertEvaluateForCalculate() FAILED
com.lingh.GroovyTest >assertEvaluateForExpressionPlaceHolder() FAILED
com.lingh.GroovyTest >assertHandlePlaceHolder() SUCCESSFUL
com.lingh.GroovyTest >assertEvaluateClosure() FAILED
com.lingh.GroovyTest >assertEvaluateForSimpleString() FAILED
Failures (10):
JUnit Jupiter:GroovyTest:assertEvaluateForArray()
MethodSource [className ='com.lingh.GroovyTest', methodName ='assertEvaluateForArray', methodParameterTypes ='']
=> com.oracle.svm.core.jdk.UnsupportedFeatureError: No classes have been predefined during the image build to load from bytecodes at runtime.
org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:89)
org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.PredefinedClassesSupport.throwNoBytecodeClasses(PredefinedClassesSupport.java:76)
org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.PredefinedClassesSupport.loadClass(PredefinedClassesSupport.java:130)
[email protected]/java.lang.ClassLoader.defineClass(ClassLoader.java:294)
[email protected]/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
groovy.lang.GroovyClassLoader.access$400(GroovyClassLoader.java:89)
groovy.lang.GroovyClassLoader$ClassCollector.createClass(GroovyClassLoader.java:690)
groovy.lang.GroovyClassLoader$ClassCollector.onClassNode(GroovyClassLoader.java:707)
groovy.lang.GroovyClassLoader$ClassCollector.call(GroovyClassLoader.java:712)
org.codehaus.groovy.control.CompilationUnit$3.call(CompilationUnit.java:806)
[...]
JUnit Jupiter:GroovyTest:assertEvaluateForRange()
MethodSource [className ='com.lingh.GroovyTest', methodName ='assertEvaluateForRange', methodParameterTypes ='']
=> com.oracle.svm.core.jdk.UnsupportedFeatureError: No classes have been predefined during the image build to load from bytecodes at runtime.
org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:89)
org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.PredefinedClassesSupport.throwNoBytecodeClasses(PredefinedClassesSupport.java:76)
org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.PredefinedClassesSupport.loadClass(PredefinedClassesSupport.java:130)
[email protected]/java.lang.ClassLoader.defineClass(ClassLoader.java:294)
[email protected]/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
groovy.lang.GroovyClassLoader.access$400(GroovyClassLoader.java:89)
groovy.lang.GroovyClassLoader$ClassCollector.createClass(GroovyClassLoader.java:690)
groovy.lang.GroovyClassLoader$ClassCollector.onClassNode(GroovyClassLoader.java:707)
groovy.lang.GroovyClassLoader$ClassCollector.call(GroovyClassLoader.java:712)
org.codehaus.groovy.control.CompilationUnit$3.call(CompilationUnit.java:806)
[...]
JUnit Jupiter:GroovyTest:assertEvaluateForLiteral()
MethodSource [className ='com.lingh.GroovyTest', methodName ='assertEvaluateForLiteral', methodParameterTypes ='']
=> com.oracle.svm.core.jdk.UnsupportedFeatureError: No classes have been predefined during the image build to load from bytecodes at runtime.
org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:89)
org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.PredefinedClassesSupport.throwNoBytecodeClasses(PredefinedClassesSupport.java:76)
org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.PredefinedClassesSupport.loadClass(PredefinedClassesSupport.java:130)
[email protected]/java.lang.ClassLoader.defineClass(ClassLoader.java:294)
[email protected]/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
groovy.lang.GroovyClassLoader.access$400(GroovyClassLoader.java:89)
groovy.lang.GroovyClassLoader$ClassCollector.createClass(GroovyClassLoader.java:690)
groovy.lang.GroovyClassLoader$ClassCollector.onClassNode(GroovyClassLoader.java:707)
groovy.lang.GroovyClassLoader$ClassCollector.call(GroovyClassLoader.java:712)
org.codehaus.groovy.control.CompilationUnit$3.call(CompilationUnit.java:806)
[...]
JUnit Jupiter:GroovyTest:assertEvaluateForLong()
MethodSource [className ='com.lingh.GroovyTest', methodName ='assertEvaluateForLong', methodParameterTypes ='']
=> com.oracle.svm.core.jdk.UnsupportedFeatureError: No classes have been predefined during the image build to load from bytecodes at runtime.
org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:89)
org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.PredefinedClassesSupport.throwNoBytecodeClasses(PredefinedClassesSupport.java:76)
org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.PredefinedClassesSupport.loadClass(PredefinedClassesSupport.java:130)
[email protected]/java.lang.ClassLoader.defineClass(ClassLoader.java:294)
[email protected]/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
groovy.lang.GroovyClassLoader.access$400(GroovyClassLoader.java:89)
groovy.lang.GroovyClassLoader$ClassCollector.createClass(GroovyClassLoader.java:690)
groovy.lang.GroovyClassLoader$ClassCollector.onClassNode(GroovyClassLoader.java:707)
groovy.lang.GroovyClassLoader$ClassCollector.call(GroovyClassLoader.java:712)
org.codehaus.groovy.control.CompilationUnit$3.call(CompilationUnit.java:806)
[...]
JUnit Jupiter:GroovyTest:assertEvaluateForNull()
MethodSource [className ='com.lingh.GroovyTest', methodName ='assertEvaluateForNull', methodParameterTypes ='']
=> com.oracle.svm.core.jdk.UnsupportedFeatureError: No classes have been predefined during the image build to load from bytecodes at runtime.
org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:89)
org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.PredefinedClassesSupport.throwNoBytecodeClasses(PredefinedClassesSupport.java:76)
org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.PredefinedClassesSupport.loadClass(PredefinedClassesSupport.java:130)
[email protected]/java.lang.ClassLoader.defineClass(ClassLoader.java:294)
[email protected]/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
groovy.lang.GroovyClassLoader.access$400(GroovyClassLoader.java:89)
groovy.lang.GroovyClassLoader$ClassCollector.createClass(GroovyClassLoader.java:690)
groovy.lang.GroovyClassLoader$ClassCollector.onClassNode(GroovyClassLoader.java:707)
groovy.lang.GroovyClassLoader$ClassCollector.call(GroovyClassLoader.java:712)
org.codehaus.groovy.control.CompilationUnit$3.call(CompilationUnit.java:806)
[...]
JUnit Jupiter:GroovyTest:assertEvaluateForComplex()
MethodSource [className ='com.lingh.GroovyTest', methodName ='assertEvaluateForComplex', methodParameterTypes ='']
=> com.oracle.svm.core.jdk.UnsupportedFeatureError: No classes have been predefined during the image build to load from bytecodes at runtime.
org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:89)
org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.PredefinedClassesSupport.throwNoBytecodeClasses(PredefinedClassesSupport.java:76)
org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.PredefinedClassesSupport.loadClass(PredefinedClassesSupport.java:130)
[email protected]/java.lang.ClassLoader.defineClass(ClassLoader.java:294)
[email protected]/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
groovy.lang.GroovyClassLoader.access$400(GroovyClassLoader.java:89)
groovy.lang.GroovyClassLoader$ClassCollector.createClass(GroovyClassLoader.java:690)
groovy.lang.GroovyClassLoader$ClassCollector.onClassNode(GroovyClassLoader.java:707)
groovy.lang.GroovyClassLoader$ClassCollector.call(GroovyClassLoader.java:712)
org.codehaus.groovy.control.CompilationUnit$3.call(CompilationUnit.java:806)
[...]
JUnit Jupiter:GroovyTest:assertEvaluateForCalculate()
MethodSource [className ='com.lingh.GroovyTest', methodName ='assertEvaluateForCalculate', methodParameterTypes ='']
=> com.oracle.svm.core.jdk.UnsupportedFeatureError: No classes have been predefined during the image build to load from bytecodes at runtime.
org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:89)
org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.PredefinedClassesSupport.throwNoBytecodeClasses(PredefinedClassesSupport.java:76)
org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.PredefinedClassesSupport.loadClass(PredefinedClassesSupport.java:130)
[email protected]/java.lang.ClassLoader.defineClass(ClassLoader.java:294)
[email protected]/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
groovy.lang.GroovyClassLoader.access$400(GroovyClassLoader.java:89)
groovy.lang.GroovyClassLoader$ClassCollector.createClass(GroovyClassLoader.java:690)
groovy.lang.GroovyClassLoader$ClassCollector.onClassNode(GroovyClassLoader.java:707)
groovy.lang.GroovyClassLoader$ClassCollector.call(GroovyClassLoader.java:712)
org.codehaus.groovy.control.CompilationUnit$3.call(CompilationUnit.java:806)
[...]
JUnit Jupiter:GroovyTest:assertEvaluateForExpressionPlaceHolder()
MethodSource [className ='com.lingh.GroovyTest', methodName ='assertEvaluateForExpressionPlaceHolder', methodParameterTypes ='']
=> com.oracle.svm.core.jdk.UnsupportedFeatureError: No classes have been predefined during the image build to load from bytecodes at runtime.
org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:89)
org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.PredefinedClassesSupport.throwNoBytecodeClasses(PredefinedClassesSupport.java:76)
org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.PredefinedClassesSupport.loadClass(PredefinedClassesSupport.java:130)
[email protected]/java.lang.ClassLoader.defineClass(ClassLoader.java:294)
[email protected]/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
groovy.lang.GroovyClassLoader.access$400(GroovyClassLoader.java:89)
groovy.lang.GroovyClassLoader$ClassCollector.createClass(GroovyClassLoader.java:690)
groovy.lang.GroovyClassLoader$ClassCollector.onClassNode(GroovyClassLoader.java:707)
groovy.lang.GroovyClassLoader$ClassCollector.call(GroovyClassLoader.java:712)
org.codehaus.groovy.control.CompilationUnit$3.call(CompilationUnit.java:806)
[...]
JUnit Jupiter:GroovyTest:assertEvaluateClosure()
MethodSource [className ='com.lingh.GroovyTest', methodName ='assertEvaluateClosure', methodParameterTypes ='']
=> com.oracle.svm.core.jdk.UnsupportedFeatureError: No classes have been predefined during the image build to load from bytecodes at runtime.
org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:89)
org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.PredefinedClassesSupport.throwNoBytecodeClasses(PredefinedClassesSupport.java:76)
org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.PredefinedClassesSupport.loadClass(PredefinedClassesSupport.java:130)
[email protected]/java.lang.ClassLoader.defineClass(ClassLoader.java:294)
[email protected]/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
groovy.lang.GroovyClassLoader.access$400(GroovyClassLoader.java:89)
groovy.lang.GroovyClassLoader$ClassCollector.createClass(GroovyClassLoader.java:690)
groovy.lang.GroovyClassLoader$ClassCollector.onClassNode(GroovyClassLoader.java:707)
groovy.lang.GroovyClassLoader$ClassCollector.call(GroovyClassLoader.java:712)
org.codehaus.groovy.control.CompilationUnit$3.call(CompilationUnit.java:806)
[...]
JUnit Jupiter:GroovyTest:assertEvaluateForSimpleString()
MethodSource [className ='com.lingh.GroovyTest', methodName ='assertEvaluateForSimpleString', methodParameterTypes ='']
=> com.oracle.svm.core.jdk.UnsupportedFeatureError: No classes have been predefined during the image build to load from bytecodes at runtime.
org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:89)
org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.PredefinedClassesSupport.throwNoBytecodeClasses(PredefinedClassesSupport.java:76)
org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.PredefinedClassesSupport.loadClass(PredefinedClassesSupport.java:130)
[email protected]/java.lang.ClassLoader.defineClass(ClassLoader.java:294)
[email protected]/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
groovy.lang.GroovyClassLoader.access$400(GroovyClassLoader.java:89)
groovy.lang.GroovyClassLoader$ClassCollector.createClass(GroovyClassLoader.java:690)
groovy.lang.GroovyClassLoader$ClassCollector.onClassNode(GroovyClassLoader.java:707)
groovy.lang.GroovyClassLoader$ClassCollector.call(GroovyClassLoader.java:712)
org.codehaus.groovy.control.CompilationUnit$3.call(CompilationUnit.java:806)
[...]
Test run finished after 49 ms
[ 2 containers found ]
[ 0 containers skipped ]
[ 2 containers started ]
[ 0 containers aborted ]
[ 2 containers successful ]
[ 0 containers failed ]
[ 12 tests found ]
[ 0 tests skipped ]
[ 12 tests started ]
[ 0 tests aborted ]
[ 2 tests successful ]
[ 10 tests failed ]
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':nativeTest'.
> Process 'command '/home/linghengqian/TwinklingLiftWorks/git/public/groovy-unsupport-graalvm-test/build/native/nativeTestCompile/groovy-unsupport-graalvm-test-tests'' finished with non-zero exit value 1
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 39s
8 actionable tasks: 8 executed
Of course I know about truffle espresso, but even with espresso I don't seem to be able to use groovyshell properly, I don't know if there is an example of this. For javascript and java, it behaves fine under graalvm native image via truffle.
The text was updated successfully, but these errors were encountered:
linghengqian
changed the title
Using Groovy classes under native-image results in AnalysisError$ParsingError
Using Groovy classes under native-image results in UnsupportedFeatureErrorNov 29, 2022
wirthi
changed the title
Using Groovy classes under native-image results in UnsupportedFeatureError
[GR-43010] Using Groovy classes under native-image results in UnsupportedFeatureErrorApr 29, 2024
Describe the issue
A clear and concise description of the issue. We recommend using the latest snapshot builds to replicate the issue as bugs are constantly being fixed in the master branch
UnsupportedFeatureError
.Steps to reproduce the issue
Please include both build steps as well as run steps
Describe GraalVM and your environment:
CE 22.3.0
11
Linux Ubuntu 22.04
AMD64
More details
Consider adding the
--native-image-info
and--verbose
flags when building your native image and paste output below.Add any other information about the problem here. Especially important are stack traces or log output. Feel free to link to gists or to screenshots if necessary.
The text was updated successfully, but these errors were encountered: