Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.4.3
-
Moderate
Description
Camel-sql : JdbcAggregationRepository uses the underlying jdbcTemplate and calls the queryForMap operation and on the VERSION column it type case it to the LONG by Default without checking if the Java Data Type is different or not. With Oracle and Java, it get bbvy default converted into the BIGDECIMAL and hence type case doesnt work with Object, can only work with Primitive data types.
Exception Stacktrace:
java.lang.ClassCastException: java.math.BigDecimal cannot be cast to java.lang.Longjava.lang.ClassCastException: java.math.BigDecimal cannot be cast to java.lang.Long at org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository$4.doInTransaction(JdbcAggregationRepository.java:334) at org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository$4.doInTransaction(JdbcAggregationRepository.java:325) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) at org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository.get(JdbcAggregationRepository.java:325) at org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository.get(JdbcAggregationRepository.java:319) at org.apache.camel.processor.aggregate.AggregateProcessor.doAggregation(AggregateProcessor.java:483) at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:406) at org.apache.camel.processor.aggregate.AggregateProcessor.doInOptimisticLock(AggregateProcessor.java:372) at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:362) 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.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.run(RedeliveryErrorHandler.java:616) at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148) at org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:60) at org.apache.camel.processor.Pipeline.process(Pipeline.java:147) at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:286) at org.apache.camel.impl.engine.DefaultAsyncProcessorAwaitManager.process(DefaultAsyncProcessorAwaitManager.java:83) 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.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:318) at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:257) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1189) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1179) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1076) 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)
Attachments
Attachments
Issue Links
- is related to
-
CAMEL-15564 JDBC BASED Persistence Aggregator Deserialization Issue
- Resolved
- links to