# Logstash-filter-jdbc\_streaming -- parameter issue calling stored procedure (MSSQL)

**URL:** <https://discuss.elastic.co/t/logstash-filter-jdbc-streaming-parameter-issue-calling-stored-procedure-mssql/209085>\
**Category:** Logstash\
**Created:** [November 22, 2019, 3:59pm UTC](https://discuss.elastic.co/t/logstash-filter-jdbc-streaming-parameter-issue-calling-stored-procedure-mssql/209085 "2019-11-22T15:59:09Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Chris\_Lyons](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chris_lyons/32/48107_2.png) [@Chris\_Lyons](https://discuss.elastic.co/u/Chris_Lyons)\
**Post date:** [November 23, 2019, 6:41pm UTC](https://discuss.elastic.co/t/logstash-filter-jdbc-streaming-parameter-issue-calling-stored-procedure-mssql/209085/2 "2019-11-23T18:41:11Z")

</div>

Alright so....a new day a fresh set of eyes 🙂

Turns out that this error message seems to be benign. I tried to determine why the exception was being thrown but I had to move on.

```
Exception when executing JDBC query {:exception=>#<Sequel::DatabaseError: Java::ComMicrosoftSqlserverJdbc::SQLServerException: Invalid length parameter passed to the LEFT or SUBSTRING function.>}

```

Yesterday as I was troubleshooting, our database was having performance issues so the stored procedure was taking a much longer time to execute. Had I waited 5 minutes I could have determined this and moved on to the next issue ☹

**The Real Problem:**  
Once the jdbc query is executed and the results are returned to logstash I receive the following error message and the pipeline stops processing.

```
Exception in pipelineworker, the pipeline stopped processing new events, please check your filter configuration and restart Logstash. 

     {
         :pipeline_id=>"dev_inference", 
         "exception"=>"Missing Converter handling for full class name=org.jruby.RubyObjectVar3, simple name=RubyObjectVar3", 
         "backtrace"=>[
            "org.logstash.Valuefier.fallbackConvert(Valuefier.java:97)", 
            "org.logstash.Valuefier.convert(Valuefier.java:75)", ....
            <could not post entire stack>
        ], 
        :thread=>"#<Thread:0x508dd494@/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:157 sleep>"
    } 

```

A little googling on

> Missing Converter handling for full class name=org.jruby.RubyObjectVar3

Lead me to an old discussion topic: [https://discuss.elastic.co/t/problem-with-timestamp-and-timezone/148622](https://discuss.elastic.co/t/problem-with-timestamp-and-timezone/148622)

Which resulted in an issue being logged for the logstash-input-jdbc plugin:  
[https://github.com/logstash-plugins/logstash-input-jdbc/issues/302](https://github.com/logstash-plugins/logstash-input-jdbc/issues/302)

Which lead me to guyboertje's comment pointing back to the logstash-filter-jdbc\_streaming plugin: [Problem with data enrichment using jdbc\_default\_timezone and fields of type "timestamp" · Issue #302 · logstash-plugins/logstash-input-jdbc · GitHub](https://github.com/logstash-plugins/logstash-input-jdbc/issues/302#issuecomment-434327517)

Given the conversation it seemed like this was a type issue, where one of my MSSQL types was not playing well with whatever this internal JRuby class ( **org.jruby.RubyObjectVar3** ) is doing. Going through some process of elimination I found the culprit. I had a single [date](https://docs.microsoft.com/en-us/sql/t-sql/data-types/date-transact-sql?view=sql-server-ver15) type field being leveraged to remove the time value as it was not needed. All I had to do was cast this date type into our standard [datetime2](https://docs.microsoft.com/en-us/sql/t-sql/data-types/datetime2-transact-sql?view=sql-server-ver15) type and everything was right with the world.

I am not sure if upgrading to a newer version of LS would solve this problem but currently that's not an option for me. Wanted to make sure this issue was documented in case someone else runs into it in the future.

Thanks!

---

_[View the full topic](https://discuss.elastic.co/t/logstash-filter-jdbc-streaming-parameter-issue-calling-stored-procedure-mssql/209085)._
