You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Package dubbo3 with fastjson2 2.0.53 at Graalvm occur exception
环境信息
OS信息: Darwin 22.6.0
JDK信息: GraalVM 23+37.1
版本信息:2.0.53
重现步骤
1,import spring-boot3
2, import dubbo3
3, run mvn clean install -P native native:compile -Dmaven.test.skip=true at graalvm 23
### 期待的正确结果
build success.
### 相关日志输出
Object was reached by
indexing into array com.alibaba.fastjson2.JSONFactory$CacheItem[]@546baa7: [Lcom.alibaba.fastjson2.JSONFactory$CacheItem;@546baa7 at index 11
scanning root com.alibaba.fastjson2.JSONFactory$CacheItem[]@546baa7: [Lcom.alibaba.fastjson2.JSONFactory$CacheItem;@546baa7 embedded in
com.alibaba.fastjson2.JSONWriterJSONB.<init>(JSONWriterJSONB.java:44)
parsing method com.alibaba.fastjson2.JSONWriterJSONB.<init>(JSONWriterJSONB.java:43) reachable via the parsing context
at com.oracle.svm.core.code.FactoryMethodHolder.JSONWriterJSONB_pn4tYUhI09Bd1yC9gIOOa9(generated:0)
at com.alibaba.fastjson2.JSONB.toBytes(JSONB.java:1259)
at org.apache.dubbo.common.serialize.fastjson2.FastJson2ObjectOutput.writeObject(FastJson2ObjectOutput.java:118)
at org.apache.dubbo.remoting.transport.CodecSupport.lambda$getNullBytesOf$1(CodecSupport.java:120)
at org.apache.dubbo.remoting.transport.CodecSupport$$Lambda/0x00000ff0029adbf8.apply(Unknown Source)
at java.util.concurrent.ConcurrentSkipListMap.computeIfAbsent(ConcurrentSkipListMap.java:1464)
at com.oracle.svm.core.methodhandles.MethodHandleIntrinsicImpl.intrinsic(MethodHandleIntrinsicImpl.java:140)
at com.oracle.svm.core.methodhandles.MethodHandleIntrinsicImpl.resolve(MethodHandleIntrinsicImpl.java:471)
at com.oracle.svm.core.methodhandles.Util_java_lang_invoke_MethodHandleNatives.resolve(Target_java_lang_invoke_MethodHandleNatives.java:310)
at com.oracle.svm.core.methodhandles.Target_java_lang_invoke_MethodHandleNatives.resolve(Target_java_lang_invoke_MethodHandleNatives.java:208)
at java.lang.invoke.MemberName$Factory.resolve(MemberName.java:957)
at java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:986)
at java.lang.invoke.LambdaForm.createFormsFor(LambdaForm.java:1747)
at java.lang.invoke.LambdaForm.constantZero(LambdaForm.java:1713)
at java.lang.invoke.LambdaForm.buildEmptyNames(LambdaForm.java:391)
at java.lang.invoke.LambdaForm.createBlankForType(LambdaForm.java:378)
at java.lang.invoke.LambdaForm.prepare(LambdaForm.java:817)
at java.lang.invoke.MethodHandle.<init>(MethodHandle.java:482)
at java.lang.invoke.DelegatingMethodHandle.<init>(DelegatingMethodHandle.java:50)
at java.lang.invoke.MethodHandleImpl$IntrinsicMethodHandle.<init>(MethodHandleImpl.java:1379)
at com.oracle.svm.core.code.FactoryMethodHolder.MethodHandleImpl$IntrinsicMethodHandle_xESdkmgNC9HO6nLR0VxCwI(generated:0)
at java.lang.invoke.MethodHandleImpl.makeIntrinsic(MethodHandleImpl.java:1435)
at java.lang.invoke.MethodHandles.makeIdentity(MethodHandles.java:5197)
at java.lang.invoke.MethodHandles.identity(MethodHandles.java:5144)
at sun.invoke.util.ValueConversions.convertPrimitive(ValueConversions.java:582)
at com.oracle.svm.core.methodhandles.Util_java_lang_invoke_MethodHandle.convertArgs(Target_java_lang_invoke_MethodHandle.java:310)
at com.oracle.svm.core.methodhandles.Util_java_lang_invoke_MethodHandle.invokeInternal(Target_java_lang_invoke_MethodHandle.java:223)
at com.oracle.svm.core.methodhandles.Util_java_lang_invoke_MethodHandle.linkTo(Target_java_lang_invoke_MethodHandle.java:171)
at java.lang.invoke.MethodHandle.linkToStatic(generated:0)
at javax.net.ssl.SSLContext.getDefault(SSLContext.java:111)
at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:83)
at javax.net.ssl.HttpsURLConnection.getDefaultSSLSocketFactory(HttpsURLConnection.java:336)
at javax.net.ssl.HttpsURLConnection.<init>(HttpsURLConnection.java:292)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.<init>(HttpsURLConnectionImpl.java:80)
at com.oracle.svm.core.code.FactoryMethodHolder.HttpsURLConnectionImpl_Zzdvp972NB4c9HKKWMF2IF(generated:0)
at sun.net.www.protocol.https.Handler.openConnection(Handler.java:62)
at sun.net.www.protocol.https.Handler.openConnection(Handler.java:57)
at java.net.URL.openConnection(URL.java:1258)
at java.util.ServiceLoader$LazyClassPathLookupIterator.parse(ServiceLoader.java:1166)
at java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1209)
at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1224)
at java.util.ServiceLoader$LazyClassPathLookupIterator.nextService(ServiceLoader.java:1250)
at java.util.ServiceLoader$LazyClassPathLookupIterator.next(ServiceLoader.java:1282)
at java.util.ServiceLoader$LazyClassPathLookupIterator.next(ServiceLoader.java:1112)
at java.util.ServiceLoader$2.next(ServiceLoader.java:1312)
at java.util.ServiceLoader$2.next(ServiceLoader.java:1302)
at java.util.ServiceLoader$3.next(ServiceLoader.java:1397)
at java.util.ResourceBundle$4.run(ResourceBundle.java:1942)
at java.util.ResourceBundle$4.run(ResourceBundle.java:1938)
at com.oracle.svm.core.jdk.Target_java_security_AccessController.executePrivileged(SecuritySubstitutions.java:132)
at sun.util.cldr.CLDRLocaleProviderAdapter.getCalendarDataProvider(CLDRLocaleProviderAdapter.java:116)
at sun.util.locale.provider.JRELocaleProviderAdapter.getLocaleServiceProvider(JRELocaleProviderAdapter.java:108)
at sun.util.locale.provider.LocaleServiceProviderPool.findProviders(LocaleServiceProviderPool.java:313)
at sun.util.locale.provider.LocaleServiceProviderPool.getLocalizedObjectImpl(LocaleServiceProviderPool.java:283)
at sun.util.locale.provider.CalendarDataUtility.retrieveMinimalDaysInFirstWeek(CalendarDataUtility.java:85)
at java.util.Calendar.setWeekCountData(Calendar.java:3416)
at java.util.Calendar.<init>(Calendar.java:1614)
at java.util.GregorianCalendar.<init>(GregorianCalendar.java:632)
at com.oracle.svm.core.code.FactoryMethodHolder.GregorianCalendar_0Dy7a5oUqEI0beu3QEmHe1(generated:0)
at java.util.Calendar.getInstance(Calendar.java:1665)
at ch.qos.logback.classic.pattern.SyslogStartConverter.<init>(SyslogStartConverter.java:33)
at com.oracle.svm.core.code.FactoryMethodHolder.SyslogStartConverter_hnAwbX5v5D6PXBG6pSq2j7(generated:0)
at static root method.(Unknown Source)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.heap.ImageHeapScanner.onObjectReachable(ImageHeapScanner.java:591)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.heap.SVMImageHeapScanner.onObjectReachable(SVMImageHeapScanner.java:125)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.heap.ImageHeapScanner.lambda$markReachable$10(ImageHeapScanner.java:572)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:166)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:152)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.compute(ForkJoinTask.java:1726)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.compute(ForkJoinTask.java:1717)
at java.base/java.util.concurrent.ForkJoinTask$InterruptibleTask.exec(ForkJoinTask.java:1641)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:507)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1458)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2034)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:189)
Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: An object of type 'com.alibaba.fastjson2.JSONFactory$CacheItem' was found in the image heap. This type, however, is marked for initialization at image run time for the following reason: classes are initialized at run time by default.
This is not allowed for correctness reasons: All objects that are stored in the image heap must be initialized at build time.
#### 附加信息
1, It present class name com.alibaba.fastjson2.reader.ObjectReaderImplString in the log with same situation.
The text was updated successfully, but these errors were encountered:
问题描述
Package dubbo3 with fastjson2 2.0.53 at Graalvm occur exception
环境信息
重现步骤
1,import spring-boot3
2, import dubbo3
3, run mvn clean install -P native native:compile -Dmaven.test.skip=true at graalvm 23
The text was updated successfully, but these errors were encountered: