12 Replies Latest reply on Nov 12, 2009 3:16 PM by Lyfe Musique

    error while creating multicast with aggregation strategy in java dsl

    Lyfe Musique Novice

      When I deploy a route without an aggregation strategy, things work as expected.  However, when I specify an aggregation strategy, I receive an error.

       

      Eg,

       

      from().multicast().to(); <-- works

      from().multicast(new MyAggregationStrategy()).to() <--generates error

       

      The error written to the logs is:

       

      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'camel': invocation of init method failed; nested exception is java.lang.LinkageError: loader constraint violation: when resolving method "org.apache.camel.model.RouteType.multicast(Lorg/apache/camel/processor/aggregate/AggregationStrategy;Z)Lorg/apache/camel/model/MulticastType;" the class loader (instance of org/apache/xbean/classloader/JarFileCLassLoader) of the current class, org/MyRouteBuilder, and the class loader (instance of org/apache/felix/framework/searchpolicy/ModuleImpe$ModuleClassLoader) for resolved class, org/apache/camel/model/RouteType, have different Class objects for the type org/apache/camel/processor/aggregate/AggregrationStrategy using in the signature

       

      Does anyone know how to begin to debug this error?