[jboss-user] [JBoss Messaging] - Problems with concurrent.jar

kkoster do-not-reply at jboss.com
Thu Jun 28 12:29:53 EDT 2007


I know this is not directly related to JBoss Messaging, but since it came up during its usage I thought this would be a good place to post this problem. It seems that the ConcurrentHashMap's inner Segment class is not marked as Serializable (it is in the Doug Lea's source code) and is causing problems with messaging. The concurrent.jar that is being used is in the latest AOP (1.5.5.GA) release in the either the lib or lib-50 directory. The version in the lib directory of JAS is marked as serializable and when switching to that version, the exceptions stopped.

Below is a stack trace of the exceptions being thrown by the messaging client when using the AOP version of concurrent.jar:


  | 11:41:03,751 ERROR [JMSWireFormat] Failed to write packet
  | java.io.NotSerializableException: EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap$Segment
  | 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
  | 	at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
  | 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
  | 	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
  | 	at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:391)
  | 	at EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap.writeObject(ConcurrentHashMap.java:1170)
  | 	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:585)
  | 	at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
  | 	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
  | 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
  | 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
  | 	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
  | 	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
  | 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
  | 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
  | 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
  | 	at org.jboss.jms.wireformat.SerializedPacket.write(SerializedPacket.java:80)
  | 	at org.jboss.jms.wireformat.JMSWireFormat.write(JMSWireFormat.java:237)
  | 	at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedWrite(MicroSocketClientInvoker.java:969)
  | 	at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:557)
  | 	at org.jboss.remoting.transport.bisocket.BisocketClientInvoker.transport(BisocketClientInvoker.java:339)
  | 	at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
  | 	at org.jboss.remoting.LeasePinger.sendClientPing(LeasePinger.java:283)
  | 	at org.jboss.remoting.LeasePinger.addClient(LeasePinger.java:117)
  | 	at org.jboss.remoting.MicroRemoteClientInvoker.establishLease(MicroRemoteClientInvoker.java:398)
  | 	at org.jboss.remoting.Client.setupClientLease(Client.java:1541)
  | 	at org.jboss.remoting.Client.connect(Client.java:1441)
  | 	at org.jboss.remoting.Client.connect(Client.java:444)
  | 	at org.jboss.jms.client.remoting.JMSRemotingConnection.start(JMSRemotingConnection.java:271)
  | 	at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$createConnectionDelegate$aop(ClientConnectionFactoryDelegate.java:146)
  | 	at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)
  | 	at org.jboss.jms.client.container.StateCreationAspect.handleCreateConnectionDelegate(StateCreationAspect.java:83)
  | 	at org.jboss.aop.advice.org.jboss.jms.client.container.StateCreationAspect0.invoke(StateCreationAspect0.java)
  | 	at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)
  | 	at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createConnectionDelegate(ClientConnectionFactoryDelegate.java)
  | 	at org.jboss.jms.client.container.ClusteringAspect.handleCreateConnectionDelegate(ClusteringAspect.java:131)
  | 	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:585)
  | 	at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:121)
  | 	at org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext(ClientClusteredConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)
  | 	at org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate.createConnectionDelegate(ClientClusteredConnectionFactoryDelegate.java)
  | 	at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:205)
  | 	at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:87)
  | 	at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:82)
  | 	at org.kdr.jms.BasicContentSynchManager.getConnection(BasicContentSynchManager.java:93)
  | 	at org.kdr.jms.BasicContentSynchManager.start(BasicContentSynchManager.java:191)
  | 	at org.kdr.jms.TestContentSynchManager.<init>(TestContentSynchManager.java:41)
  | 	at org.kdr.jms.TestContentSynchManager.main(TestContentSynchManager.java:63)
  | 11:41:03,766 ERROR [SocketClientInvoker] Got marshalling exception, exiting
  | java.io.IOException: EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap$Segment
  | 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
  | 	at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
  | 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
  | 	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
  | 	at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:391)
  | 	at EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap.writeObject(ConcurrentHashMap.java:1170)
  | 	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:585)
  | 	at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
  | 	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
  | 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
  | 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
  | 	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
  | 	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
  | 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
  | 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
  | 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
  | 	at org.jboss.jms.wireformat.SerializedPacket.write(SerializedPacket.java:80)
  | 	at org.jboss.jms.wireformat.JMSWireFormat.write(JMSWireFormat.java:237)
  | 	at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedWrite(MicroSocketClientInvoker.java:969)
  | 	at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:557)
  | 	at org.jboss.remoting.transport.bisocket.BisocketClientInvoker.transport(BisocketClientInvoker.java:339)
  | 	at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
  | 	at org.jboss.remoting.LeasePinger.sendClientPing(LeasePinger.java:283)
  | 	at org.jboss.remoting.LeasePinger.addClient(LeasePinger.java:117)
  | 	at org.jboss.remoting.MicroRemoteClientInvoker.establishLease(MicroRemoteClientInvoker.java:398)
  | 	at org.jboss.remoting.Client.setupClientLease(Client.java:1541)
  | 	at org.jboss.remoting.Client.connect(Client.java:1441)
  | 	at org.jboss.remoting.Client.connect(Client.java:444)
  | 	at org.jboss.jms.client.remoting.JMSRemotingConnection.start(JMSRemotingConnection.java:271)
  | 	at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$createConnectionDelegate$aop(ClientConnectionFactoryDelegate.java:146)
  | 	at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)
  | 	at org.jboss.jms.client.container.StateCreationAspect.handleCreateConnectionDelegate(StateCreationAspect.java:83)
  | 	at org.jboss.aop.advice.org.jboss.jms.client.container.StateCreationAspect0.invoke(StateCreationAspect0.java)
  | 	at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)
  | 	at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createConnectionDelegate(ClientConnectionFactoryDelegate.java)
  | 	at org.jboss.jms.client.container.ClusteringAspect.handleCreateConnectionDelegate(ClusteringAspect.java:131)
  | 	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:585)
  | 	at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:121)
  | 	at org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext(ClientClusteredConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)
  | 	at org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate.createConnectionDelegate(ClientClusteredConnectionFactoryDelegate.java)
  | 	at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:205)
  | 	at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:87)
  | 	at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:82)
  | 	at org.kdr.jms.BasicContentSynchManager.getConnection(BasicContentSynchManager.java:93)
  | 	at org.kdr.jms.BasicContentSynchManager.start(BasicContentSynchManager.java:191)
  | 	at org.kdr.jms.TestContentSynchManager.<init>(TestContentSynchManager.java:41)
  | 	at org.kdr.jms.TestContentSynchManager.main(TestContentSynchManager.java:63)
  | 11:41:03,766 WARN  [LeasePinger] LeasePinger[SocketClientInvoker[7981d5, bisocket://10.10.100.10:4457](aa2s2v-2r2fch-f3helqsj-1-f3helrmh-5)] failed to ping to server: Failed to communicate.  Problem during marshalling/unmarshalling; nested exception is: 
  | 	java.io.IOException: EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap$Segment
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4058842#4058842

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4058842



More information about the jboss-user mailing list