Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraalVM 21 not recognized #603

Open
30atm opened this issue Oct 2, 2023 · 4 comments
Open

GraalVM 21 not recognized #603

30atm opened this issue Oct 2, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@30atm
Copy link

30atm commented Oct 2, 2023

I have GraalVM for JDK 21 installed.
It seems there is an issue with
https://github.com/metaforte/es4x/blob/develop/pm/src/main/java/io/reactiverse/es4x/cli/GraalVMVersion.java

I tried to change the regular expression and I compiled the es4x-pm-0.20.0.jar locally and copied my local snapshot jar into my node_modules.

I still get an error when I run the postgres example

$npm start

[email protected] start
es4x

Runtime GraalVM version mismatch { wanted: [22.3.2], provided: [21.35.1] }
For installation help see: https://www.graalvm.org/docs/getting-started-with-graalvm/

$ java -version
openjdk version "21" 2023-09-19
OpenJDK Runtime Environment GraalVM CE 21+35.1 (build 21+35-jvmci-23.1-b15)
OpenJDK 64-Bit Server VM GraalVM CE 21+35.1 (build 21+35-jvmci-23.1-b15, mixed mode, sharing)

@pmlopes
Copy link
Contributor

pmlopes commented Oct 4, 2023

Graal 21 is causing tests to fail. This could also signify further problems.

@pmlopes pmlopes added the bug Something isn't working label Oct 4, 2023
@30atm
Copy link
Author

30atm commented Oct 5, 2023

I tried latest graal 17. same error
Is it possible to consider setting a minimum version requirement instead of exact version?

java --version
java 17.0.8 2023-07-18 LTS
Java(TM) SE Runtime Environment Oracle GraalVM 17.0.8+9.1 (build 17.0.8+9-LTS-jvmci-23.0-b14)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 17.0.8+9.1 (build 17.0.8+9-LTS-jvmci-23.0-b14, mixed mode, sharing)

cd es4jx-postgres/
npm start

[email protected] start
es4x

Runtime GraalVM version mismatch { wanted: [22.3.2], provided: [0.0.0] }
For installation help see: https://www.graalvm.org/docs/getting-started-with-graalvm/

@30atm
Copy link
Author

30atm commented Oct 8, 2023

I tried to add an else case

      m = p.matcher("".equals(VENDOR_VERSION) ? VM_NAME : VENDOR_VERSION);
      if (m.find()) {
        YEAR = Integer.parseInt(m.group(1));
        RELEASE = Integer.parseInt(m.group(2));
        BUGFIX = Integer.parseInt(m.group(3));
      } else {
        p = Pattern.compile("jvmci\\-(\\d+)\\.(\\d+)\\-b(\\d+)");
        m = p.matcher(System.getProperty("java.vm.version"));
        if (m.find()) {
          YEAR = Integer.parseInt(m.group(1));
          RELEASE = Integer.parseInt(m.group(2));
          BUGFIX = Integer.parseInt(m.group(3));
        } else {
          YEAR = 0;
          RELEASE = 0;
          BUGFIX = 0;
        }
      }
    } else {
      YEAR = 0;
      RELEASE = 0;
      BUGFIX = 0;
    }

Now I get a different error


T E S T S

Running io.reactiverse.es4x.impl.ImportMapperTest
Can not find io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider in the classpath, fallback to system defaults. This may result in incorrect DNS resolutions on MacOS. Check whether you have a dependency on 'io.netty:netty-resolver-dns-native-macos'
Tests run: 7, Failures: 0, Errors: 7, Skipped: 0, Time elapsed: 0.298 sec <<< FAILURE!
testURI(io.reactiverse.es4x.impl.ImportMapperTest) Time elapsed: 0.255 sec <<< ERROR!
java.lang.IllegalStateException: A language with id 'js' is not installed
at io.reactiverse.es4x.ECMAEngine.(ECMAEngine.java:102)

....
After 20000 lines of stack trace
....
Running io.reactiverse.es4x.ES4XTest
Failed to create the vert.x instance caused by java.lang.IllegalStateException: A language with id 'js' is not installed
at io.reactiverse.es4x.ECMAEngine.(ECMAEngine.java:102)

@30atm
Copy link
Author

30atm commented Oct 8, 2023

Read a bit in https://www.graalvm.org/latest/reference-manual/js/ScriptEngine/..

Seems like things changed. updating pom as per this page also did not help..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants