# Integer cannot be casted to Long

**URL:** <https://discuss.elastic.co/t/integer-cannot-be-casted-to-long/143409>\
**Category:** Elasticsearch\
**Created:** [August 7, 2018, 10:55pm UTC](https://discuss.elastic.co/t/integer-cannot-be-casted-to-long/143409 "2018-08-07T22:55:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![almanzarjulian](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@almanzarjulian](https://discuss.elastic.co/u/almanzarjulian)\
**Post date:** [August 7, 2018, 10:55pm UTC](https://discuss.elastic.co/t/integer-cannot-be-casted-to-long/143409/1 "2018-08-07T22:55:58Z")

</div>

Good afternoon,

I'm testing a pipeline and i keep recieving this error:

{  
"error": {  
"root\_cause": [  
{  
"type": "class\_cast\_exception",  
"reason": "java.lang.Integer cannot be cast to java.lang.Long"  
}  
],  
"type": "class\_cast\_exception",  
"reason": "java.lang.Integer cannot be cast to java.lang.Long"  
},  
"status": 500  
}

My pipeline looks like this:

POST \_ingest/pipeline/\_simulate  
{  
"pipeline": {  
"description": "Some pipeline",  
"processors": [  
{  
"grok": {  
"field": "message",  
"patterns": [""""%{DATE:date}","%{INT:in\_bytes\_s}","%{INT:out\_bytes\_s}","%{INT:bw}"""]  
}  
},  
{  
"remove": {  
"field": "message"  
}  
}  
]  
},  
"docs": [  
{  
"\_index": "filebeat-2018.08.07",  
"\_type": "doc",  
"\_id": "USrkFWUBvYlrqTdwr60G",  
"\_version": 1,  
"\_score": null,  
"\_source": {  
"@timestamp": "2018-08-07T19:37:13.793Z",  
"beat": {  
"name": "name",  
"hostname": "hostname",  
"version": "6.0.0"  
},  
"source": "path-to-file",  
"offset": 3258,  
"message": """ "08/03/2018","4255.2169029019915","34988.889875923735","10000000000" """,  
"prospector": {  
"type": "log"  
}  
},  
"fields": {  
"@timestamp": [  
"2018-08-07T19:37:13.793Z"  
]  
},  
"sort": [  
1533670633793  
]  
}  
]  
}

The problem is with the \_version field, when i delete it from the sample doc it works just fine.

Can someone help me with this please?

Many thanks in advance.

---

<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:** [September 4, 2018, 10:56pm UTC](https://discuss.elastic.co/t/integer-cannot-be-casted-to-long/143409/2 "2018-09-04T22:56:03Z")

</div>

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