# Attachment plugin error

**URL:** <https://discuss.elastic.co/t/attachment-plugin-error/7902>\
**Category:** Elasticsearch\
**Created:** [May 30, 2012, 5:12am UTC](https://discuss.elastic.co/t/attachment-plugin-error/7902 "2012-05-30T05:12:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajan](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@ajan](https://discuss.elastic.co/u/ajan)\
**Post date:** [May 30, 2012, 5:12am UTC](https://discuss.elastic.co/t/attachment-plugin-error/7902/1 "2012-05-30T05:12:49Z")

</div>

I get this error when I add mapping for attachments

org.elasticsearch.index.mapper.MapperParsingException: No handler for  
type [attachment] declared on field [file]  
at org.elasticsearch.index.mapper.object.ObjectMapper  
$TypeParser.parseProperties(ObjectMapper.java:254)  
at org.elasticsearch.index.mapper.object.ObjectMapper  
$TypeParser.parse(ObjectMapper.java:217)  
at  
org.elasticsearch.index.mapper.DocumentMapperParser.parse(DocumentMapperParser.java:  
162)  
at  
org.elasticsearch.index.mapper.MapperService.parse(MapperService.java:  
269)  
at org.elasticsearch.cluster.metadata.MetaDataMappingService  
$4.execute(MetaDataMappingService.java:302)  
at org.elasticsearch.cluster.service.InternalClusterService  
$2.run(InternalClusterService.java:211)  
at java.util.concurrent.ThreadPoolExecutor  
$Worker.runTask(ThreadPoolExecutor.java:886)  
at java.util.concurrent.ThreadPoolExecutor  
$Worker.run(ThreadPoolExecutor.java:908)  
at java.lang.Thread.run(Thread.java:662)

Any help would be appreciated

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 30, 2012, 5:34am UTC](https://discuss.elastic.co/t/attachment-plugin-error/7902/2 "2012-05-30T05:34:56Z")

</div>

Your attachment plugin is not correctly setup.  
What are your ES and plugin versions ?

Le 30 mai 2012 à 07:12, ajan [jan.afzal@gmail.com](mailto:jan.afzal@gmail.com) a écrit :

> I get this error when I add mapping for attachments
> 
> org.elasticsearch.index.mapper.MapperParsingException: No handler for  
> type [attachment] declared on field [file]  
> at org.elasticsearch.index.mapper.object.ObjectMapper  
> $TypeParser.parseProperties(ObjectMapper.java:254)  
> at org.elasticsearch.index.mapper.object.ObjectMapper  
> $TypeParser.parse(ObjectMapper.java:217)  
> at  
> org.elasticsearch.index.mapper.DocumentMapperParser.parse(DocumentMapperParser.java:  
> 162)  
> at  
> org.elasticsearch.index.mapper.MapperService.parse(MapperService.java:  
> 269)  
> at org.elasticsearch.cluster.metadata.MetaDataMappingService  
> $4.execute(MetaDataMappingService.java:302)  
> at org.elasticsearch.cluster.service.InternalClusterService  
> $2.run(InternalClusterService.java:211)  
> at java.util.concurrent.ThreadPoolExecutor  
> $Worker.runTask(ThreadPoolExecutor.java:886)  
> at java.util.concurrent.ThreadPoolExecutor  
> $Worker.run(ThreadPoolExecutor.java:908)  
> at java.lang.Thread.run(Thread.java:662)
> 
> Any help would be appreciated

---

<div class="post-metadata">

**Author:** ![ajan](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@ajan](https://discuss.elastic.co/u/ajan)\
**Post date:** [May 30, 2012, 6:49am UTC](https://discuss.elastic.co/t/attachment-plugin-error/7902/3 "2012-05-30T06:49:44Z")

</div>

Thanks for your response. I had to restart the cluster for the  
attachment plugin to be loaded. Is this a requirement?

On May 30, 10:34 am, David Pilato [da...@pilato.fr](mailto:da...@pilato.fr) wrote:

> Your attachment plugin is not correctly setup.  
> What are your ES and plugin versions ?
> 
> Le 30 mai 2012 à 07:12, ajan [jan.af...@gmail.com](mailto:jan.af...@gmail.com) a écrit :
> 
> > I get this error when I add mapping for attachments
> 
> > org.elasticsearch.index.mapper.MapperParsingException: No handler for  
> > type [attachment] declared on field [file]  
> > at org.elasticsearch.index.mapper.object.ObjectMapper  
> > $TypeParser.parseProperties(ObjectMapper.java:254)  
> > at org.elasticsearch.index.mapper.object.ObjectMapper  
> > $TypeParser.parse(ObjectMapper.java:217)  
> > at  
> > org.elasticsearch.index.mapper.DocumentMapperParser.parse(DocumentMapperPar ser.java:  
> > 162)  
> > at  
> > org.elasticsearch.index.mapper.MapperService.parse(MapperService.java:  
> > 269)  
> > at org.elasticsearch.cluster.metadata.MetaDataMappingService  
> > $4.execute(MetaDataMappingService.java:302)  
> > at org.elasticsearch.cluster.service.InternalClusterService  
> > $2.run(InternalClusterService.java:211)  
> > at java.util.concurrent.ThreadPoolExecutor  
> > $Worker.runTask(ThreadPoolExecutor.java:886)  
> > at java.util.concurrent.ThreadPoolExecutor  
> > $Worker.run(ThreadPoolExecutor.java:908)  
> > at java.lang.Thread.run(Thread.java:662)
> 
> > Any help would be appreciated

---

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [May 30, 2012, 11:23am UTC](https://discuss.elastic.co/t/attachment-plugin-error/7902/4 "2012-05-30T11:23:03Z")

</div>

Hi,

AFAIK ES plugins are detected and loaded at the ES node start time only. If  
you add them while the node is running I do not think they will be  
recognized.

You might consider to add the plugin as required into the node  
configuration (elasticsearch.yml):  
plugin.mandatory: mapper-attachments

This means the node will not start if required plugin is missing.

Regards,  
Lukas

On Wed, May 30, 2012 at 8:49 AM, ajan [jan.afzal@gmail.com](mailto:jan.afzal@gmail.com) wrote:

> Thanks for your response. I had to restart the cluster for the  
> attachment plugin to be loaded. Is this a requirement?
> 
> On May 30, 10:34 am, David Pilato [da...@pilato.fr](mailto:da...@pilato.fr) wrote:
> 
> > Your attachment plugin is not correctly setup.  
> > What are your ES and plugin versions ?
> > 
> > Le 30 mai 2012 à 07:12, ajan [jan.af...@gmail.com](mailto:jan.af...@gmail.com) a écrit :
> > 
> > > I get this error when I add mapping for attachments
> > 
> > > org.elasticsearch.index.mapper.MapperParsingException: No handler for  
> > > type [attachment] declared on field [file]  
> > > at org.elasticsearch.index.mapper.object.ObjectMapper  
> > > $TypeParser.parseProperties(ObjectMapper.java:254)  
> > > at org.elasticsearch.index.mapper.object.ObjectMapper  
> > > $TypeParser.parse(ObjectMapper.java:217)  
> > > at
> 
> org.elasticsearch.index.mapper.DocumentMapperParser.parse(DocumentMapperPar  
> ser.java:
> 
> > > 1. 
> > > 
> > > at  
> > > org.elasticsearch.index.mapper.MapperService.parse(MapperService.java:  
> > > 269)  
> > > at org.elasticsearch.cluster.metadata.MetaDataMappingService  
> > > $4.execute(MetaDataMappingService.java:302)  
> > > at org.elasticsearch.cluster.service.InternalClusterService  
> > > $2.run(InternalClusterService.java:211)  
> > > at java.util.concurrent.ThreadPoolExecutor  
> > > $Worker.runTask(ThreadPoolExecutor.java:886)  
> > > at java.util.concurrent.ThreadPoolExecutor  
> > > $Worker.run(ThreadPoolExecutor.java:908)  
> > > at java.lang.Thread.run(Thread.java:662)
> > 
> > > Any help would be appreciated

---

<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:26am UTC](https://discuss.elastic.co/t/attachment-plugin-error/7902/5 "2017-07-06T03:26:18Z")

</div>


