# Adding an attachment field results in following error

**URL:** <https://discuss.elastic.co/t/adding-an-attachment-field-results-in-following-error/67911>\
**Category:** Elasticsearch\
**Created:** [December 2, 2016, 11:48pm UTC](https://discuss.elastic.co/t/adding-an-attachment-field-results-in-following-error/67911 "2016-12-02T23:48:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elita\_Lobo](https://avatars.discourse-cdn.com/v4/letter/e/e495f1/32.png) [@Elita\_Lobo](https://discuss.elastic.co/u/Elita_Lobo)\
**Post date:** [December 2, 2016, 11:48pm UTC](https://discuss.elastic.co/t/adding-an-attachment-field-results-in-following-error/67911/1 "2016-12-02T23:48:25Z")

</div>

I have a class  
public class Expense {  
@Id  
@Field(type = FieldType.String, index = FieldIndex.not\_analyzed)  
private String expense\_id;  
@Field(type = FieldType.String, index = FieldIndex.not\_analyzed)  
private String title;  
@Field( type = FieldType.String, index = FieldIndex.not\_analyzed)  
private String spender\_id;  
@Field(type = FieldType.String, index = FieldIndex.not\_analyzed)  
private String approver\_id;  
@Field(type = FieldType.String, index = FieldIndex.not\_analyzed)  
private String datetime; //yyy-MM-dd HH:mm:ss  
@Field( type = FieldType.String, index = FieldIndex.not\_analyzed)  
private List managers\_chain;  
private String description;  
@Field(type = FieldType.String, index = FieldIndex.not\_analyzed)  
private String category;  
private Double amount;  
@JsonSerialize  
@Field(type = FieldType.Object)  
private Source source;  
@Field(type = FieldType.String, index = FieldIndex.not\_analyzed)  
private String status;  
@Field(type = FieldType.Attachment)  
private Attachment proof;

```
public String getStatus() {
    return status;
}

public Attachment getProof() {
    return proof;
}

public void setProof(Attachment proof) {
    this.proof = proof;
}

```

}

When I run the spring boot app, it results in following error. How do I fix it?  
MapperParsingException[Mapping definition for [proof] has unsupported parameters: [store : false]]  
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [December 5, 2016, 9:04am UTC](https://discuss.elastic.co/t/adding-an-attachment-field-results-in-following-error/67911/2 "2016-12-05T09:04:00Z")

</div>

Hey,

what framework are you using here? Is this spring data elasticsearch? If so, does that version support your elasticsearch version? It would be great if you can provide either more information of which requests your libraries are sending or if you maybe create an issue in that corresponding library.

--Alex

---

<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:** [January 2, 2017, 9:04am UTC](https://discuss.elastic.co/t/adding-an-attachment-field-results-in-following-error/67911/3 "2017-01-02T09:04:43Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
