# 0.19 plugin question: Mapping Actions to TransportActions

**URL:** <https://discuss.elastic.co/t/0-19-plugin-question-mapping-actions-to-transportactions/6685>\
**Category:** Elasticsearch\
**Created:** [February 13, 2012, 8:49am UTC](https://discuss.elastic.co/t/0-19-plugin-question-mapping-actions-to-transportactions/6685 "2012-02-13T08:49:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander\_Reelsen](https://avatars.discourse-cdn.com/v4/letter/a/85e7bf/32.png) [@Alexander\_Reelsen](https://discuss.elastic.co/u/Alexander_Reelsen)\
**Post date:** [February 13, 2012, 8:49am UTC](https://discuss.elastic.co/t/0-19-plugin-question-mapping-actions-to-transportactions/6685/1 "2012-02-13T08:49:23Z")

</div>

Hi there,

just a minor plugin question I do not understand. I tried to convert  
my suggest plugin to the new introduced more generic client API and  
got some weird null pointer exceptions when trying to execute my  
action. The source of my problem is in the NodeClient constructor,  
where there is a mapping actionsbuilder used MapBuilder\<Action,  
TransportAction\> actionsBuilder, which creates the actions variable

which maps actions to transport actions. However I havent seen in the  
source yet where to do this mapping (okok, it was 1am yesterday where  
I havent seen it, might be a cause :-).

Thanks for any hints.

--Alexander

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [February 13, 2012, 6:25pm UTC](https://discuss.elastic.co/t/0-19-plugin-question-mapping-actions-to-transportactions/6685/2 "2012-02-13T18:25:57Z")

</div>

Not sure I follow exactly what doesn't work, but have you registered your custom action with the ActionModule?: [https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/ActionModule.java#L150](https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/ActionModule.java#L150).

On Monday, February 13, 2012 at 10:49 AM, Alexander Reelsen wrote:

> Hi there,
> 
> just a minor plugin question I do not understand. I tried to convert  
> my suggest plugin to the new introduced more generic client API and  
> got some weird null pointer exceptions when trying to execute my  
> action. The source of my problem is in the NodeClient constructor,  
> where there is a mapping actionsbuilder used MapBuilder\<Action,  
> TransportAction\> actionsBuilder, which creates the actions variable
> 
> which maps actions to transport actions. However I havent seen in the  
> source yet where to do this mapping (okok, it was 1am yesterday where  
> I havent seen it, might be a cause :-).
> 
> Thanks for any hints.
> 
> --Alexander

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:39am UTC](https://discuss.elastic.co/t/0-19-plugin-question-mapping-actions-to-transportactions/6685/3 "2017-07-06T03:39:36Z")

</div>


