question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[2.0.3] java.lang.invoke.BoundMethodHandle$Species_LL cannot be cast to java.lang.invoke.SimpleMethodHandle

See original GitHub issue

Describe the bug

A simple toString() function throws ClassCastException

java.lang.ClassCastException: java.lang.invoke.BoundMethodHandle$Species_LL cannot be cast to java.lang.invoke.SimpleMethodHandle at com.oracle.svm.methodhandles.MethodHandleIntrinsicImpl.execute(MethodHandleIntrinsicImpl.java:258) at com.oracle.svm.methodhandles.Util_java_lang_invoke_MethodHandle.invokeInternal(Target_java_lang_invoke_MethodHandle.java:144) at java.lang.invoke.MethodHandle.invokeBasic(MethodHandle.java:79) at java.lang.invoke.LambdaForm$NamedFunction.invokeWithArguments(LambdaForm.java:76) at java.lang.invoke.LambdaForm.interpretName(LambdaForm.java:981) at java.lang.invoke.LambdaForm.interpretWithArguments(LambdaForm.java:958) at java.lang.invoke.MethodHandle.invokeBasic(MethodHandle.java:85) at java.lang.invoke.MethodHandle.invokeBasic(MethodHandle.java:0) at java.lang.invoke.LambdaForm$MH/373406506.invoke(LambdaForm$MH) at hu.tsystems.database.entity.MeClapSzam.toString(MeClapSzam.java:431)

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
zakkakcommented, Aug 11, 2021

Hi @zakkak, it works without error with ubi-quarkus-native-image:21.2-java11!

Nice, 21.2 will become the default with Quarkus 2.2 (https://github.com/quarkusio/quarkus/pull/18932) and it will be (re)considered for backporting to Quarkus 2.1 (there were some issues with that).

Thanks for testing!

1reaction
senzucommented, Aug 11, 2021

Hi guys. How can I try GraalVM 21.2? I have upgraded the Quarkus version to 2.1.1.Final, but the container builder image is still 21.1.0

Hi @senzu, please try building with:

mvn clean package -Pnative -Dquarkus.native.container-build=true \
    -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-native-image:21.2-java11 \
    -Dquarkus.container-image.build=true

Hi @zakkak, it works without error with ubi-quarkus-native-image:21.2-java11!

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.String cannot be cast to [C - Stack Overflow
I'm using the following code to convert char[] to string, but it is throwing: java.lang.ClassCastException: java.lang.String cannot be cast to [C.
Read more >
MethodHandle (Java Platform SE 8 ) - Oracle Help Center
A Java method call expression naming invokeExact or invoke can invoke a method handle from Java source code. From the viewpoint of source...
Read more >
Getting "java.lang.String cannot be cast to java.util.List" after ...
modifyUserFullName(SamlSecurityRealm.java:453) at org.jenkinsci.plugins.saml.SamlSecurityRealm.doFinishLogin(SamlSecurityRealm.java:335) at java.lang.invoke ...
Read more >
cannot be cast to java.lang.RuntimeException - JBoss.org
My configuration JBoss 4.2.1, jbossws 2.0.3, jdk6. Any idea what I'm doing wrong?
Read more >
java.lang.ClassCastException: ek9 cannot be cast to kotlin.jvm ...
Fatal Exception: java.lang.ClassCastException: ek9 cannot be cast to kotlin.jvm.functions. ... invokeSuspend + 199(IntrinsicsKt__IntrinsicsJvmKt.java:199)
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found