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

Caused by: java.lang.NoSuchMethodError: 'jdk.vm.ci.meta.ResolvedJavaMethod[] jdk.vm.ci.meta.ResolvedJavaType.getDeclaredMethods(boolean)' #10036

Open
shuowang97 opened this issue Nov 5, 2024 · 4 comments
Assignees
Labels

Comments

@shuowang97
Copy link

Describe the issue
We try to use GraalVM Context in our project to execute JS script, but we're getting this method not found exception

Steps to reproduce the issue
mvn clean install

Describe GraalVM and your environment:

  • GraalVM version: 23.1.2
  • JDK major version: 17
  • OS: Linux

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.
The project is working fine in my local, but while running in the cloud(Linux OS), they we get the exceptions.

Caused by: java.lang.NoSuchMethodError: 'jdk.vm.ci.meta.ResolvedJavaMethod[] jdk.vm.ci.meta.ResolvedJavaType.getDeclaredMethods(boolean)'
	at com.oracle.truffle.runtime.hotspot.HotSpotTruffleRuntime.installCallBoundaryMethods(HotSpotTruffleRuntime.java:524)
	at com.oracle.truffle.runtime.hotspot.HotSpotTruffleRuntime.<init>(HotSpotTruffleRuntime.java:171)
	at com.oracle.truffle.runtime.hotspot.HotSpotTruffleRuntimeAccess.createRuntime(HotSpotTruffleRuntimeAccess.java:186)
	at com.oracle.truffle.runtime.hotspot.HotSpotTruffleRuntimeAccess.getRuntime(HotSpotTruffleRuntimeAccess.java:73)
	at com.oracle.truffle.api.Truffle.createRuntime(Truffle.java:145)
	at com.oracle.truffle.api.Truffle$1.run(Truffle.java:176)
	at com.oracle.truffle.api.Truffle$1.run(Truffle.java:174)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
@shuowang97 shuowang97 added the bug label Nov 5, 2024
@oubidar-Abderrahim
Copy link
Member

Describe GraalVM and your environment:

GraalVM version: 23.1.2
JDK major version: 17
OS: Linux
  1. GraalVM 23.1.2 is outdated, please always use the latest release before reporting issues.
  2. Your JDK major version cannot be 17 if you're using 23.1.2, this version is based on JDK 21. please clarify what JDK you're actually using. it would be best to share the output of java -version
  3. What architecture is used in you Linux machine? please provide the output of uname -a
Steps to reproduce the issue
mvn clean install

Please provide a full reproduce example we can run

@oubidar-Abderrahim oubidar-Abderrahim self-assigned this Nov 7, 2024
@shuowang97
Copy link
Author

shuowang97 commented Nov 7, 2024

Thanks for your help!

  1. We're using the org.graalvm.polyglot package and it starts from 23.x.x.
  2. I did try it with 24.x.x for our JDK17 environment but it didn't work. 23 works fine though
  3. I cannot reproduce in my macOS + JDK17 environment, the issue is only in the cloud scenarios
  4. Output of uname -a: Linux 542c1360ca23 6.5.0-1025-azure #\26~22.04.1-Ubuntu SMP Thu Jul 11 22:33:04 UTC 2024 x86_64 GNU/Linux

@shuowang97
Copy link
Author

By removing this surefire argline configuration, it can be executed, but not sure the reason yet.

`

					<configuration>
					<argLine>@{argLine} -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI &#45;&#45;add-modules jdk.internal.vm.ci &#45;&#45;add-exports=java.base/jdk.internal.misc=jdk.graal.compiler &#45;&#45;upgrade-module-path=${compiler.dir}</argLine>
					</configuration>

`

@oubidar-Abderrahim
Copy link
Member

Please provide a full reproduce example we can run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants