Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seata 2.0 服务端mysql+jdk8+业务SqlServer seata-server报错 com.alipay.sofa.jraft.rpc.RaftRpcFactory: could not find any implementation for class #6445

Closed
zhao-wen-bin opened this issue Mar 27, 2024 · 3 comments

Comments

@zhao-wen-bin
Copy link

微信图片_20240327191452

19:00:15.308 INFO --- [ batchLoggerPrint_1_1] [ocessor.server.BatchLogHandler] [ run] [] : receive msg[single]: GlobalBeginRequest{transactionName='test(com.kcsaas.device.index.dto.RfCollectionMixedDto)', timeout=60000}, clientIp: 192.168.1.5, vgroup: kcsaas_tx_group
19:00:15.369 INFO --- [rverHandlerThread_1_4_500] [coordinator.DefaultCoordinator] [ doGlobalBegin] [192.168.1.5:8091:2126203249447116801] : Begin new global transaction appl
icationId: service-task,transactionServiceGroup: kcsaas_tx_group, transactionName: test(com.kcsaas.device.index.dto.RfCollectionMixedDto),timeout:60000,xid:192.168.1.5:8091:2126203249447116801
19:00:15.371 INFO --- [ batchLoggerPrint_1_1] [ocessor.server.BatchLogHandler] [ run] [] : result msg[single]: GlobalBeginResponse{xid='192.168.1.5:8091:2126203249447116801', extraData='null', resultCode=Success, msg='null'}, clientIp: 192.168.1.5, vgroup: kcsaas_tx_group
19:00:17.864 INFO --- [ batchLoggerPrint_1_1] [ocessor.server.BatchLogHandler] [ run] [] : receive msg[merged]: BranchRegisterRequest{xid='192.168.1.5:8091:2126
203249447116801', branchType=AT, resourceId='jdbc:sqlserver://sqlserver:1433;databaseName=DL_CP_WMS_DEVICE', lockKey='rf_collection:428ea601022f9a04bdfc21aa67237a4f', applicationData='{"autoCommit":false}'}, clientIp: 192.168.1.5, vgroup: kcsaas_tx_group
java.util.ServiceConfigurationError: com.alipay.sofa.jraft.rpc.RaftRpcFactory: could not find any implementation for class
at com.alipay.sofa.jraft.util.JRaftServiceLoader.fail(JRaftServiceLoader.java:161)
at com.alipay.sofa.jraft.util.JRaftServiceLoader.first(JRaftServiceLoader.java:113)
at com.alipay.sofa.jraft.util.RpcFactoryHelper.(RpcFactoryHelper.java:28)
at com.alipay.sofa.jraft.rpc.ProtobufMsgFactory.(ProtobufMsgFactory.java:57)
at com.alipay.sofa.jraft.rpc.impl.AbstractClientService.(AbstractClientService.java:63)
at com.alipay.sofa.jraft.core.CliServiceImpl.init(CliServiceImpl.java:88)
at com.alipay.sofa.jraft.core.CliServiceImpl.init(CliServiceImpl.java:73)
at com.alipay.sofa.jraft.RaftServiceFactory.createAndInitCliService(RaftServiceFactory.java:65)
at io.seata.server.cluster.raft.RaftServerFactory$SingletonHandler.(RaftServerFactory.java:233)
at io.seata.server.cluster.raft.RaftServerFactory.getInstance(RaftServerFactory.java:78)
at io.seata.server.session.GlobalSession.addBranch(GlobalSession.java:316)
at io.seata.server.coordinator.AbstractCore.lambda$branchRegister$0(AbstractCore.java:84)
at io.seata.server.storage.db.session.DataBaseSessionManager.lockAndExecute(DataBaseSessionManager.java:153)
at io.seata.server.session.SessionHolder.lockAndExecute(SessionHolder.java:332)
at io.seata.server.coordinator.AbstractCore.branchRegister(AbstractCore.java:77)
at io.seata.server.coordinator.DefaultCore.branchRegister(DefaultCore.java:107)
at io.seata.server.coordinator.DefaultCoordinator.doBranchRegister(DefaultCoordinator.java:299)
at io.seata.server.AbstractTCInboundHandler$4.execute(AbstractTCInboundHandler.java:184)
at io.seata.server.AbstractTCInboundHandler$4.execute(AbstractTCInboundHandler.java:179)
at io.seata.core.exception.AbstractExceptionHandler.exceptionHandleTemplate(AbstractExceptionHandler.java:131)
at io.seata.server.AbstractTCInboundHandler.handle(AbstractTCInboundHandler.java:179)
at io.seata.core.protocol.transaction.BranchRegisterRequest.handle(BranchRegisterRequest.java:136)
at io.seata.server.coordinator.DefaultCoordinator.onRequest(DefaultCoordinator.java:523)
at io.seata.core.rpc.processor.server.ServerOnRequestProcessor.handleRequestsByMergedWarpMessage(ServerOnRequestProcessor.java:288)
at io.seata.core.rpc.processor.server.ServerOnRequestProcessor.lambda$onRequestMessage$1(ServerOnRequestProcessor.java:178)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
19:00:18.095 ERROR --- [rverHandlerThread_1_5_500] [erver.ServerOnRequestProcessor] [ onRequestMessage] [] : handle request error: java.lang.ExceptionInInitializerError
==>
java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396) ~[na:na]
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073) ~[na:na]
at io.seata.core.rpc.processor.server.ServerOnRequestProcessor.onRequestMessage(ServerOnRequestProcessor.java:188) ~[seata-core-2.0.0.jar:2.0.0]
at io.seata.core.rpc.processor.server.ServerOnRequestProcessor.process(ServerOnRequestProcessor.java:122) ~[seata-core-2.0.0.jar:2.0.0]
at io.seata.core.rpc.netty.AbstractNettyRemoting.lambda$processMessage$2(AbstractNettyRemoting.java:280) ~[seata-core-2.0.0.jar:2.0.0]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.100.Final.jar:4.1.100.Final]
at java.base/java.lang.Thread.run(Thread.java:840) ~[na:na]
Caused by: java.lang.ExceptionInInitializerError: null
at com.alipay.sofa.jraft.core.CliServiceImpl.init(CliServiceImpl.java:88) ~[jraft-core-1.3.13.jar:na]
at com.alipay.sofa.jraft.core.CliServiceImpl.init(CliServiceImpl.java:73) ~[jraft-core-1.3.13.jar:na]
at com.alipay.sofa.jraft.RaftServiceFactory.createAndInitCliService(RaftServiceFactory.java:65) ~[jraft-core-1.3.13.jar:na]
at io.seata.server.cluster.raft.RaftServerFactory$SingletonHandler.(RaftServerFactory.java:233) ~[classes!/:2.0.0]
at io.seata.server.cluster.raft.RaftServerFactory.getInstance(RaftServerFactory.java:78) ~[classes!/:2.0.0]
at io.seata.server.session.GlobalSession.addBranch(GlobalSession.java:316) ~[classes!/:2.0.0]
at io.seata.server.coordinator.AbstractCore.lambda$branchRegister$0(AbstractCore.java:84) ~[classes!/:2.0.0]
at io.seata.server.storage.db.session.DataBaseSessionManager.lockAndExecute(DataBaseSessionManager.java:153) ~[classes!/:2.0.0]
at io.seata.server.session.SessionHolder.lockAndExecute(SessionHolder.java:332) ~[classes!/:2.0.0]
at io.seata.server.coordinator.AbstractCore.branchRegister(AbstractCore.java:77) ~[classes!/:2.0.0]
at io.seata.server.coordinator.DefaultCore.branchRegister(DefaultCore.java:107) ~[classes!/:2.0.0]
at io.seata.server.coordinator.DefaultCoordinator.doBranchRegister(DefaultCoordinator.java:299) ~[classes!/:2.0.0]
at io.seata.server.AbstractTCInboundHandler$4.execute(AbstractTCInboundHandler.java:184) ~[classes!/:2.0.0]
at io.seata.server.AbstractTCInboundHandler$4.execute(AbstractTCInboundHandler.java:179) ~[classes!/:2.0.0]
at io.seata.core.exception.AbstractExceptionHandler.exceptionHandleTemplate(AbstractExceptionHandler.java:131) ~[seata-core-2.0.0.jar:2.0.0]
at io.seata.server.AbstractTCInboundHandler.handle(AbstractTCInboundHandler.java:179) ~[classes!/:2.0.0]
at io.seata.core.protocol.transaction.BranchRegisterRequest.handle(BranchRegisterRequest.java:136) ~[seata-core-2.0.0.jar:2.0.0]
at io.seata.server.coordinator.DefaultCoordinator.onRequest(DefaultCoordinator.java:523) ~[classes!/:2.0.0]
at io.seata.core.rpc.processor.server.ServerOnRequestProcessor.handleRequestsByMergedWarpMessage(ServerOnRequestProcessor.java:288) ~[seata-core-2.0.0.jar:2.0.0]
at io.seata.core.rpc.processor.server.ServerOnRequestProcessor.lambda$onRequestMessage$1(ServerOnRequestProcessor.java:178) ~[seata-core-2.0.0.jar:2.0.0]
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[na:na]
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760) ~[na:na]
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[na:na]
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[na:na]
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[na:na]
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[na:na]
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[na:na]
Caused by: java.lang.IllegalStateException: Parse protocol file failed.
at com.alipay.sofa.jraft.rpc.ProtobufMsgFactory.load(ProtobufMsgFactory.java:88) ~[jraft-core-1.3.13.jar:na]
at com.alipay.sofa.jraft.rpc.impl.AbstractClientService.(AbstractClientService.java:63) ~[jraft-core-1.3.13.jar:na]
... 27 common frames omitted
<==

19:00:47.897 INFO --- [ batchLoggerPrint_1_1] [ocessor.server.BatchLogHandler] [ run] [] : receive msg[single]: GlobalCommitRequest{xid='192.168.1.5:8091:2126203249447116801', extraData='null'}, clientIp: 192.168.1.5, vgroup: kcsaas_tx_group
19:00:47.913 INFO --- [ batchLoggerPrint_1_1] [ocessor.server.BatchLogHandler] [ run] [] : result msg[single]: GlobalCommitResponse{globalStatus=Committed, resultCode=Success, msg='null'}, clientIp: 192.168.1.5, vgroup: kcsaas_tx_group
19:00:48.417 INFO --- [ batchLoggerPrint_1_1] [ocessor.server.BatchLogHandler] [ run] [] : receive msg[single]: BranchCommitResponse{xid='192.168.1.5:8091:2126203249447116801', branchId=2126203249447116806, branchStatus=PhaseTwo_Committed, resultCode=Success, msg='null'}, clientIp: 192.168.1.5, vgroup: kcsaas_tx_group
19:00:48.425 ERROR --- [ AsyncCommitting_1_1] [a.server.session.SessionHelper] [ lambda$forEach$0] [192.168.1.5:8091:2126203249447116801] : handle global session failed: 192.168.1.5:8091:2126203249447116801
==>
java.lang.NoClassDefFoundError: Could not initialize class io.seata.server.cluster.raft.RaftServerFactory$SingletonHandler
at io.seata.server.cluster.raft.RaftServerFactory.getInstance(RaftServerFactory.java:78) ~[classes!/:2.0.0]
at io.seata.server.session.GlobalSession.removeBranch(GlobalSession.java:352) ~[classes!/:2.0.0]
at io.seata.server.session.SessionHelper.removeBranch(SessionHelper.java:429) ~[classes!/:2.0.0]
at io.seata.server.coordinator.DefaultCore.lambda$doGlobalCommit$1(DefaultCore.java:223) ~[classes!/:2.0.0]
at io.seata.server.session.SessionHelper.forEach(SessionHelper.java:381) ~[classes!/:2.0.0]
at io.seata.server.coordinator.DefaultCore.doGlobalCommit(DefaultCore.java:204) ~[classes!/:2.0.0]
at io.seata.server.coordinator.DefaultCoordinator.lambda$handleAsyncCommitting$4(DefaultCoordinator.java:453) ~[classes!/:2.0.0]
at io.seata.server.session.SessionHelper.lambda$forEach$0(SessionHelper.java:305) ~[classes!/:2.0.0]
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[na:na]
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) ~[na:na]
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[na:na]
at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290) ~[na:na]
at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754) ~[na:na]
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[na:na]
at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:686) ~[na:na]
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:159) ~[na:na]
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:173) ~[na:na]
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233) ~[na:na]
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[na:na]
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:765) ~[na:na]
at io.seata.server.session.SessionHelper.forEach(SessionHelper.java:301) ~[classes!/:2.0.0]
at io.seata.server.session.SessionHelper.forEach(SessionHelper.java:322) ~[classes!/:2.0.0]
at io.seata.server.coordinator.DefaultCoordinator.handleAsyncCommitting(DefaultCoordinator.java:451) ~[classes!/:2.0.0]
at io.seata.server.session.SessionHolder.distributedLockAndExecute(SessionHolder.java:365) ~[classes!/:2.0.0]
at io.seata.server.coordinator.DefaultCoordinator.lambda$init$7(DefaultCoordinator.java:503) ~[classes!/:2.0.0]
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[na:na]
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[na:na]
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.100.Final.jar:4.1.100.Final]
at java.base/java.lang.Thread.run(Thread.java:840) ~[na:na]
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.ExceptionInInitializerError [in thread "ForkJoinPool.commonPool-worker-2"]
at com.alipay.sofa.jraft.core.CliServiceImpl.init(CliServiceImpl.java:88) ~[jraft-core-1.3.13.jar:na]
at com.alipay.sofa.jraft.core.CliServiceImpl.init(CliServiceImpl.java:73) ~[jraft-core-1.3.13.jar:na]
at com.alipay.sofa.jraft.RaftServiceFactory.createAndInitCliService(RaftServiceFactory.java:65) ~[jraft-core-1.3.13.jar:na]
at io.seata.server.cluster.raft.RaftServerFactory$SingletonHandler.(RaftServerFactory.java:233) ~[classes!/:2.0.0]
at io.seata.server.cluster.raft.RaftServerFactory.getInstance(RaftServerFactory.java:78) ~[classes!/:2.0.0]
at io.seata.server.session.GlobalSession.addBranch(GlobalSession.java:316) ~[classes!/:2.0.0]
at io.seata.server.coordinator.AbstractCore.lambda$branchRegister$0(AbstractCore.java:84) ~[classes!/:2.0.0]
at io.seata.server.storage.db.session.DataBaseSessionManager.lockAndExecute(DataBaseSessionManager.java:153) ~[classes!/:2.0.0]
at io.seata.server.session.SessionHolder.lockAndExecute(SessionHolder.java:332) ~[classes!/:2.0.0]
at io.seata.server.coordinator.AbstractCore.branchRegister(AbstractCore.java:77) ~[classes!/:2.0.0]
at io.seata.server.coordinator.DefaultCore.branchRegister(DefaultCore.java:107) ~[classes!/:2.0.0]
at io.seata.server.coordinator.DefaultCoordinator.doBranchRegister(DefaultCoordinator.java:299) ~[classes!/:2.0.0]
at io.seata.server.AbstractTCInboundHandler$4.execute(AbstractTCInboundHandler.java:184) ~[classes!/:2.0.0]
at io.seata.server.AbstractTCInboundHandler$4.execute(AbstractTCInboundHandler.java:179) ~[classes!/:2.0.0]
at io.seata.core.exception.AbstractExceptionHandler.exceptionHandleTemplate(AbstractExceptionHandler.java:131) ~[seata-core-2.0.0.jar:2.0.0]
at io.seata.server.AbstractTCInboundHandler.handle(AbstractTCInboundHandler.java:179) ~[classes!/:2.0.0]
at io.seata.core.protocol.transaction.BranchRegisterRequest.handle(BranchRegisterRequest.java:136) ~[seata-core-2.0.0.jar:2.0.0]
at io.seata.server.coordinator.DefaultCoordinator.onRequest(DefaultCoordinator.java:523) ~[classes!/:2.0.0]
at io.seata.core.rpc.processor.server.ServerOnRequestProcessor.handleRequestsByMergedWarpMessage(ServerOnRequestProcessor.java:288) ~[seata-core-2.0.0.jar:2.0.0]
at io.seata.core.rpc.processor.server.ServerOnRequestProcessor.lambda$onRequestMessage$1(ServerOnRequestProcessor.java:178) ~[seata-core-2.0.0.jar:2.0.0]
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[na:na]
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760) ~[na:na]
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[na:na]
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[na:na]
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[na:na]
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[na:na]
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[na:na]
<==

19:00:49.410 INFO --- [ AsyncCommitting_1_1] [server.coordinator.DefaultCore] [ doGlobalCommit] [192.168.1.5:8091:2126203249447116801] : Committing global transaction is successfully done, xid = 192.168.1.5:8091:2126203249447116801.

@zhao-wen-bin zhao-wen-bin changed the title seata 2.0 SqlServer 报com.alipay.sofa.jraft.rpc.RaftRpcFactory: could not find any implementation for class seata 2.0 jdk8 SqlServer 报com.alipay.sofa.jraft.rpc.RaftRpcFactory: could not find any implementation for class Mar 27, 2024
@zhao-wen-bin zhao-wen-bin changed the title seata 2.0 jdk8 SqlServer 报com.alipay.sofa.jraft.rpc.RaftRpcFactory: could not find any implementation for class seata 2.0 jdk8 SqlServer seata-server报错 com.alipay.sofa.jraft.rpc.RaftRpcFactory: could not find any implementation for class Mar 27, 2024
@zhao-wen-bin zhao-wen-bin changed the title seata 2.0 jdk8 SqlServer seata-server报错 com.alipay.sofa.jraft.rpc.RaftRpcFactory: could not find any implementation for class seata 2.0+jdk8+SqlServer seata-server报错 com.alipay.sofa.jraft.rpc.RaftRpcFactory: could not find any implementation for class Mar 27, 2024
@zhao-wen-bin zhao-wen-bin changed the title seata 2.0+jdk8+SqlServer seata-server报错 com.alipay.sofa.jraft.rpc.RaftRpcFactory: could not find any implementation for class seata 2.0 服务端mysql+jdk8+业务SqlServer seata-server报错 com.alipay.sofa.jraft.rpc.RaftRpcFactory: could not find any implementation for class Mar 27, 2024
@funky-eyes
Copy link
Contributor

#6089

@17351590701
Copy link

解决了吗,我也遇到这个问题了。

@fangfu-kou
Copy link

解决了吗,我也遇到这个问题了。

哥们你解决了吗,我2.0报错,降成1.7.1没事了,到底为什么报错呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants