I've a very simple route which was working before. The following route works if I comment out the splitter part. But as soon as I add the splitter code to the route it fails. any ideas what I'm doing wrong here ?
any help will be greatly appreciated. thanks. from("direct:start"). to("https://maps.googleapis.com/maps/api/place/search/json?location=40.446788,-79.950559&radius=500&types=food&sensor=false&key=xxxxxxxxxxxxxxxxxxx") .unmarshal().json(JsonLibrary.Jackson, GooglePlaceResponseObject.class).split().method(GooglePlaceSplitter.class, "split").to("mock:result"); @JsonIgnoreProperties(ignoreUnknown = true) public class GooglePlaceResponseObject { public List<String> getHtml_attibutions() { return html_attibutions; } public void setHtml_attibutions(List<String> html_attibutions) { this.html_attibutions = html_attibutions; } public List<GooglePlaceVO> getResults() { return results; } public void setResults(List<GooglePlaceVO> results) { this.results = results; } public void setStatus(String s) { this.status = s; } public String getStatus() { return this.status; } private List<String> html_attibutions; private List<GooglePlaceVO> results; private String status; public GooglePlaceResponseObject() { html_attibutions = new ArrayList<String>(); results = new ArrayList<GooglePlaceVO>(); } } public class GooglePlaceSplitter { public List<GooglePlaceVO> split( GooglePlaceResponseObject gpResponse) { List<GooglePlaceVO> results = new ArrayList<GooglePlaceVO>(); if (gpResponse != null) { results.addAll(gpResponse.getResults()); } return results; } } @JsonIgnoreProperties(ignoreUnknown = true) public class GooglePlaceVO { @JsonIgnoreProperties(ignoreUnknown = true) public static class Location { private double lat; private double lon; public void setLat(double lat) { this.lat = lat; } public double getLat() { return lat; } public void setLon(double lon) { this.lon = lon; } public double getLon() { return lon; } public String toString() { StringBuffer buf = new StringBuffer(); buf.append("[lat: ").append(lat).append(", lon: ").append(lon).append("]"); return buf.toString(); } } private String name; private String icon; private String id; private double rating; private String reference; private List<String> types; private String vicinity; public String toString() { StringBuffer buf = new StringBuffer(); buf.append("[name: ").append(name).append("] "); return buf.toString(); } public String getIcon() { return icon; } public void setIcon(String icon) { this.icon = icon; } public String getId() { return id; } public void setId(String id) { this.id = id; } public double getRating() { return rating; } public void setRating(double rating) { this.rating = rating; } public String getReference() { return reference; } public void setReference(String reference) { this.reference = reference; } public List<String> getTypes() { return types; } public void setTypes(List<String> types) { this.types = types; } public String getVicinity() { return vicinity; } public void setVicinity(String vicinity) { this.vicinity = vicinity; } } Exception - [ http-bio-8080-exec-167] DefaultErrorHandler ERROR Failed delivery for (MessageId: ID-xxxx-51540-1335888294836-0-3 on ExchangeId: ID-xxxx-51540-1335888294836-0-2). Exhausted after delivery attempt: 1 caught: org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[Message: xxxx.xxxx.xxxx.GooglePlaceResponseObject@398f573b] org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[Message: xxxx.xxxx.xxxx..GooglePlaceResponseObject@398f573b] at org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1269)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.impl.DefaultExchange.setException(DefaultExchange.java:282)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:151)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:73)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.language.bean.BeanExpression$InvokeProcessor.process(BeanExpression.java:162)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.language.bean.BeanExpression.evaluate(BeanExpression.java:115)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.language.bean.BeanExpression.evaluate(BeanExpression.java:124)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.processor.Splitter.createProcessorExchangePairs(Splitter.java:101)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.processor.MulticastProcessor.process(MulticastProcessor.java:209)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.processor.Splitter.process(Splitter.java:96)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:71)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:163)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:333)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:223)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.processor.Pipeline.process(Pipeline.java:117)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:122)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:71)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:61)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:86)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:63)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:352)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:324)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:223)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:324)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:186)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:115)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:102)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at org.apache.camel.impl.DefaultProducerTemplate.request(DefaultProducerTemplate.java:280)[camel-core-2.10-20120501.123310-101.jar:2.10-SNAPSHOT] at edu.cmu.sei.rtss.edge.emontageserver.JSONController.makeGooglePlaceCall(JSONController.java:32)[JSONController.class:] at edu.cmu.sei.rtss.edge.emontageserver.JSONController.getShopInJSON(JSONController.java:21)[JSONController.class:] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_31] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_31] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_31] at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_31] at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)[spring-web-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436)[spring-webmvc-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424)[spring-webmvc-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)[spring-webmvc-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)[spring-webmvc-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:669)[spring-webmvc-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:574)[spring-webmvc-3.0.7.RELEASE.jar:3.0.7.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)[servlet-api.jar:] at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)[servlet-api.jar:] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)[catalina.jar:7.0.26] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)[catalina.jar:7.0.26] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)[catalina.jar:7.0.26] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)[catalina.jar:7.0.26] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)[catalina.jar:7.0.26] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)[catalina.jar:7.0.26] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)[catalina.jar:7.0.26] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)[catalina.jar:7.0.26] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)[catalina.jar:7.0.26] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)[catalina.jar:7.0.26] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)[tomcat-coyote.jar:7.0.26] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)[tomcat-coyote.jar:7.0.26] at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)[tomcat-coyote.jar:7.0.26] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_31] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_31] at java.lang.Thread.run(Thread.java:680)[:1.6.0_31] -- View this message in context: http://camel.465427.n5.nabble.com/Any-idea-why-this-simple-splitter-is-not-working-in-2-10-SNAPSHOT-tp5678336.html Sent from the Camel - Users mailing list archive at Nabble.com.