I am getting the below error, while running the following statement in Apache Camel
<to id="jsoncheck" uri="json-validator:classpath:jsonschema.json" />
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route3 at: >>> DoTry[[To[json-validator:classpath:jsonschema.json], DoCatch[ null -> []]]] <<< in route: Route(route3)[[From[file:///D:/jsonfiles/file?noop=true]] ->... because of Failed to resolve endpoint: json-validator://classpath:jsonschema.json due to: No component found with scheme: json-validator
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:912)
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:177)
at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:778)
at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1955)
at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1705)
at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1579)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1547)
at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:221)
at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:118)
... 10 more
Dependency added
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-json-validator</artifactId>
</dependency>
Seems you miss a version.
I've tried the following and all works fine.
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-json-validator</artifactId>
<version>3.13.0</version>
</dependency>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.