title: Camel aggregator exception
body: <p>I've installed camel (version 2.10.X) and I could run many examples using csv and xslt processors. 
  Now I am trying to use the camel <code>aggregator</code>.
  I've adapted an example from the camel documentation so that when 3 files are written into the <code>input</code> directory they have to be <em>aggregated</em> and send to the <em>output</em> directory.</p>
  
  <p>My context is as follows:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:camel="http://camel.apache.org/schema/spring"
         xmlns:context="http://www.springframework.org/schema/context"
         xmlns:amq="http://activemq.apache.org/schema/core"
         xsi:schemaLocation="http://www.springframework.org/schema/beans
         http://www.springframework.org/schema/beans/spring-beans.xsd
         http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
         http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
         http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"&gt;
  
  &lt;bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent" /&gt;
  &lt;bean id="aggregatorStrategy" class="org.apache.camel.processor.BodyInAggregatingStrategy" /&gt;
  
  &lt;camel:camelContext xmlns="http://camel.apache.org/schema/spring"&gt;
      &lt;camel:package&gt;com.example.camel.wardemo&lt;/camel:package&gt;
  
      &lt;camel:route&gt;
          &lt;camel:from uri="file:/inputdir" /&gt;         
          &lt;camel:aggregate strategyRef="aggregatorStrategy" completionSize="3"&gt;           
              &lt;camel:correlationExpression&gt;
                  &lt;camel:simple&gt;header.id&lt;/camel:simple&gt;
              &lt;/camel:correlationExpression&gt;          
              &lt;camel:to uri="file:/outdir" /&gt;
          &lt;/camel:aggregate&gt;
      &lt;/camel:route&gt;
  &lt;/camel:camelContext&gt;
  </code></pre>
  
  <p></p>
  
  <p>but when deploying the war file the application doesn't start and troughs an exception:
  (localhost_XXXXXX.log</p>
  
  <pre><code>    5.06.2013 18:14:03 org.apache.catalina.core.ApplicationContext log
  INFO: Initializing Spring root WebApplicationContext
  25.06.2013 18:14:05 org.apache.catalina.core.StandardContext listenerStart
  SCHWERWIEGEND: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
  
  org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'activemq' defined in ServletContext resource [/WEB-INF/applicationContext.xml]:     Initialization of bean failed; nested exception is     
  org.springframework.beans.factory.BeanCreationException: Error creating bean with name     'camel-1': Invocation of init method failed; nested exception is   org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.camel.processor.BodyInAggregatingStrategy] for bean with name  'aggregatorStrategy' defined in ServletContext resource [/WEB-INF/applicationContext.xml];  nested exception is java.lang.ClassNotFoundException:  org.apache.camel.processor.BodyInAggregatingStrategy
  </code></pre>
  
  <p>This should be a reference to this tag in my context:</p>
  
  <pre><code>&lt;bean id="aggregatorStrategy" class="org.apache.camel.processor.BodyInAggregatingStrategy" /&gt;
  </code></pre>
  
  <p>What am I doing wrong? </p>
  
  <p>Thanks!</p>
  
  <p>EDIT</p>
  
  <p>This is my <code>pom.xml</code></p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
  &lt;parent&gt;
      &lt;groupId&gt;com.example.camel&lt;/groupId&gt;
      &lt;artifactId&gt;CamelDemo&lt;/artifactId&gt;
      &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
  &lt;/parent&gt;    
  
  &lt;groupId&gt;com.example.camel&lt;/groupId&gt;
  &lt;artifactId&gt;CamelWarDemo&lt;/artifactId&gt;
  &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  
  &lt;name&gt;CamelDemo :: WAR Demo&lt;/name&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
          &lt;artifactId&gt;camel-core&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
          &lt;artifactId&gt;camel-csv&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.activemq&lt;/groupId&gt;
          &lt;artifactId&gt;activemq-camel&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
          &lt;artifactId&gt;camel-web&lt;/artifactId&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;type&gt;war&lt;/type&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;mysql&lt;/groupId&gt;
          &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.persistence&lt;/groupId&gt;
          &lt;artifactId&gt;persistence-api&lt;/artifactId&gt;
      &lt;/dependency&gt;            
      &lt;dependency&gt;
          &lt;groupId&gt;org.eclipse.persistence&lt;/groupId&gt;
          &lt;artifactId&gt;eclipselink&lt;/artifactId&gt;
      &lt;/dependency&gt;  
  &lt;/dependencies&gt;
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
              &lt;artifactId&gt;camel-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;${camel-version}&lt;/version&gt;             
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt;
              &lt;artifactId&gt;jetty-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;${jetty-version}&lt;/version&gt;                
              &lt;configuration&gt;
                  &lt;webAppConfig&gt;
                      &lt;contextPath&gt;/&lt;/contextPath&gt;
                  &lt;/webAppConfig&gt;
                  &lt;systemProperties&gt;
                      &lt;systemProperty&gt;
                          &lt;name&gt;com.sun.management.jmxremote&lt;/name&gt;
                          &lt;value /&gt;
                      &lt;/systemProperty&gt;
                  &lt;/systemProperties&gt;
                  &lt;scanIntervalSeconds&gt;10&lt;/scanIntervalSeconds&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p></p>