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

Using JPA entities as the argument in Aggregator using POJO

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.13.1
    • Fix Version/s: 2.12.4, 2.13.2, 2.14.0
    • Component/s: camel-core, eip
    • Labels:
      None
    • Environment:

      Linux Ubuntu 14.04
      16Gb Memory
      Karaf 3.0.1

    • Estimated Complexity:
      Unknown

      Description

      I have an Aggregator POJO with this method :

      public Map<Hoteles, List<EventoPrecio>> agregaEventoPrecio(Map<Hoteles, List<EventoPrecio>> lista, EventoPrecio evento)

      With this route :

      from("timer://tesipro?fixedRate=true&period=60000").
      beanRef("uploadARIService", "getEventosPrecio").
      aggregate(constant(true), AggregationStrategies.bean(AgregadorEventos.class, "agregaEventoPrecio")).
      completionSize(100).
      log("Ejecucion de Quartz ");

      And I get this error :

      Error occurred during starting Camel: CamelContext(249-camel-9) due Parameter annotations at index 1 is not supported on method: public java.util.HashMap com.tesipro.conectores.interfaces.tesiproconpush.camel.AgregadorEventos.agregaEventoPrecio(java.util.HashMap,com.tesipro.conectores.domain.EventoPrecio)

      It seems the problem is that annotations are not supported in the aggregator arguments nor in the argument class.

      https://github.com/apache/camel/blob/3f4f8e9ddcc8de32cca084927a10c5b3bceef7f9/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregationStrategyBeanInfo.java#L67

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              jonvila Jonathan Vila
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: