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

fury.register error java.lang.NoSuchMethodException: no such constructor: java.util.concurrent.ConcurrentSkipListSet.<init> #1986

Open
1 of 2 tasks
lmm1990 opened this issue Dec 20, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@lmm1990
Copy link

lmm1990 commented Dec 20, 2024

Search before asking

  • I had searched in the issues and found no similar issues.

Version

Fury:0.9.0
os:windows10
graalvm:21.0.4

Component(s)

Java

Minimal reproduce step

demo.zip

see demo.zip

What did you expect to see?

no error

What did you see instead?

java.lang.UnsupportedOperationException: java.lang.NoSuchMethodException: no such constructor: java.util.concurrent.ConcurrentSkipListSet.(Comparator)void/newInvokeSpecial
at org.apache.fury.serializer.collection.CollectionSerializers$SortedSetSerializer.(CollectionSerializers.java:209)
at org.apache.fury.serializer.collection.CollectionSerializers$ConcurrentSkipListSetSerializer.(CollectionSerializers.java:446)
at org.apache.fury.serializer.collection.CollectionSerializers.registerDefaultSerializers(CollectionSerializers.java:836)
at org.apache.fury.resolver.ClassResolver.addDefaultSerializers(ClassResolver.java:326)
at org.apache.fury.resolver.ClassResolver.initialize(ClassResolver.java:313)
at org.apache.fury.Fury.(Fury.java:150)
at org.apache.fury.config.FuryBuilder.newFury(FuryBuilder.java:419)
at org.apache.fury.config.FuryBuilder.build(FuryBuilder.java:434)
at com.example.demo.FuryUtils.lambda$static$0(FuryUtils.java:21)
at org.apache.fury.util.LoaderBinding.setClassLoader(LoaderBinding.java:138)
at org.apache.fury.util.LoaderBinding.setClassLoader(LoaderBinding.java:95)
at org.apache.fury.ThreadLocalFury.lambda$new$2(ThreadLocalFury.java:67)
at [email protected]/java.lang.ThreadLocal$SuppliedThreadLocal.initialValue(ThreadLocal.java:357)
at [email protected]/java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:225)
at [email protected]/java.lang.ThreadLocal.get(ThreadLocal.java:194)
at [email protected]/java.lang.ThreadLocal.get(ThreadLocal.java:172)
at org.apache.fury.ThreadLocalFury.(ThreadLocalFury.java:75)
at com.example.demo.FuryUtils.(FuryUtils.java:18)
at com.example.demo.DemoApplication.main(DemoApplication.java:10)
at [email protected]/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)
Caused by: java.lang.NoSuchMethodException: no such constructor: java.util.concurrent.ConcurrentSkipListSet.(Comparator)void/newInvokeSpecial
at [email protected]/java.lang.invoke.MemberName.makeAccessException(MemberName.java:913)
at [email protected]/java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:994)
at [email protected]/java.lang.invoke.MethodHandles$Lookup.resolveOrFail(MethodHandles.java:3750)
at [email protected]/java.lang.invoke.MethodHandles$Lookup.findConstructor(MethodHandles.java:2837)
at org.apache.fury.reflect.ReflectionUtils.lambda$getCtrHandle$1(ReflectionUtils.java:147)
at [email protected]/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
at org.apache.fury.reflect.ReflectionUtils.getCtrHandle(ReflectionUtils.java:143)
at org.apache.fury.serializer.collection.CollectionSerializers$SortedSetSerializer.(CollectionSerializers.java:207)
... 19 more
Caused by: java.lang.NoSuchMethodError: java.util.concurrent.ConcurrentSkipListSet.(java.util.Comparator)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.methodhandles.Util_java_lang_invoke_MethodHandleNatives.resolve(Target_java_lang_invoke_MethodHandleNatives.java:335)
at [email protected]/java.lang.invoke.MethodHandleNatives.resolve(MethodHandleNatives.java:213)
at [email protected]/java.lang.invoke.MemberName$Factory.resolve(MemberName.java:962)
at [email protected]/java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:991)
... 25 more
2024-12-20 01:47:53 ERROR FuryBuilder:422 [main] - Fury creation failed with classloader jdk.internal.loader.ClassLoaders$AppClassLoader@48140564
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.example.demo.DemoApplication.main(DemoApplication.java:10)
at [email protected]/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)
Caused by: java.lang.UnsupportedOperationException: java.lang.NoSuchMethodException: no such constructor: java.util.concurrent.ConcurrentSkipListSet.(Comparator)void/newInvokeSpecial
at org.apache.fury.serializer.collection.CollectionSerializers$SortedSetSerializer.(CollectionSerializers.java:209)
at org.apache.fury.serializer.collection.CollectionSerializers$ConcurrentSkipListSetSerializer.(CollectionSerializers.java:446)
at org.apache.fury.serializer.collection.CollectionSerializers.registerDefaultSerializers(CollectionSerializers.java:836)
at org.apache.fury.resolver.ClassResolver.addDefaultSerializers(ClassResolver.java:326)
at org.apache.fury.resolver.ClassResolver.initialize(ClassResolver.java:313)
at org.apache.fury.Fury.(Fury.java:150)
at org.apache.fury.config.FuryBuilder.newFury(FuryBuilder.java:419)
at org.apache.fury.config.FuryBuilder.build(FuryBuilder.java:434)
at com.example.demo.FuryUtils.lambda$static$0(FuryUtils.java:21)
at org.apache.fury.util.LoaderBinding.setClassLoader(LoaderBinding.java:138)
at org.apache.fury.util.LoaderBinding.setClassLoader(LoaderBinding.java:95)
at org.apache.fury.ThreadLocalFury.lambda$new$2(ThreadLocalFury.java:67)
at [email protected]/java.lang.ThreadLocal$SuppliedThreadLocal.initialValue(ThreadLocal.java:357)
at [email protected]/java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:225)
at [email protected]/java.lang.ThreadLocal.get(ThreadLocal.java:194)
at [email protected]/java.lang.ThreadLocal.get(ThreadLocal.java:172)
at org.apache.fury.ThreadLocalFury.(ThreadLocalFury.java:75)
at com.example.demo.FuryUtils.(FuryUtils.java:18)
... 2 more
Caused by: java.lang.NoSuchMethodException: no such constructor: java.util.concurrent.ConcurrentSkipListSet.(Comparator)void/newInvokeSpecial
at [email protected]/java.lang.invoke.MemberName.makeAccessException(MemberName.java:913)
at [email protected]/java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:994)
at [email protected]/java.lang.invoke.MethodHandles$Lookup.resolveOrFail(MethodHandles.java:3750)
at [email protected]/java.lang.invoke.MethodHandles$Lookup.findConstructor(MethodHandles.java:2837)
at org.apache.fury.reflect.ReflectionUtils.lambda$getCtrHandle$1(ReflectionUtils.java:147)
at [email protected]/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
at org.apache.fury.reflect.ReflectionUtils.getCtrHandle(ReflectionUtils.java:143)
at org.apache.fury.serializer.collection.CollectionSerializers$SortedSetSerializer.(CollectionSerializers.java:207)
... 19 more
Caused by: java.lang.NoSuchMethodError: java.util.concurrent.ConcurrentSkipListSet.(java.util.Comparator)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.methodhandles.Util_java_lang_invoke_MethodHandleNatives.resolve(Target_java_lang_invoke_MethodHandleNatives.java:335)
at [email protected]/java.lang.invoke.MethodHandleNatives.resolve(MethodHandleNatives.java:213)
at [email protected]/java.lang.invoke.MemberName$Factory.resolve(MemberName.java:962)
at [email protected]/java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:991)
... 25 more

Anything Else?

No response

Are you willing to submit a PR?

@lmm1990 lmm1990 added the bug Something isn't working label Dec 20, 2024
@Aliothmoon
Copy link
Contributor

Is it running in AOT mode?

@Aliothmoon
Copy link
Contributor

Aliothmoon commented Dec 30, 2024

You may need to review this document if you are running in AOT mode. graalvm_guide
so you must create Fury as an static field of a class, and register all classes at the enclosing class initialize time.

@lmm1990
Copy link
Author

lmm1990 commented Jan 2, 2025

Okay, I'll give it a try

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