alibaba / fastjson2

🚄 FASTJSON2 is a Java JSON library with excellent performance.
Apache License 2.0
3.78k stars 495 forks source link

JSONB.parseObject doesn't support type : NULL -81 #1855

Closed chaoyoung closed 1 year ago

chaoyoung commented 1 year ago

问题描述

dubbo interface contains null parameters(LocalDateTime), server-side fastjson2 deserialization exception: not support type : NULL -81

Environment

Steps to reproduce this issue

  1. Both client and server have been upgraded to dubbo:3.2.5.
  2. Server configuration is as follows
    dubbo:
    application:
    register-mode: all
    protocols:
    dubbo:
      name: dubbo
      port: 20880
    triple:
      name: tri
      port: 50051
    provider:
    prefer-serialization: fastjson2,hessian2
    serialization: hessian2
  3. Client calls the interface that contains the null parameter

Expected Behavior

No exception

Actual Behavior

client error

org.apache.dubbo.rpc.RpcException: Failed to invoke the method xxxMethod in the service org.example.xxxserver.api.service.XXXService. Tried 1 times of the providers [10.244.24.255:20880] (1/2) from the registry nacos-0.nacos-headless.nacos.svc.cluster.local:8848,nacos-1.nacos-headless.nacos.svc.cluster.local:8848,nacos-2.nacos-headless.nacos.svc.cluster.local:8848 on the consumer 10.244.245.244 using the dubbo version 3.2.5. Last error is: Failed to invoke remote method: xxxMethod, provider: DefaultServiceInstance{serviceName='xxx-server-dubbo', host='10.244.24.255', port=20880, enabled=true, healthy=true, metadata={dubbo.metadata-service.url-params={"serialization":"hessian2","prefer.serialization":"fastjson2,hessian2","timeout":"3000","version":"1.0.0","dubbo":"2.0.2","release":"3.2.5","side":"provider","port":"50051","protocol":"tri"}, dubbo.endpoints=[{"port":20880,"protocol":"dubbo"},{"port":50051,"protocol":"tri"}], dubbo.metadata.revision=e2a8a4679cdd6f094f06aaae945ee4ee, dubbo.metadata.storage-type=local, timestamp=1694081405286}}, service{name='org.example.xxxserver.api.service.XXXService',group='null',version='5.0',protocol='dubbo',port='20880',params={release=3.2.5, xxxMethod.timeout=5000, deprecated=false, service-name-mapping=true, prefer.serialization=fastjson2,hessian2, dynamic=true, revision=5.14.9-SNAPSHOT, retries=0, delay=-1, xxxMethod.sent=true, check.serializable=true, xxxMethod.return=true, methods=xxxMethod, xxxMethod.retries=2, dubbo=2.0.2, interface=org.example.xxxserver.api.service.XXXService, timeout=3000, side=provider, generic=false, serialize.check.status=WARN, serialization=hessian2, application=xxx-server-dubbo},}, cause: org.apache.dubbo.remoting.RemotingException: Fail to decode request due to: RpcInvocation [methodName=xxxMethod, parameterTypes=null]
    at org.apache.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:114)
    at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:344)
    at org.apache.dubbo.rpc.cluster.router.RouterSnapshotFilter.invoke(RouterSnapshotFilter.java:46)
    at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:334)
    at org.apache.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:108)
    at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:334)
    at org.apache.dubbo.rpc.cluster.filter.support.MetricsClusterFilter.invoke(MetricsClusterFilter.java:56)
    at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:334)
    at org.apache.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:52)
    at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:334)
    at org.apache.dubbo.spring.security.filter.ContextHolderParametersSelectedTransferFilter.invoke(ContextHolderParametersSelectedTransferFilter.java:41)
    at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:334)
    at org.apache.dubbo.metrics.filter.MetricsFilter.invoke(MetricsFilter.java:73)
    at org.apache.dubbo.rpc.cluster.filter.support.MetricsConsumerFilter.invoke(MetricsConsumerFilter.java:37)
    at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:334)
    at org.apache.dubbo.rpc.cluster.filter.support.ConsumerClassLoaderFilter.invoke(ConsumerClassLoaderFilter.java:40)
    at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:334)
    at org.apache.dubbo.rpc.cluster.filter.support.ConsumerContextFilter.invoke(ConsumerContextFilter.java:116)
    at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:334)
    at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CallbackRegistrationInvoker.invoke(FilterChainBuilder.java:196)
    at org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster$ClusterFilterInvoker.invoke(AbstractCluster.java:91)
    at org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:103)
    at org.apache.dubbo.rpc.cluster.support.wrapper.ScopeClusterInvoker.invoke(ScopeClusterInvoker.java:169)
    at org.apache.dubbo.registry.client.migration.MigrationInvoker.invoke(MigrationInvoker.java:284)
    at org.apache.dubbo.rpc.proxy.InvocationUtil.invoke(InvocationUtil.java:61)
    at org.apache.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:75)
    at org.example.xxxserver.api.service.XXXServiceDubboProxy30.xxxMethod(XXXServiceDubboProxy30.java)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.dubbo.config.spring.util.LazyTargetInvocationHandler.invoke(LazyTargetInvocationHandler.java:58)
    at org.example.xxxserver.api.service.XXXServiceDubboProxy30.xxxMethod(XXXServiceDubboProxy30.java)
    at org.example.xxyserver.logic.AiDialogDataStatisticsLogic.conditionSetting(AiDialogDataStatisticsLogic.java:57)
    at org.example.xxyserver.logic.AiDialogDataStatisticsLogic.defaultAiDialogDataStatistics(AiDialogDataStatisticsLogic.java:47)
    at org.example.xxyserver.controller.AiDialogDataStatisticsController.defaultStatistics(AiDialogDataStatisticsController.java:40)
    at org.example.xxyserver.controller.AiDialogDataStatisticsController$$FastClassBySpringCGLIB$$8c823908.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
    at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:58)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708)
    at org.example.xxyserver.controller.AiDialogDataStatisticsController$$EnhancerBySpringCGLIB$$e808a4bb.defaultStatistics(<generated>)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1072)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:965)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:665)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
    at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
    at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:67)
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
    at org.example.common.http.filter.AbstractHttpRequestLoggingFilter.doFilterInternal(AbstractHttpRequestLoggingFilter.java:228)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:67)
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
    at org.example.common.http.filter.XssFilter.doFilter(XssFilter.java:22)
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:67)
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:67)
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
    at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:67)
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
    at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:96)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:67)
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:67)
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
    at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
    at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
    at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
    at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
    at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)
    at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:117)
    at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
    at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
    at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
    at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
    at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at io.undertow.servlet.handlers.SendErrorPageHandler.handleRequest(SendErrorPageHandler.java:52)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:275)
    at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:79)
    at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:134)
    at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:131)
    at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
    at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
    at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:255)
    at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:79)
    at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:100)
    at io.undertow.server.Connectors.executeRootHandler(Connectors.java:393)
    at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:852)
    at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2019)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1558)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1449)
    at org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1282)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.concurrent.ExecutionException: org.apache.dubbo.remoting.RemotingException: Fail to decode request due to: RpcInvocation [methodName=xxxMethod, parameterTypes=null]
    at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
    at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915)
    at org.apache.dubbo.rpc.AsyncRpcResult.get(AsyncRpcResult.java:218)
    at org.apache.dubbo.rpc.protocol.AbstractInvoker.waitForResultIfSync(AbstractInvoker.java:287)
    at org.apache.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:190)
    at org.apache.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:71)
    at org.apache.dubbo.rpc.filter.RpcExceptionFilter.invoke(RpcExceptionFilter.java:41)
    at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:334)
    at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CallbackRegistrationInvoker.invoke(FilterChainBuilder.java:196)
    at org.apache.dubbo.rpc.protocol.ReferenceCountInvokerWrapper.invoke(ReferenceCountInvokerWrapper.java:88)
    at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invokeWithContext(AbstractClusterInvoker.java:383)
    at org.apache.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:80)
    ... 127 common frames omitted
Caused by: org.apache.dubbo.remoting.RemotingException: Fail to decode request due to: RpcInvocation [methodName=xxxMethod, parameterTypes=null]
    at org.apache.dubbo.remoting.exchange.support.DefaultFuture.doReceived(DefaultFuture.java:249)
    at org.apache.dubbo.remoting.exchange.support.DefaultFuture.received(DefaultFuture.java:200)
    at org.apache.dubbo.remoting.exchange.support.DefaultFuture.received(DefaultFuture.java:188)
    at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.handleResponse(HeaderExchangeHandler.java:65)
    at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:206)
    at org.apache.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:53)
    at org.apache.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:62)
    at org.apache.dubbo.common.threadpool.ThreadlessExecutor$RunnableWrapper.run(ThreadlessExecutor.java:152)
    at org.apache.dubbo.common.threadpool.ThreadlessExecutor.waitAndDrain(ThreadlessExecutor.java:77)
    at org.apache.dubbo.rpc.AsyncRpcResult.get(AsyncRpcResult.java:205)
    ... 136 common frames omitted

server error

d.r.protocol.tri.call.AbstractServerCall:? :  [DUBBO] Process request failed. service=org.example.xxxserver.api.service.XXXService method=xxxMethod, dubbo version: 3.2.5, current host: 10.244.24.255, error code: 4-11. This may be caused by , go to https://dubbo.apache.org/faq/4/11 to find instructions.

java.io.IOException: org.apache.dubbo.common.serialize.SerializationException: com.alibaba.fastjson2.JSONException: not support type : NULL -81
    at org.apache.dubbo.common.serialize.DefaultSerializationExceptionWrapper.handleToIOException(DefaultSerializationExceptionWrapper.java:358) ~[dubbo-3.2.5.jar:3.2.5]
    at org.apache.dubbo.common.serialize.DefaultSerializationExceptionWrapper.access$000(DefaultSerializationExceptionWrapper.java:28) ~[dubbo-3.2.5.jar:3.2.5]
    at org.apache.dubbo.common.serialize.DefaultSerializationExceptionWrapper$ProxyObjectInput.readObject(DefaultSerializationExceptionWrapper.java:168) ~[dubbo-3.2.5.jar:3.2.5]
    at org.apache.dubbo.common.serialize.DefaultMultipleSerialization.deserialize(DefaultMultipleSerialization.java:42) ~[dubbo-3.2.5.jar:3.2.5]
    at org.apache.dubbo.rpc.protocol.tri.ReflectionPackableMethod$WrapRequestUnpack.unpack(ReflectionPackableMethod.java:483) ~[dubbo-3.2.5.jar:3.2.5]
    at org.apache.dubbo.rpc.model.WrapperUnPack.unpack(WrapperUnPack.java:23) ~[dubbo-3.2.5.jar:3.2.5]
    at org.apache.dubbo.rpc.protocol.tri.call.ReflectionAbstractServerCall.parseSingleMessage(ReflectionAbstractServerCall.java:166) ~[dubbo-3.2.5.jar:3.2.5]
    at org.apache.dubbo.rpc.protocol.tri.call.AbstractServerCall.onMessage(AbstractServerCall.java:214) ~[dubbo-3.2.5.jar:3.2.5]
    at org.apache.dubbo.rpc.protocol.tri.stream.TripleServerStream$ServerDecoderListener.onRawMessage(TripleServerStream.java:475) [dubbo-3.2.5.jar:3.2.5]
    at org.apache.dubbo.rpc.protocol.tri.frame.TriDecoder.processBody(TriDecoder.java:140) [dubbo-3.2.5.jar:3.2.5]
    at org.apache.dubbo.rpc.protocol.tri.frame.TriDecoder.deliver(TriDecoder.java:87) [dubbo-3.2.5.jar:3.2.5]
    at org.apache.dubbo.rpc.protocol.tri.frame.TriDecoder.deframe(TriDecoder.java:57) [dubbo-3.2.5.jar:3.2.5]
    at org.apache.dubbo.rpc.protocol.tri.stream.TripleServerStream$ServerTransportObserver.doOnData(TripleServerStream.java:441) [dubbo-3.2.5.jar:3.2.5]
    at org.apache.dubbo.rpc.protocol.tri.stream.TripleServerStream$ServerTransportObserver.lambda$onData$2(TripleServerStream.java:434) [dubbo-3.2.5.jar:3.2.5]
    at org.apache.dubbo.common.threadpool.serial.SerializingExecutor.run(SerializingExecutor.java:102) ~[dubbo-3.2.5.jar:3.2.5]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_201]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_201]
    at org.apache.dubbo.common.threadlocal.InternalRunnable.run(InternalRunnable.java:41) ~[dubbo-3.2.5.jar:3.2.5]
    at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_201]
Caused by: org.apache.dubbo.common.serialize.SerializationException: com.alibaba.fastjson2.JSONException: not support type : NULL -81
    ... 19 common frames omitted
Caused by: com.alibaba.fastjson2.JSONException: not support type : NULL -81
    at com.alibaba.fastjson2.JSONReaderJSONB.readLocalDate0(JSONReaderJSONB.java:4480) ~[fastjson2-2.0.40.jar:na]
    at com.alibaba.fastjson2.JSONReaderJSONB.readLocalDate(JSONReaderJSONB.java:4428) ~[fastjson2-2.0.40.jar:na]
    at com.alibaba.fastjson2.reader.ObjectReaderImplLocalDate.readJSONBObject(ObjectReaderImplLocalDate.java:37) ~[fastjson2-2.0.40.jar:na]
    at com.alibaba.fastjson2.JSONB.parseObject(JSONB.java:540) ~[fastjson2-2.0.40.jar:na]
    at org.apache.dubbo.common.serialize.fastjson2.FastJson2ObjectInput.readObject(FastJson2ObjectInput.java:118) ~[dubbo-3.2.5.jar:3.2.5]
    at org.apache.dubbo.common.serialize.DefaultSerializationExceptionWrapper$ProxyObjectInput.readObject(DefaultSerializationExceptionWrapper.java:166) ~[dubbo-3.2.5.jar:3.2.5]
    ... 16 common frames omitted
wenshao commented 1 year ago

https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.41-SNAPSHOT/ 问题已修复,请用2.0.41-SNAPSHOT帮忙验证

chaoyoung commented 1 year ago

https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.41-SNAPSHOT/ 问题已修复,请用2.0.41-SNAPSHOT帮忙验证

@wenshao 问题依然存在:

2023-09-14 11:21:47.309  WARN 87803 --- [erverWorker-5-1] o.a.d.r.p.dubbo.DecodeableRpcInvocation  :  [DUBBO] Decode rpc invocation failed: org.apache.dubbo.common.serialize.SerializationException: com.alibaba.fastjson2.JSONException: not support type : NULL -81, dubbo version: 3.2.6, current host: 10.37.129.2, error code: 4-20. This may be caused by , go to https://dubbo.apache.org/faq/4/20 to find instructions. 

java.io.IOException: org.apache.dubbo.common.serialize.SerializationException: com.alibaba.fastjson2.JSONException: not support type : NULL -81
    at org.apache.dubbo.common.serialize.DefaultSerializationExceptionWrapper.handleToIOException(DefaultSerializationExceptionWrapper.java:358) ~[dubbo-3.2.6.jar:3.2.6]
    at org.apache.dubbo.common.serialize.DefaultSerializationExceptionWrapper.access$000(DefaultSerializationExceptionWrapper.java:28) ~[dubbo-3.2.6.jar:3.2.6]
    at org.apache.dubbo.common.serialize.DefaultSerializationExceptionWrapper$ProxyObjectInput.readObject(DefaultSerializationExceptionWrapper.java:168) ~[dubbo-3.2.6.jar:3.2.6]
    at org.apache.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation.drawArgs(DecodeableRpcInvocation.java:267) ~[dubbo-3.2.6.jar:3.2.6]
    at org.apache.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation.decode(DecodeableRpcInvocation.java:168) ~[dubbo-3.2.6.jar:3.2.6]
    at org.apache.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation.decode(DecodeableRpcInvocation.java:102) ~[dubbo-3.2.6.jar:3.2.6]
    at org.apache.dubbo.rpc.protocol.dubbo.DubboCodec.decodeBody(DubboCodec.java:197) [dubbo-3.2.6.jar:3.2.6]
    at org.apache.dubbo.remoting.exchange.codec.ExchangeCodec.decode(ExchangeCodec.java:138) [dubbo-3.2.6.jar:3.2.6]
    at org.apache.dubbo.remoting.exchange.codec.ExchangeCodec.decode(ExchangeCodec.java:92) [dubbo-3.2.6.jar:3.2.6]
    at org.apache.dubbo.rpc.protocol.dubbo.DubboCountCodec.decode(DubboCountCodec.java:60) [dubbo-3.2.6.jar:3.2.6]
    at org.apache.dubbo.remoting.transport.netty4.NettyCodecAdapter$InternalDecoder.decode(NettyCodecAdapter.java:103) [dubbo-3.2.6.jar:3.2.6]
    at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:529) [netty-codec-4.1.90.Final.jar:4.1.90.Final]
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:468) [netty-codec-4.1.90.Final.jar:4.1.90.Final]
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290) [netty-codec-4.1.90.Final.jar:4.1.90.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) [netty-transport-4.1.90.Final.jar:4.1.90.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) [netty-transport-4.1.90.Final.jar:4.1.90.Final]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) [netty-transport-4.1.90.Final.jar:4.1.90.Final]
    at io.netty.handler.codec.ByteToMessageDecoder.handlerRemoved(ByteToMessageDecoder.java:266) [netty-codec-4.1.90.Final.jar:4.1.90.Final]
    at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:536) [netty-codec-4.1.90.Final.jar:4.1.90.Final]
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:468) [netty-codec-4.1.90.Final.jar:4.1.90.Final]
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290) [netty-codec-4.1.90.Final.jar:4.1.90.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) [netty-transport-4.1.90.Final.jar:4.1.90.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) [netty-transport-4.1.90.Final.jar:4.1.90.Final]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) [netty-transport-4.1.90.Final.jar:4.1.90.Final]
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) [netty-transport-4.1.90.Final.jar:4.1.90.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) [netty-transport-4.1.90.Final.jar:4.1.90.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) [netty-transport-4.1.90.Final.jar:4.1.90.Final]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) [netty-transport-4.1.90.Final.jar:4.1.90.Final]
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) [netty-transport-4.1.90.Final.jar:4.1.90.Final]
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) [netty-transport-4.1.90.Final.jar:4.1.90.Final]
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) [netty-transport-4.1.90.Final.jar:4.1.90.Final]
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) [netty-transport-4.1.90.Final.jar:4.1.90.Final]
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) [netty-transport-4.1.90.Final.jar:4.1.90.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) [netty-common-4.1.90.Final.jar:4.1.90.Final]
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.90.Final.jar:4.1.90.Final]
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.90.Final.jar:4.1.90.Final]
    at java.lang.Thread.run(Thread.java:750) [na:1.8.0_382]
Caused by: org.apache.dubbo.common.serialize.SerializationException: com.alibaba.fastjson2.JSONException: not support type : NULL -81
    ... 37 common frames omitted
Caused by: com.alibaba.fastjson2.JSONException: not support type : NULL -81
    at com.alibaba.fastjson2.JSONReaderJSONB.readLocalDateTime0(JSONReaderJSONB.java:4564) ~[fastjson2-2.0.41-20230913.231057-9.jar:na]
    at com.alibaba.fastjson2.JSONReaderJSONB.readLocalDateTime(JSONReaderJSONB.java:4505) ~[fastjson2-2.0.41-20230913.231057-9.jar:na]
    at com.alibaba.fastjson2.reader.ObjectReaderImplLocalDateTime.readJSONBObject(ObjectReaderImplLocalDateTime.java:27) ~[fastjson2-2.0.41-20230913.231057-9.jar:na]
    at com.alibaba.fastjson2.JSONB.parseObject(JSONB.java:540) ~[fastjson2-2.0.41-20230913.231057-9.jar:na]
    at org.apache.dubbo.common.serialize.fastjson2.FastJson2ObjectInput.readObject(FastJson2ObjectInput.java:118) ~[dubbo-3.2.6.jar:3.2.6]
    at org.apache.dubbo.common.serialize.DefaultSerializationExceptionWrapper$ProxyObjectInput.readObject(DefaultSerializationExceptionWrapper.java:166) ~[dubbo-3.2.6.jar:3.2.6]
    ... 34 common frames omitted
wenshao commented 1 year ago

https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.42-SNAPSHOT/ 很抱歉,忙起来看漏了,问题已修复,请用2.0.42-SNAPSHOT帮忙验证,2.0.42版本预计在11月5日前发布,如果你着急可以提要求提前发布。

chaoyoung commented 1 year ago

https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.42-SNAPSHOT/ 很抱歉,忙起来看漏了,问题已修复,请用2.0.42-SNAPSHOT帮忙验证,2.0.42版本预计在11月5日前发布,如果你着急可以提要求提前发布。

2.0.42-SNAPSHOT版本已验证没有问题。也没有那么急,因为升级至dubbo3.2默认使用了fastjson2序列化导致这个问题,已经先切回hessian2序列化了。

wenshao commented 1 year ago

https://github.com/alibaba/fastjson2/releases/tag/2.0.42 问题已修复,请用新版本