0

我们正在运行 JBoss 7.1.1 Final。我们运行 Jgroup 频道并通过它发送消息。在 org.jgroups.Message 中,我们设置了我们的自定义对象,这些对象存在于我们耳朵的 lib 中的 jars 中。我们的耳朵依赖于名为 pam "Dependencies: pam" 的模块,并且 pam 模块添加了 jgroups 的依赖关系

现在,当我们尝试发送和接收消息时,我们会遇到以下异常

INFO   | jvm 1    | 2013/04/22 14:17:42 | 14:17:42,447 SEVERE [org.jgroups.protocols.pbcast.NAKACK] (Incoming-8,PAM_Cluster_009bab72-bd07-4a97-993f-307f0161cd93,6ea3721c-4e05-4d4c-b0de-d0e17acdbaf0) couldn't deliver message [dst: <null>, src: ba1438dc-c17d-4dca-b30d-62bd4d755b3d (3 headers), size=859 bytes]: java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: com.pam.automation.server.GlobalDBNotification from [Module "org.jgroups:main" from local module loader @6f991ccf (roots: C:\Jboss7\node1\standalone\..\modules)]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jgroups.Message.getObject(Message.java:379) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at com.pam.automation.server.ClusterViewChangeListener.processMessagage(ClusterViewChangeListener.java:119) [clusterservices-snapshot.jar:4.2]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at com.pam.automation.server.ClusterViewChangeListener$1.receive(ClusterViewChangeListener.java:84) [clusterservices-snapshot.jar:4.2]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jgroups.JChannel.invokeCallback(JChannel.java:758) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jgroups.JChannel.up(JChannel.java:719) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1026) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jgroups.protocols.pbcast.STATE_TRANSFER.up(STATE_TRANSFER.java:178) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jgroups.protocols.FRAG2.up(FRAG2.java:181) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jgroups.protocols.FlowControl.up(FlowControl.java:400) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jgroups.protocols.FlowControl.up(FlowControl.java:418) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jgroups.protocols.pbcast.GMS.up(GMS.java:881) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:244) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jgroups.protocols.UNICAST.up(UNICAST.java:332) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jgroups.protocols.pbcast.NAKACK.handleMessage(NAKACK.java:730) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:559) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jgroups.protocols.BARRIER.up(BARRIER.java:126) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:140) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jgroups.protocols.FD.up(FD.java:273) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:282) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jgroups.protocols.MERGE2.up(MERGE2.java:205) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jgroups.protocols.Discovery.up(Discovery.java:355) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jgroups.protocols.TP.passMessageUp(TP.java:1174) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1722) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1699) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_01]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_01]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_01]
INFO   | jvm 1    | 2013/04/22 14:17:42 | Caused by: java.lang.ClassNotFoundException: com.pam.automation.server.GlobalDBNotification from [Module "org.jgroups:main" from local module loader @6f991ccf (roots: C:\Jboss7\node1\standalone\..\modules)]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_01]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at java.lang.Class.forName(Class.java:264) [rt.jar:1.7.0_01]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:622) [rt.jar:1.7.0_01]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1593) [rt.jar:1.7.0_01]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1514) [rt.jar:1.7.0_01]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750) [rt.jar:1.7.0_01]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) [rt.jar:1.7.0_01]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964) [rt.jar:1.7.0_01]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:498) [rt.jar:1.7.0_01]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at javax.management.Notification.readObject(Notification.java:370) [rt.jar:1.7.0_01]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_01]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_01]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_01]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_01]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:991) [rt.jar:1.7.0_01]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1866) [rt.jar:1.7.0_01]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) [rt.jar:1.7.0_01]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) [rt.jar:1.7.0_01]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369) [rt.jar:1.7.0_01]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jgroups.util.Util.objectFromByteBuffer(Util.java:416) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           at org.jgroups.Message.getObject(Message.java:376) [jgroups-3.0.6.Final.jar:3.0.6.Final]
INFO   | jvm 1    | 2013/04/22 14:17:42 |           ... 26 more

目前为了解决这个问题,我们在耳朵的 lib 中添加了 jgroup jar。有没有其他方法可以解决这种类型的序列化问题?

4

1 回答 1

0

module.xmlorg/jgroups/main 模块的文件缺少依赖项,在这种情况下是包含该类GlobalDBNotification的模块或 .jar 文件。添加缺少的依赖项,错误就会消失。

于 2013-05-01T18:52:56.970 回答