0 Replies Latest reply on Aug 30, 2005 1:43 PM by nic7834

    Does an .EAR redeploy mean new serialVersionUID ids for each

    nic7834

      Hi there,

      Would appreciate any help on a javax.jms.MessageFormatException.

      Essentially my app persists JMS messages to MySQL. I then undeploy, rebuild my .EAR and redeploy the app **without any changes to the source code to the class being serialized**. When the JMS message is processed by my MDB I get this error:

      javax.jms.MessageFormatException: IOException: com.cci.monitor.MonitorMessage; local class incompatible: stream classdesc serialVersionUID = 6063910145320442869, local class serialVersionUID = -5652067990342841626 at org.jboss.mq.SpyObjectMessage.getObject(SpyObjectMessage.java:140) at com.cci.ejb.monitor.MonitorBnBean.onMessage(MonitorBnBean.java:120) at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source) at jrockit.reflect.InitialMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source) at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source) at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:458) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186) at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:62) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:317) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:150) at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:90) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:372) at org.jboss.ejb.Container.invoke(Container.java:709) at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:928) at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1205) at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:276) at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904) at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:159) at org.jboss.mq.SpySession.run(SpySession.java:351) at org.jboss.jms.asf.StdServerSession.run0(StdServerSession.java:200) at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743) at java.lang.Thread.run()V(Unknown Source)

      The highlighted section indicates the class has changed but I've not changed the source code. So is this error because of the redeploy assigning new serialVersionUID ids to the classes? I'm using JRockit as the JVM if anyone thinks that might be the issue.

      I'm writing an 'event reminder' application that uses JMS messages to persist reminders up to 30 days in advance. So a JMS message might not be processed until 30 days time.

      Can someone please explain how the ids are assigned so I might avoid the above error on hundreds of JMS messages if I undeploy and re-deploy.

      Thanks.
      Nic