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

Camel Velocity component should not require you to import CamelVelocityClasspathResourceLoader

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.8.0, 2.8.1, 2.8.2
    • 2.8.3, 2.9.0
    • camel-velocity
    • None
    • Unknown

    Description

      While trying out a Camel demo that uses velocity, I discovered a change of behaviour in the velocity component in Camel 2.8.0. I am using velocity in a Camel route defined in Spring XML. When I deploy the route into the OSGi container, velocity complains that it cannot find the CamelVelocityClasspathResourceLoader class. I can fix this by importing the class into my bundle.

      I just checked the code of camel-velocity, as we introduced the CamelVelocityClasspathResourceLoader which should be loaded from the TCCL to load the resource by using camel context resolver.
      That could explain why you need to add the import package of "org.apache.camel.component.velocity".
      We can fix it by resetting a custom TCCL which knows how to load the CamelVelocityClasspathResourceLoader when calling the velocityEngine.init(properties).

      Attachments

        Activity

          People

            njiang Willem Jiang
            njiang Willem Jiang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: