Java Exception: java.io.InvalidClassException solution

Issue:

When you deploy your EJB application to Weblogic Server and running client to test, you may got following exception. Please note red fonts.

d:/Oracle/Middleware/jdk160_11/bin/javaw.exe -client -classpath F:/Java/TestEJB2/Client/classes;F:/Java/TestEJB2/EJBProject/classes;F:/ResourceAdapter/Siebel.jar;F:/ResourceAdapter/SiebelJI_enu_D.jar;D:/Oracle/Middleware/modules/javax.resource_1.5.1.jar;D:/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar;D:/Oracle/Middleware/modules/javax.ejb_3.0.1.jar;E:/Thrid-Part/junit4.7/junit-dep-4.7.jar;E:/Thrid-Part/junit4.7/junit-4.7.jar -Dweblogic.MaxMessageSize=20000000 -Xms256m -Xmx1024m -XX:-UseGCOverheadLimit eaiadapterclient.EAISiebelAdapter_InsertClient
m_cf_home weblogic.rmi.internal.BasicRemoteRef - hostID: '-2133479994242852382S:10.182.105.200:[7101,7101,-1,-1,-1,-1,-1]:DefaultDomain:DefaultServer', oid: '329', channel: 'null'
Exception in thread "main" javax.ejb.EJBException: error unmarshalling arguments; nested exception is: 
    
    at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
    at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:197)
    at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:564)
    at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:193)
    at com.siebel.ejb.jca.eaisiebeladapter.EAI_Siebel_AdapterSessionEJBBean_wqgu4k_EAI_Siebel_AdapterSessionEJBRemoteImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
    at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
javax.ejb.EJBException: error unmarshalling arguments; nested exception is: 
    java.io.InvalidClassException: com.siebel.service.jca.eaisiebeladapter.InsertInput; local class incompatible: stream classdesc serialVersionUID = 7638328194555425627, local class serialVersionUID = 5120588179366104594; nested exception is: java.io.InvalidClassException: com.siebel.service.jca.eaisiebeladapter.InsertInput; local class incompatible: stream classdesc serialVersionUID = 7638328194555425627, local class serialVersionUID = 5120588179366104594
    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.unwrapRemoteException(RemoteBusinessIntfProxy.java:109)
    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:91)
    at $Proxy0.Insert(Unknown Source)
    at eaiadapterclient.EAISiebelAdapter_InsertClient.main(EAISiebelAdapter_InsertClient.java:60)
Caused by: java.io.InvalidClassException: com.siebel.service.jca.eaisiebeladapter.InsertInput; local class incompatible: stream classdesc serialVersionUID = 7638328194555425627, local class serialVersionUID = 5120588179366104594
    at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
    at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:197)
    at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:564)
    at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:193)
    at com.siebel.ejb.jca.eaisiebeladapter.EAI_Siebel_AdapterSessionEJBBean_wqgu4k_EAI_Siebel_AdapterSessionEJBRemoteImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
    at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Process exited with exit code 1.
Reason:
This may be a defect of WLS. Above exception indicates that your class(com.siebel.service.jca.eaisiebeladapter.InsertInput) version that is in server side is not consistent with your InsertInput class which is in your client side.
private static final long serialVersionUID = 5120588179366104594L ;
<style type="text/css">.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } </style>
<style type="text/css">.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } </style>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值