1 2 Previous Next 18 Replies Latest reply on Apr 17, 2006 7:17 PM by clebert.suconic

    problem consuming messages

    timfox

      Please can you supply the full test case so I can attempt to replicate.

      Thx

        • 1. Re: problem consuming messages
          timfox

          Ok, I have used the fragment of code you supplied in my own test case - and it seems to work fine - all messages in the queue are received as expected.

          As I say, please send me a full Junit test that replicates the problem and I shall investigate further.

          One thing I didn't understand: From your code fragment how can you tell that no messages are being received?

          BTW the test case that tests receiveNoWait functionality is:

          org.jboss.test.messaging.jms.MessageConsumerTest

          • 2. Re: problem consuming messages
            timfox

            Oh, the unit test suite is not distributed as part of the distribution.

            If you want to check out you need to get it from CVS.

            • 3. Re: problem consuming messages
              ovidiu.feodorov

              Thanks for raising the issue, "Guest".
              I'll bundle the tests with the release starting with the next release (we hope that will happen at the end of this week)

              • 4. Re: problem consuming messages

                Hey,

                Ok, I'm logged in now :)

                Thanks Ovidiu for bundling the test cases along with the distribution, I don't really want to get the full cvs checkout...

                >From your code fragment how can you tell that no messages are being received?
                Well, I've previously placed messages into the queue, and then used the jmx console to verify.

                The funny thing about this is that everything works just fine with JBoss MQ using the same code...

                I'll make a standalone test case tomorrow and post it.

                Regards,

                Mark

                • 5. Re: problem consuming messages - can't reproduce

                  Hi,

                  Well, appears to be a false alarm - today, after shuting down and starting up everything appears to work as it should. I will put up a new post if I notice the issue again. I don't think that I changed anything that this related to in my code, but not sure. Obviously that is why I wanted to run the test cases in the first place...

                  However, there is one thing that is reproducable. When I run my test cases and kill the JUnit process part way through (as I do fairly frequently for certain tests), I see the following in the console:

                  10:35:15,832 INFO [Server] JBoss (MX MicroKernel) [4.0.3SP1 (build: CVSTag=JBos
                  s_4_0_3_SP1 date=200510231054)] Started in 19s:31ms
                  10:36:47,160 WARN [SimpleConnectionManager] ConnectionManager[32087b] handling
                  client 5c4o04r-y3uuls-elz72pm3-1-elz72pop-3's remoting connection failure (null
                  Throwable)
                  10:36:47,160 ERROR [ConnectionNotifier] Error notifying connection listeners of
                  lost client connection.
                  java.util.ConcurrentModificationException
                   at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782)
                   at java.util.HashMap$EntryIterator.next(HashMap.java:824)
                   at org.jboss.jms.server.connectionmanager.SimpleConnectionManager.handle
                  ConnectionException(SimpleConnectionManager.java:154)
                   at org.jboss.remoting.ConnectionNotifier.connectionLost(ConnectionNotifi
                  er.java:46)
                   at org.jboss.remoting.Lease$LeaseTimerTask.run(Lease.java:130)
                   at java.util.TimerThread.mainLoop(Timer.java:432)
                   at java.util.TimerThread.run(Timer.java:382)
                  10:37:24,347 WARN [SimpleConnectionManager] ConnectionManager[32087b] handling
                  client 5c4o04r-d1xxu2-elz73iga-1-elz73iig-3's remoting connection failure (null
                  Throwable)
                  


                  Of course, there IS a lost connection, but the type of error (ConcurrentModificationException) seems funny to me...

                  Regards,

                  Mark

                  • 6. Re: problem consuming messages

                    Ugh, I spoke too soon. I can reproduce it, but involves an error when reading an object from a queue and then doing a redelivery. I'm assuming its my code at this point, but will let you know.

                    Mark

                    • 7. Re: problem consuming messages
                      ovidiu.feodorov

                       

                      "mwaschkowski" wrote:

                      However, there is one thing that is reproducable. When I run my test cases and kill the JUnit process part way through (as I do fairly frequently for certain tests), I see the following in the console:

                      
                      10:35:15,832 INFO [Server] JBoss (MX MicroKernel) [4.0.3SP1 (build: CVSTag=JBos
                      s_4_0_3_SP1 date=200510231054)] Started in 19s:31ms
                      10:36:47,160 WARN [SimpleConnectionManager] ConnectionManager[32087b] handling
                      client 5c4o04r-y3uuls-elz72pm3-1-elz72pop-3's remoting connection failure (null
                      Throwable)
                      10:36:47,160 ERROR [ConnectionNotifier] Error notifying connection listeners of
                      lost client connection.
                      java.util.ConcurrentModificationException
                       at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782)
                       at java.util.HashMap$EntryIterator.next(HashMap.java:824)
                       at org.jboss.jms.server.connectionmanager.SimpleConnectionManager.handle
                      ConnectionException(SimpleConnectionManager.java:154)
                       at org.jboss.remoting.ConnectionNotifier.connectionLost(ConnectionNotifi
                      er.java:46)
                       at org.jboss.remoting.Lease$LeaseTimerTask.run(Lease.java:130)
                       at java.util.TimerThread.mainLoop(Timer.java:432)
                       at java.util.TimerThread.run(Timer.java:382)
                      10:37:24,347 WARN [SimpleConnectionManager] ConnectionManager[32087b] handling
                      client 5c4o04r-d1xxu2-elz73iga-1-elz73iig-3's remoting connection failure (null
                      Throwable)
                      
                      




                      Of course, there IS a lost connection, but the type of error (ConcurrentModificationException) seems funny to me...


                      Issue tracked by http://jira.jboss.org/jira/browse/JBMESSAGING-346

                      • 8. Re: problem consuming messages

                        OK, finally got to the bottom of it, the short answer is there is a serialization problem with JodaTime.

                        I can post Joda DataTime Object message (with the DateTime being the object of the ObjectMessage) to the queue, but get a serialization error upon reading of said message!

                        Here is the stand alone test case that you can use to see the problem. Please note that you will need the Joda jars among others...

                        This does work in JBoss MQ.

                        I hope that this is what you wanted timfox.

                        Cheers,

                        Mark


                        package com;
                        
                        import java.io.Serializable;
                        import java.util.Enumeration;
                        import java.util.HashMap;
                        import java.util.Hashtable;
                        import java.util.Map;
                        
                        import javax.jms.Connection;
                        import javax.jms.ConnectionFactory;
                        import javax.jms.JMSException;
                        import javax.jms.Message;
                        import javax.jms.MessageConsumer;
                        import javax.jms.MessageProducer;
                        import javax.jms.ObjectMessage;
                        import javax.jms.Queue;
                        import javax.jms.QueueBrowser;
                        import javax.jms.QueueConnection;
                        import javax.jms.QueueConnectionFactory;
                        import javax.jms.Session;
                        import javax.naming.InitialContext;
                        import javax.naming.NamingException;
                        
                        import junit.framework.TestCase;
                        
                        import org.joda.time.DateTime;
                        
                        
                        public class JmsPostingAndClearingTest extends TestCase{
                         private ConnectionFactory cf;
                         private InitialContext ic;
                        
                         public void setUp() throws Exception {
                         Map map = new HashMap();
                         map.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
                         map.put("java.naming.provider.url","jnp://localhost:1099");
                         map.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
                         Hashtable ht = new Hashtable();
                         ht.putAll(map);
                         ic = new InitialContext(ht);
                         cf = (QueueConnectionFactory)ic.lookup("/ConnectionFactory");
                         }
                        
                         public void testPostingAndClearing() throws NamingException, JMSException{
                         Queue queue = (Queue)ic.lookup("queue/com.dexit.bpm.settlement.merchant.initSettlement");
                         Connection connection = null;
                         try{
                         connection = cf.createConnection();
                         connection.start();
                         //clear queue and assert size 0
                         QueueConnection qc = (QueueConnection) connection;
                         clearQueue(qc, queue);
                         //clearQueue(connection, queue);
                         //validate the message is now on queue
                         int count = getCount(cf,queue);
                         assertEquals(0, count);
                         //put a message on queue
                         sendMessage(cf, queue, new DateTime());
                         //validate the message is now on queue
                         count = getCount(cf,queue);
                         assertEquals(1,count);
                         }finally{
                         try {
                         if(connection != null){
                         connection.close();
                         }
                         } catch (JMSException e) {
                         e.printStackTrace();
                         }
                         }
                         }
                        
                         public static void sendMessage(ConnectionFactory connectionFactory, Queue queue, Serializable object) {
                         Connection connection = null;
                         try {
                         // Create a Connection
                         connection = connectionFactory.createConnection();
                         connection.start();
                         Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
                         MessageProducer producer = session.createProducer(queue);
                         ObjectMessage om = session.createObjectMessage();
                         om.setObject(object);
                         producer.send(om);
                         }
                         catch (Exception e) {
                         e.printStackTrace();
                         throw new RuntimeException(e);
                         }finally{
                         try {
                         if(connection != null){
                         connection.close();
                         }
                         } catch (JMSException e) {
                         e.printStackTrace();
                         }
                         }
                         }
                        
                        
                         public static int getCount(ConnectionFactory cf, Queue queue) throws JMSException {
                         Connection connection = null;
                         Session session = null;
                         int count = 0;
                         try{
                         connection = cf.createConnection();
                         connection.start();
                         session = connection.createSession(true, -1);
                         QueueBrowser qb = session.createBrowser(queue);
                         Enumeration messages = qb.getEnumeration();
                         while(messages.hasMoreElements()){
                         ObjectMessage om = (ObjectMessage)messages.nextElement();
                         //call get object to show serialization issue
                         om.getObject();
                         count++;
                         }
                         }finally{
                         if(connection != null){
                         connection.close();
                         }
                         }
                         return count;
                         }
                        
                         public static void clearQueue(Connection connection, Queue queue) throws JMSException{
                         Session session = null;
                         try{
                         session = connection.createSession(true,-1);
                         MessageConsumer mc = session.createConsumer(queue);
                         connection.start();
                         while(true){
                         Message message = mc.receiveNoWait();
                         if(message == null){
                         break;
                         }
                         }
                         session.commit();
                         }finally{
                         session.close();
                         }
                         }
                        
                        }
                        


                        Here is the exception console log:

                        [socket://192.168.0.171:4457/?dataType=jms&marshaller=org.jboss.jms.server.remoting.JMSWireFormat&serializationtype=jboss&socket.check_connection=false&unmarshaller=org.jboss.jms.server.remoting.JMSWireFormat]=org.jboss.remoting.transport.socket.SocketClientInvoker@19ae493}
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.remoting.InvocationRequest
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.remoting.invocation.InternalInvocation
                        DEBUG ObjectDescriptorFactory - describeObject for class=java.util.HashMap
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.remoting.InvokerLocator
                        DEBUG ObjectDescriptorFactory - describeObject for class=java.util.TreeMap
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.remoting.InvocationRequest
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.jms.server.remoting.MessagingMarshallable
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_N6840474864420126404
                        DEBUG ObjectDescriptorFactory - describeObject for class=java.rmi.MarshalledObject
                        DEBUG ObjectDescriptorFactory - describeObject for class=[B
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.aop.metadata.SimpleMetaData
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.jboss.remoting.InvocationResponse classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.jboss.jms.server.remoting.MessagingMarshallable classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.jboss.jms.client.delegate.ClientConnectionDelegate classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.remoting.InvocationRequest
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.jms.server.remoting.MessagingMarshallable
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.jms.client.delegate.ClientConnectionDelegate$createSessionDelegate_6052335267724906805
                        DEBUG ObjectDescriptorFactory - describeObject for class=java.rmi.MarshalledObject
                        DEBUG ObjectDescriptorFactory - describeObject for class=[B
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.aop.metadata.SimpleMetaData
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.jboss.remoting.InvocationResponse classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.jboss.jms.server.remoting.MessagingMarshallable classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.jboss.jms.client.delegate.ClientSessionDelegate classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG JBossSession - attempting to create consumer for destination:JBossQueue[com.dexit.bpm.settlement.merchant.initSettlement]
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.remoting.InvocationRequest
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.jms.server.remoting.MessagingMarshallable
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.jms.client.delegate.ClientSessionDelegate$createConsumerDelegate_6311124154581125663
                        DEBUG ObjectDescriptorFactory - describeObject for class=java.rmi.MarshalledObject
                        DEBUG ObjectDescriptorFactory - describeObject for class=[B
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.aop.metadata.SimpleMetaData
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.jboss.remoting.InvocationResponse classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.jboss.jms.server.remoting.MessagingMarshallable classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.jboss.jms.client.delegate.ClientConsumerDelegate classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.remoting.InvocationRequest
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.jms.server.remoting.MessagingMarshallable
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.jms.client.delegate.ClientConnectionDelegate$start_N8025343665958530775
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.aop.metadata.SimpleMetaData
                        DEBUG DefaultListableBeanFactory - Returning cached instance of singleton bean 'settlementQueueWorkflowJMSListener'
                        DEBUG ObjectDescriptorFactory - Reading object for type=com.dexit.common.events.TransportEvent classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=java.util.HashMap classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=com.dexit.common.datetime.providers.joda.JodaDateTimeAdapter classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.joda.time.DateTime classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.joda.time.chrono.ISOChronology$Stub classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.joda.time.tz.CachedDateTimeZone classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.joda.time.tz.DateTimeZoneBuilder$PrecalculatedZone classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=[J classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=[I classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=[I classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=[Ljava.lang.String; classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.joda.time.tz.DateTimeZoneBuilder$DSTZone classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.joda.time.tz.DateTimeZoneBuilder$Recurrence classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        ERROR MessageCallbackHandler - RuntimeException was thrown from onMessage, 114944 will be redelivered
                        java.lang.RuntimeException: Failed to read payload
                         at org.jboss.messaging.core.message.MessageSupport.getPayload(MessageSupport.java:225)
                         at org.jboss.jms.message.JBossObjectMessage.getObject(JBossObjectMessage.java:140)
                         at org.jboss.jms.message.ObjectMessageProxy.getObject(ObjectMessageProxy.java:59)
                         at com.dexit.common.events.listeners.jms.workflow.WorkflowJmsHandler.onMessage(WorkflowJmsHandler.java:55)
                         at org.jboss.jms.client.remoting.MessageCallbackHandler.callOnMessage(MessageCallbackHandler.java:82)
                         at org.jboss.jms.client.remoting.MessageCallbackHandler$ClientDeliveryRunnable.run(MessageCallbackHandler.java:746)
                         at EDU.oswego.cs.dl.util.concurrent.QueuedExecutor$RunLoop.run(QueuedExecutor.java:89)
                         at java.lang.Thread.run(Thread.java:534)
                        Caused by: org.jboss.serial.exception.SerializationException
                         at org.jboss.serial.persister.PrivateWritePersister.readData(PrivateWritePersister.java:134)
                         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:168)
                         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:56)
                         at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:657)
                         at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:204)
                         at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:151)
                         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:168)
                         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:56)
                         at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:657)
                         at org.jboss.serial.io.JBossObjectInputStream.readObjectOverride(JBossObjectInputStream.java:85)
                         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:318)
                         at org.jboss.messaging.core.message.RoutableSupport.internalReadObject(RoutableSupport.java:173)
                         at org.jboss.messaging.core.message.MessageSupport.readPayloadExternal(MessageSupport.java:349)
                         at org.jboss.messaging.core.message.MessageSupport.getPayload(MessageSupport.java:210)
                         ... 7 more
                        Caused by: java.lang.reflect.InvocationTargetException
                         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:324)
                         at org.jboss.serial.persister.PrivateWritePersister.readData(PrivateWritePersister.java:124)
                         ... 20 more
                        Caused by: org.jboss.serial.exception.SerializationException
                         at org.jboss.serial.persister.PrivateWritePersister.readData(PrivateWritePersister.java:134)
                         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:168)
                         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:56)
                         at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:657)
                         at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:204)
                         at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:151)
                         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:168)
                         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:56)
                         at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:657)
                         at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:204)
                         at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:151)
                         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:168)
                         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:56)
                         at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:657)
                         at org.jboss.serial.persister.ObjectInputStreamProxy.readObjectOverride(ObjectInputStreamProxy.java:65)
                         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:318)
                         at java.util.HashMap.readObject(HashMap.java:1009)
                         ... 25 more
                        Caused by: java.lang.reflect.InvocationTargetException
                         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:324)
                         at org.jboss.serial.persister.PrivateWritePersister.readData(PrivateWritePersister.java:124)
                         ... 41 more
                        Caused by: org.jboss.serial.exception.SerializationException
                         at org.jboss.serial.persister.PrivateWritePersister.readData(PrivateWritePersister.java:134)
                         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:168)
                         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:56)
                         at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:657)
                         at org.jboss.serial.persister.ObjectInputStreamProxy.readObjectOverride(ObjectInputStreamProxy.java:65)
                         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:318)
                         at org.joda.time.chrono.ISOChronology$Stub.readObject(ISOChronology.java:210)
                         ... 46 more
                        Caused by: java.lang.reflect.InvocationTargetException
                         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:324)
                         at org.jboss.serial.persister.PrivateWritePersister.readData(PrivateWritePersister.java:124)
                         ... 52 more
                        Caused by: org.jboss.serial.exception.SerializationException: Could not create instance of org.joda.time.tz.DateTimeZoneBuilder$Recurrence - org.joda.time.tz.DateTimeZoneBuilder$Recurrence
                         at org.jboss.serial.classmetamodel.ClassMetaData.newInstance(ClassMetaData.java:347)
                         at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:149)
                         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:168)
                         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:56)
                         at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:657)
                         at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:204)
                         at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:151)
                         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:168)
                         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:56)
                         at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:657)
                         at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:204)
                         at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:151)
                         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:168)
                         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:56)
                         at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:657)
                         at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:204)
                         at org.jboss.serial.persister.ObjectInputStreamProxy.defaultReadObject(ObjectInputStreamProxy.java:75)
                         at org.joda.time.tz.CachedDateTimeZone.readObject(CachedDateTimeZone.java:95)
                         ... 57 more
                        Caused by: java.lang.InstantiationException: org.joda.time.tz.DateTimeZoneBuilder$Recurrence
                         at java.lang.Class.newInstance0(Class.java:293)
                         at java.lang.Class.newInstance(Class.java:261)
                         at org.jboss.serial.classmetamodel.ClassMetaData.newInstance(ClassMetaData.java:339)
                         ... 74 more
                        DEBUG Client - invoke called, but our invoker is disconnected, discarding and fetching another fresh invoker for: InvokerLocator [socket://192.168.0.171:4457/?dataType=jms&marshaller=org.jboss.jms.server.remoting.JMSWireFormat&serializationtype=jboss&socket.check_connection=false&unmarshaller=org.jboss.jms.server.remoting.JMSWireFormat]
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.remoting.InvocationRequest
                        DEBUG ObjectDescriptorFactory - describeObject for class=java.util.HashMap
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.jboss.remoting.InvocationResponse classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.jboss.remoting.InvocationResponse classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=java.util.HashMap classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.remoting.InvocationRequest
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.jboss.remoting.InvocationResponse classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.jboss.remoting.InvocationResponse classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=java.util.HashMap classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG Client - invoke called, but our invoker is disconnected, discarding and fetching another fresh invoker for: InvokerLocator [socket://192.168.0.171:4457/?dataType=jms&marshaller=org.jboss.jms.server.remoting.JMSWireFormat&serializationtype=jboss&socket.check_connection=false&unmarshaller=org.jboss.jms.server.remoting.JMSWireFormat]
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.remoting.InvocationRequest
                        DEBUG ObjectDescriptorFactory - describeObject for class=java.util.HashMap
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.jboss.remoting.InvocationResponse classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.jboss.remoting.InvocationResponse classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=java.util.HashMap classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.remoting.InvocationRequest
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.jboss.remoting.InvocationResponse classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.jboss.remoting.InvocationResponse classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=java.util.HashMap classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.remoting.InvocationRequest
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.jboss.remoting.InvocationResponse classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.jboss.remoting.InvocationResponse classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=java.util.HashMap classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.remoting.InvocationRequest
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.jboss.remoting.InvocationResponse classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.jboss.remoting.InvocationResponse classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=java.util.HashMap classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.remoting.InvocationRequest
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.jboss.remoting.InvocationResponse classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.jboss.remoting.InvocationResponse classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=java.util.HashMap classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - describeObject for class=org.jboss.remoting.InvocationRequest
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.jboss.remoting.InvocationResponse classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=org.jboss.remoting.InvocationResponse classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        DEBUG ObjectDescriptorFactory - Reading object for type=java.util.HashMap classLoader=sun.misc.Launcher$AppClassLoader@53ba3d
                        
                        
                        15:10:05,471 WARN [SimpleConnectionManager] ConnectionManager[30cefd] handling
                        client 5c4o04r-aqntrv-elzgt50g-1-elzgt7pf-7's remoting connection failure (null
                        Throwable)
                        15:10:54,302 WARN [DeliveryRunnable] Failed to deliver the message to the clien
                        t, clearing up connection resources
                        org.jboss.remoting.CannotConnectException: Can not get connection to server. Pr
                        oblem establishing socket connection.
                         at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(Soc
                        ketClientInvoker.java:267)
                         at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.jav
                        a:143)
                         at org.jboss.remoting.Client.invoke(Client.java:527)
                         at org.jboss.remoting.Client.invoke(Client.java:490)
                         at org.jboss.remoting.Client.invoke(Client.java:475)
                         at org.jboss.jms.server.endpoint.DeliveryRunnable.run(DeliveryRunnable.j
                        ava:85)
                         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExec
                        utor.java:743)
                         at java.lang.Thread.run(Thread.java:534)
                        Caused by: java.net.ConnectException: Connection refused: connect
                         at java.net.PlainSocketImpl.socketConnect(Native Method)
                         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
                         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
                         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
                         at java.net.Socket.connect(Socket.java:452)
                         at java.net.Socket.connect(Socket.java:402)
                         at java.net.Socket.<init>(Socket.java:309)
                         at java.net.Socket.<init>(Socket.java:124)
                         at org.jboss.remoting.transport.socket.SocketClientInvoker.createSocket(
                        SocketClientInvoker.java:601)
                         at org.jboss.remoting.transport.socket.SocketClientInvoker.getConnection
                        (SocketClientInvoker.java:536)
                         at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(Soc
                        ketClientInvoker.java:263)
                         ... 7 more
                        15:11:14,813 WARN [SimpleConnectionManager] ConnectionManager[30cefd] handling
                        client 5c4o04r-cbmib0-elzgunzv-1-elzguqt6-7's remoting connection failure (null
                        Throwable)
                        


                        • 9. Re: problem consuming messages
                          ovidiu.feodorov

                          My intuition is that this is one of those Serialization edge cases that Clebert was talking about, but I have to check to be sure.

                          Mark, thanks for report. We'll get to the bottom of it.

                          • 10. Re: problem consuming messages
                            clebert.suconic

                            http://jira.jboss.org/jira/browse/JBSER-59

                            This was fixed yesterday by coincidence. You will need JBossSerialization from CVS. Or I can cut a release tomorrow with this fix if CVS is not an option for you.

                            • 11. Re: problem consuming messages
                              clebert.suconic

                              JBSER-59 used to be called "JBOSS Serialization does not properly serialize the Joda DateTime "

                              And I've then renamed it to

                              "ReadResolve and WriteReplace resolution should be done on the whole hierarchy"

                              Which is the really problem that's happening here.

                              • 12. Re: problem consuming messages
                                ovidiu.feodorov

                                What is the serialization release number? I also want to create a messaging JIRA task. I'll also add a test case for it.

                                • 13. Re: problem consuming messages
                                  clebert.suconic

                                  This JIRA is fixed on JBSER/CVS-Head.

                                  http://repository.jboss.com/jboss/serialization/1.0.0.CR5/ is the latest release I have, but this is not on a release yet.


                                  eh eh... I eddited this post. I had the wrong version here before.

                                  • 14. Re: problem consuming messages
                                    clebert.suconic

                                    BTW JBSER-59 and JBSER-44 were one of the blockers I had to a release.

                                    JBSER is almost final. I need to run some tests but I'm almost there.

                                    1 2 Previous Next