Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-15564

JDBC BASED Persistence Aggregator Deserialization Issue

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Information Provided
    • Affects Version/s: 2.25.1, 3.4.3
    • Fix Version/s: None
    • Component/s: camel-sql
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      USING THE JDBC BASED AGGREGATION REPOSITORY in cluster architecture, set different correlation Id in each instance, so the aggregated message will be picked up by instance which saved data in table.

      But randomly get below issue once read data from table then deserialize exchange, once issue occur message won't be deleted from table when new message come in will read data then constantly throw exception.

      java.lang.RuntimeException: Error getting key wgc_1_ACE_NOT_VALID from repository CRD_INT.FI_QAS_PRICE_AGG
      at org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository$3.doInTransaction(JdbcAggregationRepository.java:293)
      at org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository$3.doInTransaction(JdbcAggregationRepository.java:282)
      at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
      at org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository.get(JdbcAggregationRepository.java:282)
      at org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository.get(JdbcAggregationRepository.java:274)
      at org.apache.camel.processor.aggregate.AggregateProcessor$AggregationTimeoutMap.onEviction(AggregateProcessor.java:1186)
      at org.apache.camel.processor.aggregate.AggregateProcessor$AggregationTimeoutMap.onEviction(AggregateProcessor.java:1152)
      at org.apache.camel.support.DefaultTimeoutMap.purge(DefaultTimeoutMap.java:229)
      at org.apache.camel.processor.aggregate.AggregateProcessor$AggregationTimeoutMap.purge(AggregateProcessor.java:1166)
      at org.apache.camel.support.DefaultTimeoutMap.run(DefaultTimeoutMap.java:179)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)

      Caused by: java.io.StreamCorruptedException: BigInteger: signum-magnitude mismatch
      at java.math.BigInteger.readObject(BigInteger.java:4525)
      at sun.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1184)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2257)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2148)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1647)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2366)
      at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:613)
      at java.math.BigDecimal.readObject(BigDecimal.java:3779)
      at sun.reflect.GeneratedMethodAccessor69.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1184)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2257)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2148)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1647)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2366)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2290)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2148)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1647)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2366)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2290)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2148)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1647)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:483)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:441)
      at java.util.ArrayList.readObject(ArrayList.java:799)
      at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1184)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2257)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2148)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1647)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2366)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2290)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2148)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1647)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:483)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:441)
      at org.apache.camel.processor.aggregate.jdbc.JdbcCamelCodec.decode(JdbcCamelCodec.java:88)
      at org.apache.camel.processor.aggregate.jdbc.JdbcCamelCodec.unmarshallExchange(JdbcCamelCodec.java:58)
      at org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository$3.doInTransaction(JdbcAggregationRepository.java:288)
      ... 16 common frames omitted

       

      Upgrade to camel 3.4.3 there is still deserialize issue.

      at org.apache.camel.processor.aggregate.AggregateProcessor.doInOptimisticLock(AggregateProcessor.java:372)
      at org.apache.camel.processor.aggregate.AggregateProcessor.process(AggregateProcessor.java:320)
      at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.doRun(RedeliveryErrorHandler.java:702)
      at org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:60)
      at org.apache.camel.support.AsyncProcessorSupport.process(AsyncProcessorSupport.java:40)
      at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:128)
      at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:736)
      at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:696)
      at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:674)
      at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1189)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

      Caused by: java.io.InvalidClassException: java.math.BigInteger; local class incompatible: stream classdesc serialVersionUID = -8286623314374558947, local class serialVersionUID = -8287574255936472291
      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1830)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1647)
      at java.math.BigDecimal.readObject(BigDecimal.java:3779)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2366)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2290)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2148)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2148)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1647)
      at java.util.ArrayList.readObject(ArrayList.java:799)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2257)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2148)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1647)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:441)
      at org.apache.camel.processor.aggregate.jdbc.JdbcCamelCodec.decode(JdbcCamelCodec.java:96)
      at org.apache.camel.processor.aggregate.jdbc.JdbcCamelCodec.unmarshallExchange(JdbcCamelCodec.java:67)
      ... 29 common frames omitted

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                LeoGuo Leo Guo
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: