Skip to content

Missing field: name: Ljava/lang/String; in Klass<Ljava/lang/Thread;> when try to run Java 8 on Espresso #10748

Open
@wschung1994

Description

@wschung1994

Describe the issue
After installing the Espresso on this page:

https://www.graalvm.org/latest/reference-manual/espresso/

When I run the command on the page to run java 8 on the downloaded espresso

java --java.JavaHome=/path/to/java8/home -version

I am getting the following error:

Internal error:
org.graalvm.polyglot.PolyglotException: com.oracle.truffle.espresso.meta.EspressoError: should not reach here: Missing field: name: Ljava/lang/String; in Klass<Ljava/lang/Thread;>
at com.oracle.truffle.espresso.impl.Klass.requireDeclaredField(Klass.java:1395)
at com.oracle.truffle.espresso.meta.Meta.(Meta.java:540)
at com.oracle.truffle.espresso.runtime.EspressoContext.spawnVM(EspressoContext.java:425)
at com.oracle.truffle.espresso.runtime.EspressoContext.initializeContext(EspressoContext.java:320)
at com.oracle.truffle.espresso.EspressoLanguage.initializeContext(EspressoLanguage.java:294)
at com.oracle.truffle.espresso.EspressoLanguage.initializeContext(EspressoLanguage.java:94)
at org.graalvm.truffle/com.oracle.truffle.api.TruffleLanguage$Env.postInit(TruffleLanguage.java:3927)
at org.graalvm.truffle/com.oracle.truffle.api.LanguageAccessor$LanguageImpl.postInitEnv(LanguageAccessor.java:288)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotLanguageContext.ensureInitialized(PolyglotLanguageContext.java:771)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotContextImpl.getBindings(PolyglotContextImpl.java:1467)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotContextDispatch.getBindings(PolyglotContextDispatch.java:95)
at org.graalvm.polyglot/org.graalvm.polyglot.Context.getBindings(Context.java:563)
at com.oracle.truffle.espresso.libjavavm.LibEspresso.createJavaVM(LibEspresso.java:81)
Suppressed: Attached Guest Language Frames (0)
Internal GraalVM error, please report at https://github.com/oracle/graal/issues/.

This is the java 8 version:

java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

I also tried the latest version Java 8 which can be downloaded:

java version "1.8.0_431"
Java(TM) SE Runtime Environment (build 1.8.0_431-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.431-b10, mixed mode)

In this case, I am getting the following error:

Error: A JNI error has occurred, please check your installation and try again

Steps to reproduce the issue
Please include both build steps as well as run steps

  1. Download the espresso for Linux on https://www.graalvm.org/latest/reference-manual/espresso/
  2. Download and install Java 8
  3. run the command "java --java.JavaHome=/path/to/java8/home -version"

Describe GraalVM and your environment:

  • GraalVM version (latest snapshot builds can be found here), or commit id if built from source: [CE 21.0.2+13.1]
  • JDK major version: [21.0.2]
  • OS: [Linux (ubuntu 22.4]
  • Architecture: [x64]

More details
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.

    PASTE YOUR LOG/STACK TRACE HERE

Internal error:
org.graalvm.polyglot.PolyglotException: com.oracle.truffle.espresso.meta.EspressoError: should not reach here: Missing field: name: Ljava/lang/String; in Klass<Ljava/lang/Thread;>
at com.oracle.truffle.espresso.impl.Klass.requireDeclaredField(Klass.java:1395)
at com.oracle.truffle.espresso.meta.Meta.(Meta.java:540)
at com.oracle.truffle.espresso.runtime.EspressoContext.spawnVM(EspressoContext.java:425)
at com.oracle.truffle.espresso.runtime.EspressoContext.initializeContext(EspressoContext.java:320)
at com.oracle.truffle.espresso.EspressoLanguage.initializeContext(EspressoLanguage.java:294)
at com.oracle.truffle.espresso.EspressoLanguage.initializeContext(EspressoLanguage.java:94)
at org.graalvm.truffle/com.oracle.truffle.api.TruffleLanguage$Env.postInit(TruffleLanguage.java:3927)
at org.graalvm.truffle/com.oracle.truffle.api.LanguageAccessor$LanguageImpl.postInitEnv(LanguageAccessor.java:288)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotLanguageContext.ensureInitialized(PolyglotLanguageContext.java:771)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotContextImpl.getBindings(PolyglotContextImpl.java:1467)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotContextDispatch.getBindings(PolyglotContextDispatch.java:95)
at org.graalvm.polyglot/org.graalvm.polyglot.Context.getBindings(Context.java:563)
at com.oracle.truffle.espresso.libjavavm.LibEspresso.createJavaVM(LibEspresso.java:81)
Suppressed: Attached Guest Language Frames (0)

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions