1 Reply Latest reply on Mar 28, 2002 12:20 PM by Chester Chee

    getObject() throws IOException

    Chester Chee Newbie

      Hi,
      I have a simple MDB that send ObjectMessage. In the object message
      I have an instance of "Order", Order has a Address. And Address is an abstract
      class with two concrete implementations, AddressInfo and Airport

      When my client which instantiates Order and assign an instance of AddressInfo to
      the Order instance and the create an object message via TopicSession and send it
      to MDB running in JBoss 2.4.4 (over RH Linux 7.2), I got an
      IOException with the following:

      [ERROR,Default] javax.jms.MessageFormatException: IOException
      [ERROR,Default] at org.jboss.mq.SpyObjectMessage.getObject(SpyObjectMessage.java:126)
      [ERROR,Default] at com.arising.csis.jms.OrderMessageConverter.translateToOrder(OrderMessageConverter.java:64)
      [ERROR,Default] at com.arising.csis.ejb.orderMDB.ejb.OrderMDB.processOrderMessage(OrderMDB.java:161)
      [ERROR,Default] at com.arising.csis.ejb.orderMDB.ejb.OrderMDB.onMessage(OrderMDB.java:74)
      [ERROR,Default] at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
      [ERROR,Default] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [ERROR,Default] at java.lang.reflect.Method.invoke(Method.java:324)
      [ERROR,Default] at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:406)
      [ERROR,Default] at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:81)
      [ERROR,Default] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:138)
      [ERROR,Default] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:347)
      [ERROR,Default] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:100)
      [ERROR,Default] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:127)
      [ERROR,Default] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:170)
      [ERROR,Default] at org.jboss.ejb.MessageDrivenContainer.invoke(MessageDrivenContainer.java:281)
      [ERROR,Default] at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:584)
      [ERROR,Default] at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:930)
      [ERROR,Default] at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:233)
      [ERROR,Default] at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:565)
      [ERROR,Default] at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:376)
      [ERROR,Default] at org.jboss.mq.SpySession.run(SpySession.java:248)
      [ERROR,Default] at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:172)
      [ERROR,Default] at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:728)
      [ERROR,Default] at java.lang.Thread.run(Thread.java:536)

      My question is, can object message contains object with abstract class field? If not, what is the alternative?
      If so, please enlighten me where I did something wrong. Thanks in advance.