3 Replies Latest reply: May 11, 2012 12:35 AM by Claus Ibsen RSS

    Route with aggregate complete predicate which throws null exception

    Gareth Healy Newbie

      I have a route which has an aggregate on it.

       

       

       

      The "isComplete" method is below:

       

      public Boolean isCompleted() {

           Boolean isComplete = this.hasMasterProductRow && this.hasProductMediaRow && this.hasProductExtDataRow

                                    && this.hasProductAttributeRow && this.hasProductAttributePriceRow;

            

           return isComplete;

      }

       

      All the "has..." are booleans so i am very confused as to why i get the below exception.

       

      11:52:34,600 | ERROR | ucts - example 1 | DefaultErrorHandler              | ?                                   ? | 89 - org.apache.camel.camel-core - 2.8.0.fuse-01-13 | Failed delivery for exchangeId: ID-BHWKS157-35881-1336127147367-6-16. Exhausted after delivery attempt: 1 caught: java.lang.NullPointerException

      java.lang.NullPointerException

              at com.boohoo.esb.products.sage.internal.helpers.PsvProductAggregationStrategy.isCompleted(PsvProductAggregationStrategy.java:87)[293:boohoo-esb-products-sage-internal:1.0.0.SNAPSHOT]

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_29]

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_29]

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_29]

              at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_29]

              at org.apache.camel.component.bean.MethodInfo.invoke(MethodInfo.java:329)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.component.bean.MethodInfo$1.proceed(MethodInfo.java:231)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:169)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:74)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.language.bean.BeanExpression$InvokeProcessor.process(BeanExpression.java:139)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.language.bean.BeanExpression.evaluate(BeanExpression.java:92)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.language.bean.BeanExpression.matches(BeanExpression.java:106)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.processor.aggregate.AggregateProcessor.isCompleted(AggregateProcessor.java:287)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.processor.aggregate.AggregateProcessor.doAggregation(AggregateProcessor.java:241)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.processor.aggregate.AggregateProcessor.process(AggregateProcessor.java:189)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.fabric.FabricTraceProcessor.process(FabricTraceProcessor.java:59)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:318)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:306)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.processor.Pipeline.process(Pipeline.java:116)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.processor.Pipeline.process(Pipeline.java:79)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:139)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:106)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:353)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:176)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:137)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:138)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:90)[89:org.apache.camel.camel-core:2.8.0.fuse-01-13]

              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_29]

              at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_29]

              at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_29]

              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_29]

              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[:1.6.0_29]

              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[:1.6.0_29]

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_29]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_29]

              at java.lang.Thread.run(Thread.java:662)[:1.6.0_29]