You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by hefiso <he...@gmail.com> on 2012/03/13 14:25:29 UTC

Error using apache-cxf w. Camel 2.9.1

Hi

When upgrading from Apache Camel 2.9.0 to 2.9.1 I suddently get an error
when using camel-cxf endpoints.

I have defined this endpoint:


and use it in this route:


When running my JUnit tests (extending CamelSpringTestSupport) I get this
exception:


When I debug my test I see that the method doStart() in CxfProducer is never
called, resulting in client being null (hence the NullPointerException in
CxfProducer.java:331 ).

In my POM I use these dependencies:


Any suggestions on how to avoid this problem, besides downgrading to 2.9.0? 

Best regards
Henrik


--
View this message in context: http://camel.465427.n5.nabble.com/Error-using-apache-cxf-w-Camel-2-9-1-tp5560906p5560906.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Error using apache-cxf w. Camel 2.9.1

Posted by hefiso <he...@gmail.com>.
I only use a mocked endpoint in my test:


The problem still exists if I remove the mocked endpoint and
InterceptSendToEndpoint is still in the StackTrace... I do not know the
origin of InterceptSendToEndpoint in the stacktrace, but perhaps it comes
from using ? However, I really don't know :-/




--
View this message in context: http://camel.465427.n5.nabble.com/Error-using-apache-cxf-w-Camel-2-9-1-tp5560906p5561094.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Error using apache-cxf w. Camel 2.9.1

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Do you use any interceptor in your unit test such as indicate in the stacktrace?
InterceptSendToEndpoint

Can you post the code snippet where you use that?



On Tue, Mar 13, 2012 at 2:25 PM, hefiso
<he...@gmail.com> wrote:
> Hi
>
> When upgrading from Apache Camel 2.9.0 to 2.9.1 I suddently get an error
> when using camel-cxf endpoints.
>
> I have defined this endpoint:
>
>
> and use it in this route:
>
>
> When running my JUnit tests (extending CamelSpringTestSupport) I get this
> exception:
>
>
> When I debug my test I see that the method doStart() in CxfProducer is never
> called, resulting in client being null (hence the NullPointerException in
> CxfProducer.java:331 ).
>
> In my POM I use these dependencies:
>
>
> Any suggestions on how to avoid this problem, besides downgrading to 2.9.0?
>
> Best regards
> Henrik
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Error-using-apache-cxf-w-Camel-2-9-1-tp5560906p5560906.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Error using apache-cxf w. Camel 2.9.1

Posted by hefiso <he...@gmail.com>.
Thanks, I see the fix is schedulded for 2.9.2.

In the meantime I manage by *not* mocking all endpoints and creating the
mock endpoints manually in my tests.

/Henrik

--
View this message in context: http://camel.465427.n5.nabble.com/Error-using-apache-cxf-w-Camel-2-9-1-tp5560906p5567659.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Error using apache-cxf w. Camel 2.9.1

Posted by Willem Jiang <wi...@gmail.com>.
FYI,I just did a quick fix on trunk and will merge the patch into other 
branches.

On Wed Mar 14 22:34:24 2012, hefiso wrote:
> Thanks. JIRA created:  https://issues.apache.org/jira/browse/CAMEL-5084
> https://issues.apache.org/jira/browse/CAMEL-5084
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Error-using-apache-cxf-w-Camel-2-9-1-tp5560906p5564943.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang 
Weibo: willemjiang 


Re: Error using apache-cxf w. Camel 2.9.1

Posted by hefiso <he...@gmail.com>.
Thanks. JIRA created:  https://issues.apache.org/jira/browse/CAMEL-5084
https://issues.apache.org/jira/browse/CAMEL-5084 

--
View this message in context: http://camel.465427.n5.nabble.com/Error-using-apache-cxf-w-Camel-2-9-1-tp5560906p5564943.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Error using apache-cxf w. Camel 2.9.1

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Mar 14, 2012 at 12:25 PM, hefiso
<he...@gmail.com> wrote:
> Hi
>
> I have created a small example showing the error:
> http://camel.465427.n5.nabble.com/file/n5564327/hefiso-test.zip
> hefiso-test.zip
>
> If I change the camel version to 2.9.0 (in the pom.xml), then the test works
> as expected... but not with 2.9.1.
>
> The InterceptSendToEndpoint comes from mocking all endpoints in my JUnit
> test:
>

Thanks. Do you mind creating a JIRA ticket and attach your sampel test case.

I suspect the mocking all endpoints with the InterceptSendToEndpoint,
short-circut the startup procedure to not delegate the start call to
the intercepted endpoint. Or there abouts.



>
>
> /Henrik
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Error-using-apache-cxf-w-Camel-2-9-1-tp5560906p5564327.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Error using apache-cxf w. Camel 2.9.1

Posted by hefiso <he...@gmail.com>.
Hi

I have created a small example showing the error: 
http://camel.465427.n5.nabble.com/file/n5564327/hefiso-test.zip
hefiso-test.zip 

If I change the camel version to 2.9.0 (in the pom.xml), then the test works
as expected... but not with 2.9.1.

The InterceptSendToEndpoint comes from mocking all endpoints in my JUnit
test:



/Henrik

--
View this message in context: http://camel.465427.n5.nabble.com/Error-using-apache-cxf-w-Camel-2-9-1-tp5560906p5564327.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Error using apache-cxf w. Camel 2.9.1

Posted by "Willem.Jiang" <wi...@gmail.com>.
Just one comment on the camel-cxf behavior change of Camel 2.9.1.
CxfProducer create a new client when it is started to avoid the memory leak
if the customer create the  route dynamically. 

I'm not sure if it is relates to test code that you have, can you show us
the whole test example.

Willem

--
View this message in context: http://camel.465427.n5.nabble.com/Error-using-apache-cxf-w-Camel-2-9-1-tp5560906p5563188.html
Sent from the Camel - Users mailing list archive at Nabble.com.