0 Replies Latest reply on Mar 20, 2005 3:24 AM by raz

    NestedRuntimeException

    raz Newbie

      When I try to populate JbossCache I get this exception .
      I try to put in the cache a collection of the object MessageWrapper which
      contain a field of the object AddMessageData.
      And it occures ones in a while .
      what could be the reason for that ?


      org.jboss.util.NestedRuntimeException: cannot assign instance of com.comverse.ppg.common.data.AddMessageData to field com.comverse.dal.message.MessageWrapper.wrapedObject of type com.comverse.ppg.common.data.MessageData in instance of com.comverse.dal.message.MessageWrapper; - nested throwable: (java.lang.ClassCastException: cannot assign instance of com.comverse.ppg.common.data.AddMessageData to field com.comverse.dal.message.MessageWrapper.wrapedObject of type com.comverse.ppg.common.data.MessageData in instance of com.comverse.dal.message.MessageWrapper)
      at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:3137)
      at org.jboss.cache.TreeCache.put(TreeCache.java:1812)
      at org.jboss.cache.TreeCache.put(TreeCache.java:1795)
      at com.comverse.dal.message.aggregator.BulkAddMessagesAggregator.putMessage(BulkAddMessagesAggregator.java:49)
      at com.comverse.dal.message.send.AddMessageSender.handleBulkMessage(AddMessageSender.java:107)
      at com.comverse.dal.message.send.AddMessageSender.handleMessage(AddMessageSender.java:68)
      at com.comverse.dal.ejb.PpgMessageHandlerMDB.handleMassage(PpgMessageHandlerMDB.java:75)
      at com.comverse.dal.ejb.PpgMessageHandlerMDB.onMessage(PpgMessageHandlerMDB.java:42)
      at sun.reflect.GeneratedMethodAccessor103.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
      at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:475)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
      at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:87)
      at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:313)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:146)
      at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94)
      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:389)
      at org.jboss.ejb.Container.invoke(Container.java:870)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:962)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1248)
      at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
      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.run(StdServerSession.java:180)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: java.lang.ClassCastException: cannot assign instance of com.comverse.ppg.common.data.AddMessageData to field com.comverse.dal.message.MessageWrapper.wrapedObject of type com.comverse.ppg.common.data.MessageData in instance of com.comverse.dal.message.MessageWrapper
      at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:1885)
      at java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1076)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1851)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
      at java.util.TreeMap.buildFromSorted(TreeMap.java:1596)
      at java.util.TreeMap.buildFromSorted(TreeMap.java:1538)
      at java.util.TreeMap.readTreeSet(TreeMap.java:1490)
      at java.util.TreeSet.readObject(TreeSet.java:484)
      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 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:838)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
      at java.util.HashMap.readObject(HashMap.java:1006)
      at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:838)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
      at org.jboss.cache.loader.FileCacheLoader.loadAttributes(FileCacheLoader.java:356)
      at org.jboss.cache.loader.FileCacheLoader.put(FileCacheLoader.java:96)
      at org.jboss.cache.interceptors.CacheStoreInterceptor.invoke(CacheStoreInterceptor.java:116)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:40)
      at org.jboss.cache.interceptors.CacheLoaderInterceptor.invoke(CacheLoaderInterceptor.java:111)
      at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:3132)
      ... 32 more