Hi, 

I am trying to read Apache-Ignite's cache data using camel-Ignite cache
component like given below. 

public void configure() throws Exception { 
                from("ignite:cache:person?query=#query1") 
                .process(new MyProcessor()) 
                .to("file:/tmp/outbox"); 
        } 

 when I run the code I got the following exception : 

org.apache.camel.FailedToCreateRouteException: Failed to create route
route1: Route(route1)[[From[ignite:cache:person?query=#query1]]... because
of Failed to resolve endpoint: ignite://cache:person?query=%23query1 due to:
Could not find a suitable setter for property: query as there isn't a setter
method with same type: java.lang.String nor type conversion possible: No
type converter available to convert from type: java.lang.String to the
required type: org.apache.ignite.cache.query.Query with value #query1 
        at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:201) 
        at
org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:974)
 
        at
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:3301)
 
        at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3024)
 
        at
org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:175)
 
        at
org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2854) 
        at
org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2850) 
        at
org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2873)
 
        at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2850)
 
        at
org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) 
        at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2819) 
        at com.apache.camel.ignite.MainApp.main(MainApp.java:69) 
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
resolve endpoint: ignite://cache:person?query=%23query1 due to: Could not
find a suitable setter for property: query as there isn't a setter method
with same type: java.lang.String nor type conversion possible: No type
converter available to convert from type: java.lang.String to the required
type: org.apache.ignite.cache.query.Query with value #query1 
        at
org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:588)
 
        at
org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:79)
 
        at
org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:211)
 
        at
org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:107)
 
        at
org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:113)
 
        at
org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:69) 
        at
org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:89)
 
        at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1052) 
        at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:196) 
        ... 11 more 
Caused by: java.lang.IllegalArgumentException: Could not find a suitable
setter for property: query as there isn't a setter method with same type:
java.lang.String nor type conversion possible: No type converter available
to convert from type: java.lang.String to the required type:
org.apache.ignite.cache.query.Query with value #query1 
        at
org.apache.camel.util.IntrospectionSupport.setProperty(IntrospectionSupport.java:588)
 
        at
org.apache.camel.util.IntrospectionSupport.setProperty(IntrospectionSupport.java:616)
 
        at
org.apache.camel.util.IntrospectionSupport.setProperties(IntrospectionSupport.java:473)
 
        at
org.apache.camel.util.IntrospectionSupport.setProperties(IntrospectionSupport.java:483)
 
        at
org.apache.camel.util.EndpointHelper.setProperties(EndpointHelper.java:255) 
        at
org.apache.camel.impl.DefaultComponent.setProperties(DefaultComponent.java:257) 
        at
org.apache.camel.component.ignite.IgniteComponent.createEndpoint(IgniteComponent.java:143)
 
        at
org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:114)
 
        at
org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:568)
 
        ... 19 more 

Can any one help me on how to create the setter property for Ignite Cache
Query. 



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Camel-Ignite-cache-query-Could-not-find-a-suitable-setter-for-property-query-tp14128.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to