java.io.invalidclassexception_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:

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

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)

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.

Solution:

Please define serialVersionUID in your class(InsertInput.java) in manually.

private static final long serialVersionUID = 5120588179366104594L ;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值