# Why do I get a variable this binding exception after upgrading to Logstash 2.2?

**URL:** <https://discuss.elastic.co/t/why-do-i-get-a-variable-this-binding-exception-after-upgrading-to-logstash-2-2/50875>\
**Category:** Logstash\
**Created:** [May 24, 2016, 6:33pm UTC](https://discuss.elastic.co/t/why-do-i-get-a-variable-this-binding-exception-after-upgrading-to-logstash-2-2/50875 "2016-05-24T18:33:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PhaedrusTheGreek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phaedrusthegreek/32/4884_2.png) [@PhaedrusTheGreek](https://discuss.elastic.co/u/PhaedrusTheGreek)\
**Post date:** [May 24, 2016, 6:33pm UTC](https://discuss.elastic.co/t/why-do-i-get-a-variable-this-binding-exception-after-upgrading-to-logstash-2-2/50875/1 "2016-05-24T18:33:12Z")

</div>

I make use of `sql_last_start` in my SQL statement, but after upgrading (or downgrading) Logstash, I get an exception.

statement =\> "SELECT \* FROM myTable where myDate \> :sql\_last\_value"

```auto
{:timestamp=>"2016-05-18T17:21:00.303000-0400", :message=>"Exception when executing JDBC query", :exception=>#<Sequel::DatabaseError: Java::JavaSql::SQLException: ORA-01008: not all variables bound >, :level=>:warn}

```

---

<div class="post-metadata">

**Author:** ![PhaedrusTheGreek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phaedrusthegreek/32/4884_2.png) [@PhaedrusTheGreek](https://discuss.elastic.co/u/PhaedrusTheGreek)\
**Post date:** [May 24, 2016, 6:34pm UTC](https://discuss.elastic.co/t/why-do-i-get-a-variable-this-binding-exception-after-upgrading-to-logstash-2-2/50875/2 "2016-05-24T18:34:26Z")

</div>

In Logstash 2.2, the `sql_last_start` variable was renamed to `sql_last_value`. Updating your configuration should fix the issue.

---

<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, 4:56am UTC](https://discuss.elastic.co/t/why-do-i-get-a-variable-this-binding-exception-after-upgrading-to-logstash-2-2/50875/3 "2017-07-06T04:56:25Z")

</div>

Closed on July 6, 2017, 4:56am UTC


