sofa-rpc-all-xxx.jar升级
1、环境
springboot-2.7.18
sofa-rpc-all-5.3.6
curator-framework-2.9.1
curator-recipes-2.9.1
2、操作
sofa-rpc-all升级至5.12.0报错Could not initialize class com.alipay.sofa.rpc.tracer.sofatracer.factory.ReporterFactory
Caused by: com.alipay.sofa.rpc.core.exception.SofaRpcRuntimeException: null
at com.alipay.sofa.rpc.common.utils.ClassUtils.newInstance(ClassUtils.java:181) ~[sofa-rpc-all-5.12.0.jar:5.12.0]
at com.alipay.sofa.rpc.common.utils.ClassUtils.newInstanceWithArgs(ClassUtils.java:198) ~[sofa-rpc-all-5.12.0.jar:5.12.0]
at com.alipay.sofa.rpc.ext.ExtensionClass.getExtInstance(ExtensionClass.java:107) ~[sofa-rpc-all-5.12.0.jar:5.12.0]
at com.alipay.sofa.rpc.ext.ExtensionClass.getExtInstance(ExtensionClass.java:90) ~[sofa-rpc-all-5.12.0.jar:5.12.0]
at com.alipay.sofa.rpc.tracer.TracerFactory.getTracer(TracerFactory.java:43) ~[sofa-rpc-all-5.12.0.jar:5.12.0]
at com.alipay.sofa.rpc.module.RestTracerModule.install(RestTracerModule.java:78) ~[sofa-rpc-all-5.12.0.jar:5.12.0]
at com.alipay.sofa.rpc.module.ModuleFactory.installModules(ModuleFactory.java:90) ~[sofa-rpc-all-5.12.0.jar:5.12.0]
at com.alipay.sofa.rpc.context.RpcRuntimeContext.(RpcRuntimeContext.java:99) ~[sofa-rpc-all-5.12.0.jar:5.12.0]
… 31 common frames omitted
Caused by: java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_131]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_131]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_131]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_131]
at com.alipay.sofa.rpc.common.utils.ClassUtils.newInstance(ClassUtils.java:177) ~[sofa-rpc-all-5.12.0.jar:5.12.0]
… 38 common frames omitted
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.alipay.sofa.rpc.tracer.sofatracer.factory.ReporterFactory
at com.alipay.sofa.rpc.tracer.sofatracer.RpcSofaTracer.generateReporter(RpcSofaTracer.java:138) ~[sofa-rpc-all-5.12.0.jar:5.12.0]
at com.alipay.sofa.rpc.tracer.sofatracer.RpcSofaTracer.(RpcSofaTracer.java:88) ~[sofa-rpc-all-5.12.0.jar:5.12.0]
… 43 common frames omitted
3、方案
sofa-rpc 与 curator 版本不适配
springboot-2.7.18
sofa-rpc-all-5.3.6
curator-framework-5.4.0
curator-recipes-5.4.0