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

客户端启动报错 #27

Open
hqlalala opened this issue Sep 10, 2023 · 8 comments
Open

客户端启动报错 #27

hqlalala opened this issue Sep 10, 2023 · 8 comments

Comments

@hqlalala
Copy link

Sofa-Middleware-Log SLF4J : Actual binding is of type [ com.alipay.remoting Log4j ]
2023-09-10 16:42:07,599 main INFO [com.alipay.sofa.common.log:report:30] - Sofa-Middleware-Log SLF4J : Actual binding is of type [ com.alipay.remoting Log4j ]
Exception in thread "main" java.lang.NoClassDefFoundError: com/caucho/hessian/io/SerializerFactory
at com.alipay.remoting.serialization.HessianSerializer.(HessianSerializer.java:36)
at com.alipay.remoting.serialization.SerializerManager.(SerializerManager.java:36)
at com.alipay.remoting.rpc.protocol.RpcRequestCommand.serializeContent(RpcRequestCommand.java:132)
at com.alipay.remoting.rpc.RpcCommand.serialize(RpcCommand.java:105)
at com.alipay.remoting.rpc.RpcRemoting.toRemotingCommand(RpcRemoting.java:353)
at com.alipay.remoting.rpc.RpcRemoting.invokeSync(RpcRemoting.java:179)
at com.alipay.remoting.rpc.RpcClientRemoting.invokeSync(RpcClientRemoting.java:72)
at com.alipay.remoting.rpc.RpcRemoting.invokeSync(RpcRemoting.java:143)
at com.alipay.remoting.rpc.RpcClient.invokeSync(RpcClient.java:219)
at cn.think.in.java.raft.common.rpc.DefaultRpcClient.send(DefaultRpcClient.java:42)
at cn.think.in.java.raft.common.rpc.DefaultRpcClient.send(DefaultRpcClient.java:35)
at cn.think.in.java.raft.client.RaftClientRPC.put(RaftClientRPC.java:89)
at cn.think.in.java.raft.client.RaftClient1.main(RaftClient1.java:38)
Caused by: java.lang.ClassNotFoundException: com.caucho.hessian.io.SerializerFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 13 more

客户端发送消息失败

@hqlalala
Copy link
Author

可以麻烦解答一下吗,谢谢大佬

@leakey0626
Copy link
Contributor

解决了吗?看起来像是依赖出了问题

@hqlalala
Copy link
Author

已经解决了,客户端里的依赖和服务端不一致

@ldzhang1
Copy link

你好,请问一下哪儿不一致啊,我也遇到了这个问题 @hqlalala

@ldzhang1
Copy link

你好,请问一下哪儿不一致啊,我也遇到了这个问题 @hqlalala

已解决

@ShawnWhite666
Copy link

我也遇到了,查看maven的依赖库仔细比对,有版本不一致的地方通过更改pom来修复,我出的问题是lombok版本问题,客户端服务端是1.18.2 项目lombok版本是1.18.26 修改之后就好了

@Sepn1ne
Copy link

Sepn1ne commented Sep 23, 2024

你好,请问一下哪儿不一致啊,我也遇到了这个问题 @hqlalala

已解决

您好,请问您是怎么解决这个问题的? @ldzhang1

@Sepn1ne
Copy link

Sepn1ne commented Sep 24, 2024

你好,请问一下哪儿不一致啊,我也遇到了这个问题 @hqlalala

已解决

您好,请问您是怎么解决这个问题的? @ldzhang1

已解决,我这里的解决方法是:在项目结构的库中,可以找到hessian的jar包,右键将这个包给添加到client模块和common模块,之后对maven进行clean install即可。

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

5 participants