我运行我的应用程序时Weblogic中的异常?

时间:2012-03-27 06:49:31

标签: java swing exception weblogic

当我运行我的应用程序时,我得到以下异常。 我没有问题,因为它没有任何问题,但我担心生产。 任何人都可以提出理由并最终解决吗?

weblogic.rjvm.PeerGoneException: ; nested exception is: 
java.rmi.UnmarshalException: Incoming message header or abbreviation processing failed ; nested exception is: 
java.io.InvalidClassException: du.bzvd.j2ee.resources.PrinterVO; local class incompatible: stream classdesc serialVersionUID = 0, local class serialVersionUID = 1
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:221)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:338)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:252)
at du.bzvd.j2ee.resources.bean.ResourcesFacade_yp0dn4_EOImpl_1000_WLStub.getDefaultPrinterForComputer(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at du.bzvd.j2ee.arch.util.security.AuthenticatedSessionFacade$1.run(AuthenticatedSessionFacade.java:60)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.security.Security.runAs(Security.java:61)
at du.bzvd.j2ee.arch.util.security.AuthenticatedSessionFacade.invokeAuthenticated(AuthenticatedSessionFacade.java:58)
at du.bzvd.j2ee.arch.util.security.AuthenticatedSessionFacade.invoke(AuthenticatedSessionFacade.java:43)
at $Proxy2.getDefaultPrinterForComputer(Unknown Source)
at du.bzvd.j2eeutil.resource.ResourceGateway$10.call(ResourceGateway.java:166)
at du.bzvd.j2eeutil.resource.ResourceGateway$10.call(ResourceGateway.java:165)
at du.bzvd.j2eeutil.resource.ResourceGateway.getImpl(ResourceGateway.java:386)
at du.bzvd.j2eeutil.resource.ResourceGateway.getDefaultPrinterForComputer(ResourceGateway.java:164)
at du.bzvd.info.KWSInfoPanel.getDefaultPrinterForComputer(KWSInfoPanel.java:185)
at du.bzvd.info.KWSInfoPanel.getProperties(KWSInfoPanel.java:107)
at du.bzvd.info.KWSInfoPanel.getGuiLessSummary(KWSInfoPanel.java:135)
at du.bzvd.info.InfoCollector.saveSummary(InfoCollector.java:27)
at du.bzvd.info.InfoCollector.access$000(InfoCollector.java:16)
at du.bzvd.info.InfoCollector$InfoCollectorThread.run(InfoCollector.java:120)
    Caused by: java.rmi.UnmarshalException: Incoming message header or abbreviation processing failed ; nested exception is: 
java.io.InvalidClassException: du.bzvd.j2ee.resources.PrinterVO; local class incompatible: stream classdesc serialVersionUID = 0, local class serialVersionUID = 1
at weblogic.rjvm.MsgAbbrevJVMConnection.dispatch(MsgAbbrevJVMConnection.java:441)
at weblogic.rjvm.t3.MuxableSocketT3.dispatch(MuxableSocketT3.java:368)
at weblogic.socket.AbstractMuxableSocket.dispatch(AbstractMuxableSocket.java:383)
at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:872)
at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:808)
at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:283)
at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
    Caused by: java.io.InvalidClassException: du.bzvd.j2ee.resources.PrinterVO; local class incompatible: stream classdesc serialVersionUID = 0, local class serialVersionUID = 1
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:546)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1292)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at weblogic.rjvm.ClassTableEntry.readExternal(ClassTableEntry.java:36)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1756)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at weblogic.rjvm.InboundMsgAbbrev.readObject(InboundMsgAbbrev.java:65)
at weblogic.rjvm.InboundMsgAbbrev.read(InboundMsgAbbrev.java:37)
at weblogic.rjvm.MsgAbbrevJVMConnection.readMsgAbbrevs(MsgAbbrevJVMConnection.java:223)
at weblogic.rjvm.MsgAbbrevInputStream.init(MsgAbbrevInputStream.java:174)
at weblogic.rjvm.MsgAbbrevJVMConnection.dispatch(MsgAbbrevJVMConnection.java:435)

1 个答案:

答案 0 :(得分:1)

问题在于您想要编组/解组的对象的类的serialVerUID

在您获得的例外中看到以下行: stream classdesc serialVersionUID = 0,本地类serialVersionUID = 1

serialVersionUID不匹配。更改serialVersion UID或更改类的任何成员时会发生这种情况。

您可以在您的类PrinterVO中定义成员变量,如:

static long serialVersionUID = 0