Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-8804

NullPointerException in RestSwaggerReader

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.16.0
    • Component/s: camel-swagger
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      16:21:14,281 INFO  [org.apache.camel.impl.DefaultCamelContext] (pool-3-thread-1) Apache Camel 2.16-SNAPSHOT (CamelContext: swagger-test) is starting
      16:21:14,283 INFO  [org.apache.camel.management.ManagedManagementStrategy] (pool-3-thread-1) JMX is enabled
      16:21:14,360 INFO  [org.wildfly.extension.camel] (MSC service thread 1-5) Bound camel naming object: java:jboss/camel/context/swagger-test
      16:21:14,360 INFO  [org.wildfly.extension.camel] (pool-3-thread-1) Camel context starting: swagger-test
      16:21:14,493 INFO  [org.apache.camel.impl.DefaultCamelContext] (pool-3-thread-1) AllowUseOriginalMessage is enabled. If access to the original message is not needed, then its recommended to turn this option off as it may improve performance.
      16:21:14,494 INFO  [org.apache.camel.impl.DefaultCamelContext] (pool-3-thread-1) StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
      16:21:14,577 INFO  [org.apache.camel.impl.DefaultCamelContext] (pool-3-thread-1) Route: route2 started and consuming from: Endpoint[direct://hello]
      16:21:14,580 INFO  [org.apache.camel.impl.DefaultCamelContext] (pool-3-thread-1) Route: route1 started and consuming from: Endpoint[servlet:///hello/%7Bname%7D?httpMethodRestrict=GET]
      16:21:14,580 INFO  [org.apache.camel.impl.DefaultCamelContext] (pool-3-thread-1) Total 2 routes, of which 2 is started.
      16:21:14,581 INFO  [org.apache.camel.impl.DefaultCamelContext] (pool-3-thread-1) Apache Camel 2.16-SNAPSHOT (CamelContext: swagger-test) started in 0.299 seconds
      16:21:15,358 INFO  [stdout] (pool-3-thread-1) org.apache.camel:context=swagger-test,type=context,name="swagger-test": <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      16:21:15,358 INFO  [stdout] (pool-3-thread-1) <rests xmlns="http://camel.apache.org/schema/spring">
      16:21:15,358 INFO  [stdout] (pool-3-thread-1)     <rest path="/hello">
      16:21:15,358 INFO  [stdout] (pool-3-thread-1)         <get uri="/{name}">
      16:21:15,358 INFO  [stdout] (pool-3-thread-1)             <param paramType="path" name="name" required="true"/>
      16:21:15,359 INFO  [stdout] (pool-3-thread-1)             <to uri="direct:hello" id="to1"/>
      16:21:15,359 INFO  [stdout] (pool-3-thread-1)         </get>
      16:21:15,359 INFO  [stdout] (pool-3-thread-1)     </rest>
      16:21:15,359 INFO  [stdout] (pool-3-thread-1) </rests>
      16:21:15,360 INFO  [stdout] (pool-3-thread-1) 
      16:21:15,364 INFO  [stdout] (pool-3-thread-1) jboss.jsr77:j2eeType=JVM,name=default,J2EEServer=default: null
      16:21:15,365 INFO  [stdout] (pool-3-thread-1) jboss.jsr77:j2eeType=J2EEServer,name=default: null
      16:21:15,365 INFO  [stdout] (pool-3-thread-1) jboss.jsr77:j2eeType=J2EEDomain,name=jboss.jsr77: null
      16:21:15,820 ERROR [io.undertow.request] (default task-2) UT005023: Exception handling request to /swagger-tests/api-docs: java.lang.NullPointerException
      	at org.apache.camel.component.swagger.RestSwaggerReader$$anonfun$createParameters$2.apply(RestSwaggerReader.scala:190)
      	at org.apache.camel.component.swagger.RestSwaggerReader$$anonfun$createParameters$2.apply(RestSwaggerReader.scala:179)
      	at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:772)
      	at scala.collection.Iterator$class.foreach(Iterator.scala:727)
      	at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
      	at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
      	at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
      	at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:771)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                davsclaus Claus Ibsen
                Reporter:
                tdiesler Thomas Diesler
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: