java.rmi.MarshalException [英] java.rmi.MarshalException

查看:647
本文介绍了java.rmi.MarshalException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我尝试从客户端调用ejb时,都会收到以下错误:

whenever I try to call my ejb from a client, I get this error :

  java.rmi.MarshalException: Failed to communicate. 

    Problem during     marshalling/unmarshalling; nested exception is: 

    java.io.InvalidClassException: com.afrikbrain.util.message.MessageInfo;

    local     class incompatible:

   stream classdesc serialVersionUID = 2285009932770474121, 

   local class     serialVersionUID = -2900394430145132451 at      

  org.jboss.remoting.transport.socket.SocketClientInvoker.handleException(SocketClientInvoker
.java:122)

为什么会发生?如何解决?

why is it occuring ? and how to solve it ?

推荐答案

本地类和远程类是不同的版本。在解组过程中,接收方不支持发送方的协议版本。确保服务器上的编译类与客户机上编译类的版本是一样的,因此可以将其序列化/反序列化。
我建议您从零开始重新整理项目并重新部署,并重新生成存根。

The local class and the remote class are differente versions. During the unmarshalling process the receiver does not support the protocol version of the sender. Make sure the compiled class on the server is the same version of the compiled class on the client, so can be serialized/deserialized without problems. I suggest you rebuilding from zero all the project and redeploying them, and regenerate the stubs.

这篇关于java.rmi.MarshalException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆