# Jdbc error : NoMethodError: undefined method \`message=' for #\<Java

**URL:** <https://discuss.elastic.co/t/jdbc-error-nomethoderror-undefined-method-message-for-java/67606>\
**Category:** Logstash\
**Created:** [November 30, 2016, 11:37am UTC](https://discuss.elastic.co/t/jdbc-error-nomethoderror-undefined-method-message-for-java/67606 "2016-11-30T11:37:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gilisade](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gilisade/32/98740_2.png) [@gilisade](https://discuss.elastic.co/u/gilisade)\
**Post date:** [November 30, 2016, 11:37am UTC](https://discuss.elastic.co/t/jdbc-error-nomethoderror-undefined-method-message-for-java/67606/1 "2016-11-30T11:37:46Z")

</div>

Hi there  
running Logstash 5.0.1  
ruby version: 2.0.0p598 (2014-11-13) [x86\_64-linux]

trying to extract data from a MSSQL server with the following config:

```
    jdbc {
            jdbc_driver_library => /path/to/sqljdbc42.jar"
            jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
            jdbc_connection_string => "jdbc:sqlserver://DBSRV:1433"
            jdbc_user => "user"
            jdbc_password => "pass"
            type => "type"
            schedule => "* * * * *"
            statement => "SELECT * FROM [DB].[SCHEMA].[TABLE]"
          }

```

and getting the following error:

[[main]-pipeline-manager] ERROR logstash.agent - Pipeline aborted due to error {:exception=\>#\<Sequel::DatabaseConnectionError: NoMethodError: undefined method `message=' for #<Java::ComMicrosoftSqlserverJdbc::SQLServerException:0x62dd3df9>>, :backtrace=>["/usr/share/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.40.0/lib/sequel/adapters/jdbc.rb:227:in`connect'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.40.0/lib/sequel/connection\_pool.rb:116:in `make_new'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.40.0/lib/sequel/connection_pool/threaded.rb:228:in`make\_new'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.40.0/lib/sequel/connection\_pool/threaded.rb:201:in `available'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.40.0/lib/sequel/connection_pool/threaded.rb:137:in`\_acquire'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.40.0/lib/sequel/connection\_pool/threaded.rb:151:in `acquire'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.40.0/lib/sequel/connection_pool/threaded.rb:282:in`sync'", "org/jruby/ext/thread/Mutex.java:149:in `synchronize'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.40.0/lib/sequel/connection_pool/threaded.rb:282:in`sync'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.40.0/lib/sequel/connection\_pool/threaded.rb:150:in `acquire'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.40.0/lib/sequel/connection_pool/threaded.rb:106:in`hold'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.40.0/lib/sequel/database/connecting.rb:285:in `synchronize'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/sequel-4.40.0/lib/sequel/database/connecting.rb:295:in`test\_connection'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-4.1.3/lib/logstash/plugin\_mixins/jdbc.rb:171:in `prepare_jdbc_connection'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-4.1.3/lib/logstash/inputs/jdbc.rb:191:in`register'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:319:in `start_inputs'", "org/jruby/RubyArray.java:1613:in`each'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:318:in `start_inputs'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:195:in`start\_workers'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:153:in `run'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:250:in`start\_pipeline'"]}

any idea?

---

<div class="post-metadata">

**Author:** ![gilisade](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gilisade/32/98740_2.png) [@gilisade](https://discuss.elastic.co/u/gilisade)\
**Post date:** [December 4, 2016, 11:22am UTC](https://discuss.elastic.co/t/jdbc-error-nomethoderror-undefined-method-message-for-java/67606/2 "2016-12-04T11:22:04Z")

</div>

HI an UPDATE  
apparently the problem was that the user i used did not exist in this DB  
so after creating the user everything worked just fine  
BTW it had to be an "sql authentication" user

---

<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 1, 2017, 11:22am UTC](https://discuss.elastic.co/t/jdbc-error-nomethoderror-undefined-method-message-for-java/67606/3 "2017-01-01T11:22:13Z")

</div>

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