camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Getting restHostNameResolver error while trying to integrate swagger with ApacheCamel
Date Sat, 13 Feb 2016 12:21:53 GMT
You would need to tell a bit more about this and what you do. From the
stacktrace it looks as if swagger somehow scan the Camel configuration
which it ought not to do.



On Sat, Feb 13, 2016 at 12:57 PM, Naveen Kumar <imnaveenyadav@gmail.com> wrote:
> Hi,
>
> I have an existing project where i need to integrate the swagger by use of
> annotations. When i do jetty:run i get error when i am trying to read the
> swagger.json.
> Would someone be able to provide me some direction on this.
> Below is the stack trace.
>
> java.lang.IllegalArgumentException: Conflicting setter definitions for
> property "restHostNameResolver":
> org.apache.camel.spi.RestConfiguration#setRestHostNameResolver(1 params) vs
> org.apache.camel.spi.RestConfiguration#setRestHostNameResolver(1 params)
> at
> com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder.getSetter(POJOPropertyBuilder.java:299)
> at io.swagger.jackson.ModelResolver.resolve(ModelResolver.java:277)
> at io.swagger.jackson.ModelResolver.resolve(ModelResolver.java:159)
> at
> io.swagger.converter.ModelConverterContextImpl.resolve(ModelConverterContextImpl.java:99)
> at io.swagger.jackson.ModelResolver.resolveProperty(ModelResolver.java:138)
> at io.swagger.jackson.ModelResolver.resolveProperty(ModelResolver.java:103)
> at
> io.swagger.converter.ModelConverterContextImpl.resolveProperty(ModelConverterContextImpl.java:79)
> at io.swagger.jackson.ModelResolver.resolve(ModelResolver.java:373)
> at io.swagger.jackson.ModelResolver.resolve(ModelResolver.java:159)
> at
> io.swagger.converter.ModelConverterContextImpl.resolve(ModelConverterContextImpl.java:99)
> at io.swagger.jackson.ModelResolver.resolveProperty(ModelResolver.java:138)
> at io.swagger.jackson.ModelResolver.resolveProperty(ModelResolver.java:103)
> at
> io.swagger.converter.ModelConverterContextImpl.resolveProperty(ModelConverterContextImpl.java:79)
> at io.swagger.jackson.ModelResolver.resolve(ModelResolver.java:373)
> at io.swagger.jackson.ModelResolver.resolve(ModelResolver.java:159)
> at
> io.swagger.converter.ModelConverterContextImpl.resolve(ModelConverterContextImpl.java:99)
> at io.swagger.jackson.ModelResolver.resolveProperty(ModelResolver.java:138)
> at io.swagger.jackson.ModelResolver.resolveProperty(ModelResolver.java:103)
> at
> io.swagger.converter.ModelConverterContextImpl.resolveProperty(ModelConverterContextImpl.java:79)
> at
> io.swagger.converter.ModelConverters.readAsProperty(ModelConverters.java:58)
> at
> io.swagger.util.ParameterProcessor.applyAnnotations(ParameterProcessor.java:175)
> at io.swagger.jaxrs.Reader.getParameters(Reader.java:905)
> at io.swagger.jaxrs.Reader.parseMethod(Reader.java:868)
> at io.swagger.jaxrs.Reader.read(Reader.java:295)
> at io.swagger.jaxrs.Reader.read(Reader.java:147)
> at
> io.swagger.jaxrs.listing.ApiListingResource.scan(ApiListingResource.java:68)
> at
> io.swagger.jaxrs.listing.ApiListingResource.process(ApiListingResource.java:112)
> at
> io.swagger.jaxrs.listing.ApiListingResource.getListingJson(ApiListingResource.java:154)
> at
> io.swagger.jaxrs.listing.ApiListingResource.getListing(ApiListingResource.java:141)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at
> com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
> at
> com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
> at
> com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
> at
> com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
> at
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
> at
> com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
> at
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
> at
> com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
> at
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1480)
> at
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1411)
> at
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1360)
> at
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1350)
> at
> com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
> at
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
> at
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
> at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1448)
> at com.collaboration.util.ApiOriginFilter.doFilter(ApiOriginFilter.java:32)
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
> at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
> at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
> at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
> at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
> at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
> at org.eclipse.jetty.server.Server.handle(Server.java:370)
> at
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
> at
> org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:949)
> at
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1011)
> at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
> at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
> at
> org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
> at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
> at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
> at java.lang.Thread.run(Thread.java:745)
>
>
> Regards
> Naveen



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Mime
View raw message