You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "XinShepherd (via GitHub)" <gi...@apache.org> on 2023/12/14 09:03:52 UTC

[I] Hessian2FactoryManager may produce NPE [dubbo]

XinShepherd opened a new issue, #13504:
URL: https://github.com/apache/dubbo/issues/13504

   <!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy -->
   
   - [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
   
   ### Environment
   
   * Dubbo version: 3.2.7
   * Operating System version: Centos7
   * Java version: 17
   
   ### Steps to reproduce this issue
   
   ![image](https://github.com/apache/dubbo/assets/21291945/f4812161-2533-452e-a6c3-8c21f5d90863)
   
   ### Expected Behavior
   No errors
   
   <!-- What do you expect from the above steps?-->
   
   ### Actual Behavior
   
   <!-- What actually happens? -->
   
   If there is an exception, please attach the exception trace:
   
   ```
   org.apache.dubbo.rpc.RpcException: Failed to invoke remote method: getMetadataInfo, provider: dubbo://172.30.73.242:9985/org.apache.dubbo.metadata.MetadataService?connections=1&corethreads=2&dubbo=2.0.2&group=lse-reuter&port=9985&protocol=dubbo&release=3.0.12&retries=0&side=consumer&threadpool=cached&threads=100&timeout=5000&version=1.0.0, cause: Failed to send message Request [id=7828287520875186408, version=2.0.2, twoWay=true, event=false, broken=false, mPayload=0, data=null] to /172.30.73.242:9985, cause: Cannot invoke "Object.equals(Object)" because the return value of "com.alibaba.com.caucho.hessian.io.SerializerFactory.getClassLoader()" is null
           at org.apache.dubbo.rpc.protocol.dubbo.DubboInvoker.doInvoke(DubboInvoker.java:147)
           at org.apache.dubbo.rpc.protocol.AbstractInvoker.doInvokeAndReturn(AbstractInvoker.java:243)
           at org.apache.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:187)
           at org.apache.dubbo.rpc.proxy.InvocationUtil.invoke(InvocationUtil.java:61)
           at org.apache.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:75)
           at org.apache.dubbo.metadata.MetadataServiceDubboProxy14.getMetadataInfo(MetadataServiceDubboProxy14.java)
           at org.apache.dubbo.registry.client.metadata.MetadataUtils.getRemoteMetadata(MetadataUtils.java:173)
           at org.apache.dubbo.registry.client.AbstractServiceDiscovery.lambda$getRemoteMetadata$2(AbstractServiceDiscovery.java:229)
           at org.apache.dubbo.metrics.event.MetricsEventBus.post(MetricsEventBus.java:86)
           at org.apache.dubbo.registry.client.AbstractServiceDiscovery.getRemoteMetadata(AbstractServiceDiscovery.java:228)
           at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.lambda$doOnEvent$2(ServiceInstancesChangedListener.java:162)
           at java.base/java.util.Optional.orElseGet(Optional.java:364)
           at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.doOnEvent(ServiceInstancesChangedListener.java:162)
           at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.onEvent(ServiceInstancesChangedListener.java:116)
           at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener$AddressRefreshRetryTask.run(ServiceInstancesChangedListener.java:489)
           at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
           at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
           at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
           at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
           at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
           at java.base/java.lang.Thread.run(Thread.java:833)
   Caused by: org.apache.dubbo.remoting.RemotingException: Failed to send message Request [id=7828287520875186408, version=2.0.2, twoWay=true, event=false, broken=false, mPayload=0, data=null] to /172.30.73.242:9985, cause: Cannot invoke "Object.equals(Object)" because the return value of "com.alibaba.com.caucho.hessian.io.SerializerFactory.getClassLoader()" is null
           at org.apache.dubbo.remoting.transport.netty4.NettyChannel.send(NettyChannel.java:226)
           at org.apache.dubbo.remoting.transport.AbstractClient.send(AbstractClient.java:202)
           at org.apache.dubbo.remoting.transport.AbstractPeer.send(AbstractPeer.java:53)
           at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeChannel.request(HeaderExchangeChannel.java:149)
           at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeClient.request(HeaderExchangeClient.java:105)
           at org.apache.dubbo.rpc.protocol.dubbo.DubboInvoker.doInvoke(DubboInvoker.java:131)
           ... 20 common frames omitted
   Caused by: java.lang.NullPointerException: Cannot invoke "Object.equals(Object)" because the return value of "com.alibaba.com.caucho.hessian.io.SerializerFactory.getClassLoader()" is null
           at org.apache.dubbo.common.serialize.hessian2.Hessian2FactoryManager.getSerializerFactory(Hessian2FactoryManager.java:49)
           at org.apache.dubbo.common.serialize.hessian2.Hessian2ObjectOutput.<init>(Hessian2ObjectOutput.java:44)
           at org.apache.dubbo.common.serialize.hessian2.Hessian2Serialization.serialize(Hessian2Serialization.java:57)
           at org.apache.dubbo.common.serialize.DefaultSerializationExceptionWrapper.serialize(DefaultSerializationExceptionWrapper.java:51)
           at org.apache.dubbo.remoting.exchange.codec.ExchangeCodec.encodeRequest(ExchangeCodec.java:269)
           at org.apache.dubbo.remoting.exchange.codec.ExchangeCodec.encode(ExchangeCodec.java:79)
           at org.apache.dubbo.rpc.protocol.dubbo.DubboCountCodec.encode(DubboCountCodec.java:51)
           at org.apache.dubbo.remoting.transport.netty4.NettyChannel.send(NettyChannel.java:192)
           ... 25 common frames omitted
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] Hessian2FactoryManager may produce NPE [dubbo]

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #13504:
URL: https://github.com/apache/dubbo/issues/13504#issuecomment-1864415575

   3.2.10 released


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] Hessian2FactoryManager may produce NPE [dubbo]

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #13504:
URL: https://github.com/apache/dubbo/issues/13504#issuecomment-1857808599

   Set TCCL as null might not a good idea :)
   Although, I have fix it and would be released in 3.2.10.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] Hessian2FactoryManager may produce NPE [dubbo]

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #13504:
URL: https://github.com/apache/dubbo/issues/13504#issuecomment-1855677931

   What is your jvm environment? Seems that system classloader should not load as TCCL.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] Hessian2FactoryManager may produce NPE [dubbo]

Posted by "XinShepherd (via GitHub)" <gi...@apache.org>.
XinShepherd commented on issue #13504:
URL: https://github.com/apache/dubbo/issues/13504#issuecomment-1855707070

   > What is your jvm environment? Seems that system classloader should not load as TCCL.
   
   Oracle JDK 17. 
   
   I find why it heppends. Because I use the SafeForkJoinWorkerThreadFactory and custom `org.apache.dubbo.rpc.cluster.Cluster`
   ![image](https://github.com/apache/dubbo/assets/21291945/49291a1f-75f5-43d0-ba36-d7689b86a68b)
   ![image](https://github.com/apache/dubbo/assets/21291945/b03c1c1e-f760-46bb-a215-ec406995635a)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] Hessian2FactoryManager may produce NPE [dubbo]

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ closed issue #13504: Hessian2FactoryManager may produce NPE
URL: https://github.com/apache/dubbo/issues/13504


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org