cancel
Showing results for 
Search instead for 
Did you mean: 

NPE on CamelBehavior createExchange

sdeschenes
Champ in-the-making
Champ in-the-making
Hi,

I've got a WARN in my log using camel 2.16.0-SNAPSHOT and activiti. I know, you're not there yet, but I've got an issue with 2.15.2 wich is resolved in 2.16.0, so…

The problem seems to come from the use of a DefaultExchange in CamelBehavior. That stuff:
Exchange ex = new DefaultExchange(camelContextObj);
(line 135) seems to generate an NPE, because it doesn't set the necessary properties on the exchange for the event to be notified correctly.

I've fork Activiti and replace it with 
Exchange ex = endpoint.createExchange();
and everything seems to work fine now. (including tests).

So, in prevention of a futur issue/ npe warning, can you change the way the exchange is created? Do you want me to do a pull request with the modification?

Thanks!
1 REPLY 1

trademak
Star Contributor
Star Contributor
Yes, please create a pull request and we'll look into it.

Thanks,