Hi What version of Camel do you use? And what JDK version?
On Thu, May 21, 2015 at 12:48 PM, Christina Lin <c...@redhat.com> wrote: > I wanted to see how swagger works, but is having trouble with the > "camel-example-servlet-rest-tomcat" quickstart example. After packaging it, > and placing the WAR file in Tomcat 8.0.22. I was able play with the rest > service without any problem. > > BUT, I was not able to get the > "http://localhost:8080/camel-example-servlet-rest-tomcat/api-docs" swagger > API page working. > > It shows a NullPointerException. Is there a specific version of Tomcat that > we need to use? > > java.lang.NullPointerException > > org.apache.camel.component.swagger.RestSwaggerReader$$anonfun$createParameters$2.apply(RestSwaggerReader.scala:190) > > org.apache.camel.component.swagger.RestSwaggerReader$$anonfun$createParameters$2.apply(RestSwaggerReader.scala:179) > > scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:772) > scala.collection.Iterator$class.foreach(Iterator.scala:727) > scala.collection.AbstractIterator.foreach(Iterator.scala:1157) > scala.collection.IterableLike$class.foreach(IterableLike.scala:72) > scala.collection.AbstractIterable.foreach(Iterable.scala:54) > > scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:771) > > org.apache.camel.component.swagger.RestSwaggerReader.createParameters(RestSwaggerReader.scala:179) > > org.apache.camel.component.swagger.RestSwaggerReader$$anonfun$read$2.apply(RestSwaggerReader.scala:123) > > org.apache.camel.component.swagger.RestSwaggerReader$$anonfun$read$2.apply(RestSwaggerReader.scala:70) > > scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:772) > > scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59) > scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47) > > scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:771) > > org.apache.camel.component.swagger.RestSwaggerReader.read(RestSwaggerReader.scala:70) > > org.apache.camel.component.swagger.RestApiListingCache$$anonfun$listing$1$$anonfun$apply$1.apply(RestApiListingCache.scala:42) > > org.apache.camel.component.swagger.RestApiListingCache$$anonfun$listing$1$$anonfun$apply$1.apply(RestApiListingCache.scala:41) > scala.collection.immutable.List.foreach(List.scala:318) > > scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:32) > scala.collection.mutable.ListBuffer.foreach(ListBuffer.scala:45) > > org.apache.camel.component.swagger.RestApiListingCache$$anonfun$listing$1.apply(RestApiListingCache.scala:41) > > org.apache.camel.component.swagger.RestApiListingCache$$anonfun$listing$1.apply(RestApiListingCache.scala:38) > scala.Option.orElse(Option.scala:257) > > org.apache.camel.component.swagger.RestApiListingCache$.listing(RestApiListingCache.scala:38) > > org.apache.camel.component.swagger.RestSwaggerApiDeclarationServlet.renderResourceListing(RestSwaggerApiDeclarationServlet.scala:171) > > org.apache.camel.component.swagger.RestSwaggerApiDeclarationServlet.doGet(RestSwaggerApiDeclarationServlet.scala:98) > javax.servlet.http.HttpServlet.service(HttpServlet.java:622) > javax.servlet.http.HttpServlet.service(HttpServlet.java:729) > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) > > org.apache.camel.component.swagger.RestSwaggerCorsFilter.doFilter(RestSwaggerCorsFilter.scala:44) > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Problem-with-swagger-in-the-camel-example-servlet-rest-tomcat-tp5767376.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/