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

SerializationConstructorAccessor class not found for declaringClass: [Ljava.lang.Object; #351

Open
imgoby opened this issue Mar 1, 2024 · 1 comment

Comments

@imgoby
Copy link

imgoby commented Mar 1, 2024

version 3.0.4-jdk17

Exception is as follow:


com.oracle.svm.core.jdk.UnsupportedFeatureError: SerializationConstructorAccessor class not found for declaringClass: [Ljava.lang.Object; (targetConstructorClass: java.lang.Object). Usually adding [Ljava.lang.Object; to serialization-config.json fixes the problem.
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:89) ~[na:na]
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.reflect.serialize.SerializationSupport.getSerializationConstructorAccessor(SerializationSupport.java:143) ~[na:na]
	at [email protected]/jdk.internal.reflect.MethodAccessorGenerator.generateSerializationConstructor(MethodAccessorGenerator.java:48) ~[na:na]
	at [email protected]/jdk.internal.reflect.ReflectionFactory.generateConstructor(ReflectionFactory.java:463) ~[na:na]
	at [email protected]/jdk.internal.reflect.ReflectionFactory.newConstructorForSerialization(ReflectionFactory.java:376) ~[na:na]
	at [email protected]/sun.reflect.ReflectionFactory.newConstructorForSerialization(ReflectionFactory.java:100) ~[na:na]
	at org.nustaq.serialization.FSTDefaultClassInstantiator.findConstructorForSerializable(FSTDefaultClassInstantiator.java:110) ~[na:na]
	at org.nustaq.serialization.FSTClazzInfo.<init>(FSTClazzInfo.java:136) ~[spring-cloud-alibaba-fst-native-image:na]
	at org.nustaq.serialization.FSTClazzInfoRegistry.getCLInfo(FSTClazzInfoRegistry.java:129) ~[na:na]
	at org.nustaq.serialization.FSTClazzNameRegistry.addClassMapping(FSTClazzNameRegistry.java:97) ~[na:na]
	at org.nustaq.serialization.FSTClazzNameRegistry.registerClassNoLookup(FSTClazzNameRegistry.java:84) ~[na:na]
	at org.nustaq.serialization.FSTClazzNameRegistry.registerClass(FSTClazzNameRegistry.java:80) ~[na:na]
	at org.nustaq.serialization.FSTConfiguration.addDefaultClazzes(FSTConfiguration.java:844) ~[spring-cloud-alibaba-fst-native-image:na]
	at org.nustaq.serialization.FSTConfiguration.initDefaultFstConfigurationInternal(FSTConfiguration.java:478) ~[spring-cloud-alibaba-fst-native-image:na]
	at org.nustaq.serialization.FSTConfiguration.createDefaultConfiguration(FSTConfiguration.java:473) ~[spring-cloud-alibaba-fst-native-image:na]
	at org.nustaq.serialization.FSTConfiguration.createDefaultConfiguration(FSTConfiguration.java:465) ~[spring-cloud-alibaba-fst-native-image:na]

@wuxindao
Copy link

我也遇到了, 解决不了SerializationConstructorAccessor class not found for declaringClass: com.sh.commons.tuple.TwoTuple (targetConstructorClass: java.lang.Object). Usually adding com.sh.commons.tuple.TwoTuple to serialization-config.json fixes the problem.

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

No branches or pull requests

2 participants