You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Willem Jiang <wi...@gmail.com> on 2009/04/03 12:31:48 UTC

Re: NPE of RestLet Producer

Hi,

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.

[1]https://issues.apache.org/activemq/browse/CAMEL-1516

Willem
n0_j0@yahoo.com 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: 
> http://www.nabble.com/off-topic%3A-spam-filter-not-letting-messages-through-to-mailing-list-tp22857735p22860292.html
> 
>