apache / apache/servicecomb-java-chassis

RPC接口调用出现类无法找到:Could not initialize class rx.Observable

Open
#3,722 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.9k
Forks
814
Avg merge
8d 23h
Merged PRs (30d)
1

Description

我尝试通过rpc调用时出现如下异常,不知道rx.Observable是什么,请问这是哪里缺少了东西么?重启微服务可规避,目前已出现两次,均出现在补丁升级后。
2023-03-16 13:26:18,953Z | ERROR | pcs-182 | InvokerUtils | 46 - ioei-rpcservice - 2023.315.941.44 | |||protocol:null||org.apache.servicecomb.core.provider.consumer.InvokerUtils.innerSyncInvoke(InvokerUtils.java:80) | Msg: invoke failed, IoVehicle.apiAuthQueryService.queryApiCertCNameAuthStatus
java.lang.NoClassDefFoundError: Could not initialize class rx.Observable
at com.netflix.loadbalancer.reactive.LoadBalancerCommand.selectServer(LoadBalancerCommand.java:180) ~[46:ioei-rpcservice:2023.315.941.44]
at com.netflix.loadbalancer.reactive.LoadBalancerCommand.submit(LoadBalancerCommand.java:276) ~[46:ioei-rpcservice:2023.315.941.44]
at org.apache.servicecomb.loadbalance.LoadbalanceHandler.sendWithRetry(LoadbalanceHandler.java:303) ~[46:ioei-rpcservice:2023.315.941.44]
at org.apache.servicecomb.loadbalance.LoadbalanceHandler.handle(LoadbalanceHandler.java:184) ~[46:ioei-rpcservice:2023.315.941.44]
at org.apache.servicecomb.core.Invocation.next(Invocation.java:151) ~[46:ioei-rpcservice:2023.315.941.44]
at org.apache.servicecomb.core.provider.consumer.InvokerUtils.innerSyncInvoke(InvokerUtils.java:72) ~[46:ioei-rpcservice:2023.315.941.44]
at org.apache.servicecomb.provider.pojo.Invoker.syncInvoke(Invoker.java:161) ~[46:ioei-rpcservice:2023.315.941.44]
at org.apache.servicecomb.provider.pojo.Invoker.invoke(Invoker.java:157) ~[46:ioei-rpcservice:2023.315.941.44]
at com.xxx.jsf.invocation.PaaSInvoker.invoke(PaaSInvoker.java:21) ~[46:ioei-rpcservice:2023.315.941.44]
at com.sun.proxy.$Proxy311.queryApiCertCNameAuthStatus(Unknown Source) ~[46:ioei-rpcservice:2023.315.941.44]
at com.xxx.rpcservice.iovehicle.VehicleApiAuthQueryService.queryApiCertCNameAuthStatus(VehicleApiAuthQueryService.java:34) ~[46:ioei-rpcservice:2023.315.941.44]
at com.xxxx.vehicle.service.rpc.VehicleAuthService.isValidCertCname(VehicleAuthService.java:28) ~[?:?]
at com.xxxx.plugin.service.activation.process.ChoiceProcessor.process(ChoiceProcessor.java:92) ~[?:?]
at org.apache.camel.processor.DelegateSyncProcessor.process(DelegateSyncProcessor.java:63) ~[?:?]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) ~[?:?]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) ~[?:?]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) ~[?:?]
at org.apache.camel.processor.TryProcessor.process(TryProcessor.java:113) ~[?:?]
at org.apache.camel.processor.TryProcessor.process(TryProcessor.java:84) ~[?:?]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) ~[?:?]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) ~[?:?]
at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:76) ~[?:?]
at org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:186) ~[?:?]
at org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:86) ~[?:?]
at org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:541) ~[?:?]
at org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:506) ~[?:?]
at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:369) ~[?:?]
at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:506) ~[?:?]
at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:213) ~[?:?]
at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:139) ~[?:?]
at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:125) ~[?:?]
at com.xxx.service.common.cxf.CamelService$1.lambda$null$0(CamelService.java:75) ~[?:?]

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the failure at rx.Observable and the cited LoadBalancerCommand.selectServer, LoadbalanceHandler.sendWithRetry, and InvokerUtils.innerSyncInvoke stack frames. Check how the patch upgrade changes the RPC service's runtime dependencies and class initialization. Done means the reported RPC call no longer fails with NoClassDefFoundError after an upgrade, with the failure covered by a reproducible test if the project provides one.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.