# Problem with ingest node pipeline setup - java.lang.Integer cannot be cast to class java.lang.Long

**URL:** <https://discuss.elastic.co/t/problem-with-ingest-node-pipeline-setup-java-lang-integer-cannot-be-cast-to-class-java-lang-long/166490>\
**Category:** Elasticsearch\
**Created:** [January 31, 2019, 7:59am UTC](https://discuss.elastic.co/t/problem-with-ingest-node-pipeline-setup-java-lang-integer-cannot-be-cast-to-class-java-lang-long/166490 "2019-01-31T07:59:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yucheng](https://avatars.discourse-cdn.com/v4/letter/y/eada6e/32.png) [@yucheng](https://discuss.elastic.co/u/yucheng)\
**Post date:** [January 31, 2019, 7:59am UTC](https://discuss.elastic.co/t/problem-with-ingest-node-pipeline-setup-java-lang-integer-cannot-be-cast-to-class-java-lang-long/166490/1 "2019-01-31T07:59:27Z")

</div>

Hi there,

I was trying to use es(6.5) ingest node pipeline (instead of logstash) to extract info from filebeat (6.5) logs, however my pipeline (as following) seemed not work in simulation.

```
POST _ingest/pipeline/_simulate
{
  "pipeline" :
  {
    "description": "_description",
    "processors": [
      {
        "set": {
          "field": "foo2",
          "value": "bar2"
        }
      }
    ]
  },
  "docs": [
    {
      "_index": "prod-main-2019.01.31",
      "_type": "doc",
      "_id": "DOK-omgBXfHd0GoqVXXP",
      "_version": 1,
      "_score": null,
      "_source": {
        "foo": "bar"}
    }
  ]
}

```

the response is

```
{
  "error": {
    "root_cause": [
      {
        "type": "class_cast_exception",
        "reason": "class java.lang.Integer cannot be cast to class java.lang.Long (java.lang.Integer and java.lang.Long are in module java.base of loader 'bootstrap')"
      }
    ],
    "type": "class_cast_exception",
    "reason": "class java.lang.Integer cannot be cast to class java.lang.Long (java.lang.Integer and java.lang.Long are in module java.base of loader 'bootstrap')"
  },
  "status": 500
}

```

This problem might be caused by the field `"_version": 1,`, how I could solve it? Thanks!

---

<div class="post-metadata">

**Author:** ![yucheng](https://avatars.discourse-cdn.com/v4/letter/y/eada6e/32.png) [@yucheng](https://discuss.elastic.co/u/yucheng)\
**Post date:** [February 2, 2019, 2:14pm UTC](https://discuss.elastic.co/t/problem-with-ingest-node-pipeline-setup-java-lang-integer-cannot-be-cast-to-class-java-lang-long/166490/2 "2019-02-02T14:14:46Z")

</div>

pls kindly let me know if someone manage to get correct response of the pipeline simulation. thanks!

---

<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:** [March 2, 2019, 2:14pm UTC](https://discuss.elastic.co/t/problem-with-ingest-node-pipeline-setup-java-lang-integer-cannot-be-cast-to-class-java-lang-long/166490/3 "2019-03-02T14:14:52Z")

</div>

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