Camel
  1. Camel
  2. CAMEL-4587

Camel Velocity component should not require you to import CamelVelocityClasspathResourceLoader

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.8.0, 2.8.1, 2.8.2
    • Fix Version/s: 2.8.3, 2.9.0
    • Component/s: camel-velocity
    • Labels:
      None
    • Estimated Complexity:
      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).

        Activity

        Hide
        Willem Jiang added a comment -

        Applied patch into trunk and camel-2.8.x branch.

        Show
        Willem Jiang added a comment - Applied patch into trunk and camel-2.8.x branch.

          People

          • Assignee:
            Willem Jiang
            Reporter:
            Willem Jiang
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development