0

I implement *.vm template in my routing application (Servicemix) but after deploying JAR archive I get this error

karaf@root> Exception in thread "SpringOsgiExtenderThread-38" org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route route14 at: >>> To[velocity:getPayments.vm] <<< in route: Route(route14)[[From[direct:start]] -> [To[velocity:getPayme... because of Failed to resolve endpoint: velocity://getPayments.vm due to: No component found with scheme: velocity

I followed this manual http://camel.apache.org/tutorial-example-reportincident-part4.html

and pointed camel-velocity in pom.xml with same camel-core version

<dependency>
 <groupId>org.apache.camel</groupId>
 <artifactId>camel-core</artifactId>
 <version>2.13.1</version>
</dependency>

<dependency>
  <groupId>org.apache.camel</groupId>
  <artifactId>camel-velocity</artifactId>
  <version>2.13.1</version>
</dependency>

Does anybody know, what the matter is ?

рüффп
  • 5,172
  • 34
  • 67
  • 113
Almat
  • 11
  • 5

2 Answers2

2

As you are using Karaf you need to add the velocity feature:

feature:install camel-velocity

Or if using Karaf 4.x

feature:install camel-velocity
Matthew Wilson
  • 2,045
  • 14
  • 27
  • so, I installed it and got it in bundle list [ 251] [Active] [ ] [ ] [ 50] camel-velocity (2.12.3) also, I changed version in pom and after deploying application starts, but when I send request, I get same error " No component found with scheme: velocity" I tried to start camel-velocity bundle, it remains stay "Active" – Almat May 23 '14 at 13:10
  • Try restarting the bundle that contains your route – Matthew Wilson May 23 '14 at 14:46
  • you've got a mistake in command, should be `feature:install ...` – WeGa May 29 '18 at 12:30
1

nothing changed even after ServiceMix restarting, but I found solution. after init-ing of CamelContext I add camel components manually.

import org.apache.camel.component.velocity.*;
import org.apache.camel.component.spring.ws.*;

....

private CamelContext camel;

.....

camel = new DefaultCamelContext();
camel.addComponent("velocity", new VelocityComponent());
camel.addComponent("spring-ws",new SpringWebserviceComponent());
Almat
  • 11
  • 5