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

NPE of camel-restlet

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.0, 1.6.0, 2.0-M1
    • 1.6.1, 2.0-M2
    • None
    • None

    Description

      I'm getting a NullPointerException in Restlet when I use the Restlet component as a client. I set up a Route that's something like:

      from(endpointUri).setExchangePattern(ExchangePattern.InOut)
      .to("restlet:http://localhost:9000/whatever")
      .process(new SomeProcessor());

      When I hit this route, I gett a NullPointerException at com.noelios.restlet.http.HttpConverter.getLogger(). Ultimately, it's trying to warn me about some headers that Restlet is going to ignore. I see that when the RestletProducer creates the Restlet Client, it doesn't set a context (which is the object that's null, causing the NPE). If I simply hack in:

      client.setContext(new Context());
      after the client is instantiated, it works.

      Attachments

        Activity

          People

            njiang Willem Jiang
            njiang Willem Jiang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: