title: set the value of camel body as value of constructor-arg
body: <p>I have the following bean declaration in camel-context.xml</p>
  
  <pre><code>&lt;bean id="AmbiguousData" class="java.lang.Exception"&gt;
      &lt;constructor-arg index="0" type="java.lang.String" value="${body}" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>The value of body is set dynamically in camel.
  From the logs I am able to verify that the body is correct("Ambiguous data found for Test2"), but the value passed to the bean is wrong(${body}).</p>
  
  <p>LOG:</p>
  
  <p>...............</p>
  
  <p>BodyType:String
  , Body:"Ambiguous data found for IMSI_Test2"
  , CaughtExceptionType:java.lang.Exception, CaughtExceptionMessage:${body}, StackTrace:java.lang.Exception: ${body}
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
      at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
      at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:121)
      at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:280)
  ..........</p>
  
  <p>How do I resolve this issue?</p>