You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Boris Terzic (JIRA)" <ji...@apache.org> on 2010/11/17 22:17:45 UTC
[jira] Created: (CAMEL-3343) CxfRsInvoker produces
NullpointerException when no ContinuationProvider is set the InMessage
CxfRsInvoker produces NullpointerException when no ContinuationProvider is set the InMessage
--------------------------------------------------------------------------------------------
Key: CAMEL-3343
URL: https://issues.apache.org/activemq/browse/CAMEL-3343
Project: Apache Camel
Issue Type: Bug
Components: camel-cxf
Affects Versions: 2.5.0
Reporter: Boris Terzic
In my usage of CXF-RS with Camel through the camel-cxf component I ran into a NullpointerException, the specific case is described in some detail on StackOverflow: http://stackoverflow.com/questions/4198461/why-do-i-get-a-nullpointerexception-when-invoking-the-cxf-rs-endpoint-of-a-camel
Specifically I run into a NullpointerException:
{code:java}
Caused by: java.lang.NullPointerException
at org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.getContinuation(CxfRsInvoker.java:63)
at org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.performInvocation(CxfRsInvoker.java:52)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89)
... 33 more
{code}
I was assuming I was misconfiguring something but didn't find any alternative way so I started digging in the camel-cxf source code.
I found that such a "getContinuation" method also exists for the {{org.apache.camel.component.cxf.CxfConsumer}} as well as for the CxfRsInvoker (where it was failing for me). However in the case of the CxfConsumer there is a guard on the ContinuationProvider so that if it is null, then null is returned:
{code:java}
return provider == null ? null : provider.getContinuation();
{code}
CxfRsInvoker does not have this guard, but it does have code to deal with a "null" Continuation at the calling site (line 52, in performInvocation). Therefore I assumed this was a bug and patched the guard into the CxfRsInvoker as well.
My program now seems to work correctly. I assume this is a bug.
For completeness sake, this is what getContinuation now looks like for me:
{code:java}
private Continuation getContinuation(Exchange cxfExchange) {
ContinuationProvider provider =
(ContinuationProvider)cxfExchange.getInMessage().get(ContinuationProvider.class.getName());
return provider == null ? null : provider.getContinuation();
}
{code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (CAMEL-3343) CxfRsInvoker produces
NullpointerException when no ContinuationProvider is set in the InMessage
Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-3343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Willem Jiang reassigned CAMEL-3343:
-----------------------------------
Assignee: Willem Jiang
> CxfRsInvoker produces NullpointerException when no ContinuationProvider is set in the InMessage
> -----------------------------------------------------------------------------------------------
>
> Key: CAMEL-3343
> URL: https://issues.apache.org/activemq/browse/CAMEL-3343
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-cxf
> Affects Versions: 2.5.0
> Reporter: Boris Terzic
> Assignee: Willem Jiang
>
> In my usage of CXF-RS with Camel through the camel-cxf component I ran into a NullpointerException, the specific case is described in some detail on StackOverflow: http://stackoverflow.com/questions/4198461/why-do-i-get-a-nullpointerexception-when-invoking-the-cxf-rs-endpoint-of-a-camel
> Specifically I run into a NullpointerException:
> {code:java}
> Caused by: java.lang.NullPointerException
> at org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.getContinuation(CxfRsInvoker.java:63)
> at org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.performInvocation(CxfRsInvoker.java:52)
> at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89)
> ... 33 more
> {code}
> I was assuming I was misconfiguring something but didn't find any alternative way so I started digging in the camel-cxf source code.
> I found that such a "getContinuation" method also exists for the {{org.apache.camel.component.cxf.CxfConsumer}} as well as for the CxfRsInvoker (where it was failing for me). However in the case of the CxfConsumer there is a guard on the ContinuationProvider so that if it is null, then null is returned:
> {code:java}
> return provider == null ? null : provider.getContinuation();
> {code}
> CxfRsInvoker does not have this guard, but it does have code to deal with a "null" Continuation at the calling site (line 52, in performInvocation). Therefore I assumed this was a bug and patched the guard into the CxfRsInvoker as well.
> My program now seems to work correctly. I assume this is a bug.
> For completeness sake, this is what getContinuation now looks like for me:
> {code:java}
> private Continuation getContinuation(Exchange cxfExchange) {
> ContinuationProvider provider =
> (ContinuationProvider)cxfExchange.getInMessage().get(ContinuationProvider.class.getName());
> return provider == null ? null : provider.getContinuation();
> }
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-3343) CxfRsInvoker produces
NullpointerException when no ContinuationProvider is set in the InMessage
Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-3343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63394#action_63394 ]
Willem Jiang commented on CAMEL-3343:
-------------------------------------
Yes, It's a bug of camel-cxfrs, I just committed a quick fix for it and update the CxfRsInvoker to use CXF 2.3.0 continuation API.
Please check out the latest Camel 2.6-SNAPSHOT for verification.
> CxfRsInvoker produces NullpointerException when no ContinuationProvider is set in the InMessage
> -----------------------------------------------------------------------------------------------
>
> Key: CAMEL-3343
> URL: https://issues.apache.org/activemq/browse/CAMEL-3343
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-cxf
> Affects Versions: 2.5.0
> Reporter: Boris Terzic
> Assignee: Willem Jiang
> Fix For: 2.6.0
>
>
> In my usage of CXF-RS with Camel through the camel-cxf component I ran into a NullpointerException, the specific case is described in some detail on StackOverflow: http://stackoverflow.com/questions/4198461/why-do-i-get-a-nullpointerexception-when-invoking-the-cxf-rs-endpoint-of-a-camel
> Specifically I run into a NullpointerException:
> {code:java}
> Caused by: java.lang.NullPointerException
> at org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.getContinuation(CxfRsInvoker.java:63)
> at org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.performInvocation(CxfRsInvoker.java:52)
> at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89)
> ... 33 more
> {code}
> I was assuming I was misconfiguring something but didn't find any alternative way so I started digging in the camel-cxf source code.
> I found that such a "getContinuation" method also exists for the {{org.apache.camel.component.cxf.CxfConsumer}} as well as for the CxfRsInvoker (where it was failing for me). However in the case of the CxfConsumer there is a guard on the ContinuationProvider so that if it is null, then null is returned:
> {code:java}
> return provider == null ? null : provider.getContinuation();
> {code}
> CxfRsInvoker does not have this guard, but it does have code to deal with a "null" Continuation at the calling site (line 52, in performInvocation). Therefore I assumed this was a bug and patched the guard into the CxfRsInvoker as well.
> My program now seems to work correctly. I assume this is a bug.
> For completeness sake, this is what getContinuation now looks like for me:
> {code:java}
> private Continuation getContinuation(Exchange cxfExchange) {
> ContinuationProvider provider =
> (ContinuationProvider)cxfExchange.getInMessage().get(ContinuationProvider.class.getName());
> return provider == null ? null : provider.getContinuation();
> }
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CAMEL-3343) CxfRsInvoker produces
NullpointerException when no ContinuationProvider is set in the InMessage
Posted by "Boris Terzic (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-3343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Boris Terzic updated CAMEL-3343:
--------------------------------
Summary: CxfRsInvoker produces NullpointerException when no ContinuationProvider is set in the InMessage (was: CxfRsInvoker produces NullpointerException when no ContinuationProvider is set the InMessage)
> CxfRsInvoker produces NullpointerException when no ContinuationProvider is set in the InMessage
> -----------------------------------------------------------------------------------------------
>
> Key: CAMEL-3343
> URL: https://issues.apache.org/activemq/browse/CAMEL-3343
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-cxf
> Affects Versions: 2.5.0
> Reporter: Boris Terzic
>
> In my usage of CXF-RS with Camel through the camel-cxf component I ran into a NullpointerException, the specific case is described in some detail on StackOverflow: http://stackoverflow.com/questions/4198461/why-do-i-get-a-nullpointerexception-when-invoking-the-cxf-rs-endpoint-of-a-camel
> Specifically I run into a NullpointerException:
> {code:java}
> Caused by: java.lang.NullPointerException
> at org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.getContinuation(CxfRsInvoker.java:63)
> at org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.performInvocation(CxfRsInvoker.java:52)
> at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89)
> ... 33 more
> {code}
> I was assuming I was misconfiguring something but didn't find any alternative way so I started digging in the camel-cxf source code.
> I found that such a "getContinuation" method also exists for the {{org.apache.camel.component.cxf.CxfConsumer}} as well as for the CxfRsInvoker (where it was failing for me). However in the case of the CxfConsumer there is a guard on the ContinuationProvider so that if it is null, then null is returned:
> {code:java}
> return provider == null ? null : provider.getContinuation();
> {code}
> CxfRsInvoker does not have this guard, but it does have code to deal with a "null" Continuation at the calling site (line 52, in performInvocation). Therefore I assumed this was a bug and patched the guard into the CxfRsInvoker as well.
> My program now seems to work correctly. I assume this is a bug.
> For completeness sake, this is what getContinuation now looks like for me:
> {code:java}
> private Continuation getContinuation(Exchange cxfExchange) {
> ContinuationProvider provider =
> (ContinuationProvider)cxfExchange.getInMessage().get(ContinuationProvider.class.getName());
> return provider == null ? null : provider.getContinuation();
> }
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CAMEL-3343) CxfRsInvoker produces
NullpointerException when no ContinuationProvider is set in the InMessage
Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-3343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Willem Jiang resolved CAMEL-3343.
---------------------------------
Resolution: Fixed
Fix Version/s: 2.6.0
> CxfRsInvoker produces NullpointerException when no ContinuationProvider is set in the InMessage
> -----------------------------------------------------------------------------------------------
>
> Key: CAMEL-3343
> URL: https://issues.apache.org/activemq/browse/CAMEL-3343
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-cxf
> Affects Versions: 2.5.0
> Reporter: Boris Terzic
> Assignee: Willem Jiang
> Fix For: 2.6.0
>
>
> In my usage of CXF-RS with Camel through the camel-cxf component I ran into a NullpointerException, the specific case is described in some detail on StackOverflow: http://stackoverflow.com/questions/4198461/why-do-i-get-a-nullpointerexception-when-invoking-the-cxf-rs-endpoint-of-a-camel
> Specifically I run into a NullpointerException:
> {code:java}
> Caused by: java.lang.NullPointerException
> at org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.getContinuation(CxfRsInvoker.java:63)
> at org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.performInvocation(CxfRsInvoker.java:52)
> at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89)
> ... 33 more
> {code}
> I was assuming I was misconfiguring something but didn't find any alternative way so I started digging in the camel-cxf source code.
> I found that such a "getContinuation" method also exists for the {{org.apache.camel.component.cxf.CxfConsumer}} as well as for the CxfRsInvoker (where it was failing for me). However in the case of the CxfConsumer there is a guard on the ContinuationProvider so that if it is null, then null is returned:
> {code:java}
> return provider == null ? null : provider.getContinuation();
> {code}
> CxfRsInvoker does not have this guard, but it does have code to deal with a "null" Continuation at the calling site (line 52, in performInvocation). Therefore I assumed this was a bug and patched the guard into the CxfRsInvoker as well.
> My program now seems to work correctly. I assume this is a bug.
> For completeness sake, this is what getContinuation now looks like for me:
> {code:java}
> private Continuation getContinuation(Exchange cxfExchange) {
> ContinuationProvider provider =
> (ContinuationProvider)cxfExchange.getInMessage().get(ContinuationProvider.class.getName());
> return provider == null ? null : provider.getContinuation();
> }
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (CAMEL-3343) CxfRsInvoker produces
NullpointerException when no ContinuationProvider is set in the InMessage
Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-3343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63394#action_63394 ]
Willem Jiang edited comment on CAMEL-3343 at 11/18/10 3:37 AM:
---------------------------------------------------------------
Yes, It's a bug of camel-cxfrs, I just committed a quick fix for it and updated the CxfRsInvoker to use CXF 2.3.0 continuation API.
Please check out the latest Camel 2.6-SNAPSHOT for verification.
was (Author: njiang):
Yes, It's a bug of camel-cxfrs, I just committed a quick fix for it and update the CxfRsInvoker to use CXF 2.3.0 continuation API.
Please check out the latest Camel 2.6-SNAPSHOT for verification.
> CxfRsInvoker produces NullpointerException when no ContinuationProvider is set in the InMessage
> -----------------------------------------------------------------------------------------------
>
> Key: CAMEL-3343
> URL: https://issues.apache.org/activemq/browse/CAMEL-3343
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-cxf
> Affects Versions: 2.5.0
> Reporter: Boris Terzic
> Assignee: Willem Jiang
> Fix For: 2.6.0
>
>
> In my usage of CXF-RS with Camel through the camel-cxf component I ran into a NullpointerException, the specific case is described in some detail on StackOverflow: http://stackoverflow.com/questions/4198461/why-do-i-get-a-nullpointerexception-when-invoking-the-cxf-rs-endpoint-of-a-camel
> Specifically I run into a NullpointerException:
> {code:java}
> Caused by: java.lang.NullPointerException
> at org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.getContinuation(CxfRsInvoker.java:63)
> at org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.performInvocation(CxfRsInvoker.java:52)
> at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89)
> ... 33 more
> {code}
> I was assuming I was misconfiguring something but didn't find any alternative way so I started digging in the camel-cxf source code.
> I found that such a "getContinuation" method also exists for the {{org.apache.camel.component.cxf.CxfConsumer}} as well as for the CxfRsInvoker (where it was failing for me). However in the case of the CxfConsumer there is a guard on the ContinuationProvider so that if it is null, then null is returned:
> {code:java}
> return provider == null ? null : provider.getContinuation();
> {code}
> CxfRsInvoker does not have this guard, but it does have code to deal with a "null" Continuation at the calling site (line 52, in performInvocation). Therefore I assumed this was a bug and patched the guard into the CxfRsInvoker as well.
> My program now seems to work correctly. I assume this is a bug.
> For completeness sake, this is what getContinuation now looks like for me:
> {code:java}
> private Continuation getContinuation(Exchange cxfExchange) {
> ContinuationProvider provider =
> (ContinuationProvider)cxfExchange.getInMessage().get(ContinuationProvider.class.getName());
> return provider == null ? null : provider.getContinuation();
> }
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.