camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <>
Subject Re: NPE of RestLet Producer
Date Fri, 03 Apr 2009 10:31:48 GMT

I did the code for a while and think it is a bug of camel-restlet and
just fill a JIRA[1] for it, and I will did a quick fix for it.


Willem wrote:
> Hi Willem,
> I'm still not able to get it through....  Not sure what's wrong - I subscribed to the
mailing list today just to see if that would work, but it didn't.
> Anyway, here's the message - I'm not sure if it's a bug, but it may be:
> 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.
> So, am I invoking something wrong (is there somewhere else that the context for the Restlet
Client should be set)?  Or is that something that was missed in the Restlet component?  My
hack leaves a mismatch in the logging (since Restlet uses java.util.logging), so it's not
really the right solution.
> Thanks. 
> willem.jiang wrote:
>> Hi,
>> You may need to subscribe the mail-list first.
>> Since we can see your mail at this time, I think it is OK for you to
>> send the bug report here.
>> Willem
>> nojonojo wrote:
>>> Sorry for the off-topic post.  I have made several attempts to post a
>>> message
>>> to the mailing list through Nabble about a bug in the Restlet component. 
>>> All of my postings have been rejected by the mailing list as spam.  Does
>>> anybody have any suggestions as to how I might get the message through?
>>> Thanks.
>>> Nolan
> Quoted from: 

View raw message