{"action":"created","issue":{"url":"https://api.github.com/repos/theangryangel/logstash-output-jdbc/issues/26","labels_url":"https://api.github.com/repos/theangryangel/logstash-output-jdbc/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/theangryangel/logstash-output-jdbc/issues/26/comments","events_url":"https://api.github.com/repos/theangryangel/logstash-output-jdbc/issues/26/events","html_url":"https://github.com/theangryangel/logstash-output-jdbc/issues/26","id":123234194,"number":26,"title":"How to get the error message in the backtrace?","user":{"login":"onesuper","id":977633,"avatar_url":"https://avatars.githubusercontent.com/u/977633?v=3","gravatar_id":"","url":"https://api.github.com/users/onesuper","html_url":"https://github.com/onesuper","followers_url":"https://api.github.com/users/onesuper/followers","following_url":"https://api.github.com/users/onesuper/following{/other_user}","gists_url":"https://api.github.com/users/onesuper/gists{/gist_id}","starred_url":"https://api.github.com/users/onesuper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onesuper/subscriptions","organizations_url":"https://api.github.com/users/onesuper/orgs","repos_url":"https://api.github.com/users/onesuper/repos","events_url":"https://api.github.com/users/onesuper/events{/privacy}","received_events_url":"https://api.github.com/users/onesuper/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-21T08:49:38Z","updated_at":"2015-12-21T09:44:06Z","closed_at":null,"body":"Hi,\r\n\r\nNow I have to dig into the source code of hikari to see what kind of error it is.\r\n\r\nAny ideas? Thank you!\r\n\r\nThe backtrace I got looks like: (only said that it is a \"Java::JavaLang::RuntimeException\")\r\n\r\n\r\n```\r\nFailed to flush outgoing items {:outgoing_count=>10, :exception=>\"Java::JavaLang::RuntimeException\", :backtrace=>[\"com.zaxxer.hikari.util.DriverDataSource.<init>(com/zaxxer/hikari/util/DriverDataSource.java:88)\", \"com.zaxxer.hikari.pool.PoolBase.initializeDataSource(com/zaxxer/hikari/pool/PoolBase.java:296)\", \"com.zaxxer.hikari.pool.PoolBase.<init>(com/zaxxer/hikari/pool/PoolBase.java:84)\", \"com.zaxxer.hikari.pool.HikariPool.<init>(com/zaxxer/hikari/pool/HikariPool.java:103)\", \"com.zaxxer.hikari.HikariDataSource.getConnection(com/zaxxer/hikari/HikariDataSource.java:94)\", \"java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:497)\", \"RUBY.safe_flush(/Users/yichao/odps/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/logstash-output-jdbc-0.2.1/lib/logstash/outputs/jdbc.rb:168)\", \"RUBY.flush(/Users/yichao/odps/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/logstash-output-jdbc-0.2.1/lib/logstash/outputs/jdbc.rb:116)\", \"RUBY.buffer_flush(/Users/yichao/odps/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/stud-0.0.22/lib/stud/buffer.rb:219)\", \"org.jruby.RubyHash.each(org/jruby/RubyHash.java:1342)\", \"RUBY.buffer_flush(/Users/yichao/odps/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/stud-0.0.22/lib/stud/buffer.rb:216)\", \"RUBY.buffer_receive(/Users/yichao/odps/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/stud-0.0.22/lib/stud/buffer.rb:159)\", \"RUBY.receive(/Users/yichao/odps/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/logstash-output-jdbc-0.2.1/lib/logstash/outputs/jdbc.rb:109)\", \"RUBY.handle(/Users/yichao/odps/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/logstash-core-2.1.1-java/lib/logstash/outputs/base.rb:81)\", \"RUBY.output_func((eval):27)\", \"RUBY.outputworker(/Users/yichao/odps/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/logstash-core-2.1.1-java/lib/logstash/pipeline.rb:277)\", \"RUBY.start_outputs(/Users/yichao/odps/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/logstash-core-2.1.1-java/lib/logstash/pipeline.rb:194)\", \"java.lang.Thread.run(java/lang/Thread.java:745)\"], :level=>:warn}\r\n```"},"comment":{"url":"https://api.github.com/repos/theangryangel/logstash-output-jdbc/issues/comments/166251303","html_url":"https://github.com/theangryangel/logstash-output-jdbc/issues/26#issuecomment-166251303","issue_url":"https://api.github.com/repos/theangryangel/logstash-output-jdbc/issues/26","id":166251303,"user":{"login":"onesuper","id":977633,"avatar_url":"https://avatars.githubusercontent.com/u/977633?v=3","gravatar_id":"","url":"https://api.github.com/users/onesuper","html_url":"https://github.com/onesuper","followers_url":"https://api.github.com/users/onesuper/followers","following_url":"https://api.github.com/users/onesuper/following{/other_user}","gists_url":"https://api.github.com/users/onesuper/gists{/gist_id}","starred_url":"https://api.github.com/users/onesuper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onesuper/subscriptions","organizations_url":"https://api.github.com/users/onesuper/orgs","repos_url":"https://api.github.com/users/onesuper/repos","events_url":"https://api.github.com/users/onesuper/events{/privacy}","received_events_url":"https://api.github.com/users/onesuper/received_events","type":"User","site_admin":false},"created_at":"2015-12-21T09:44:06Z","updated_at":"2015-12-21T09:44:06Z","body":"I guess  capturing the exception of `pool.getConnection()` as early as possible will make it clearer.\r\n\r\n```\r\n    begin\r\n      connection = @pool.getConnection()\r\n    rescue => e\r\n      @logger.error(\"Get connection error: \", :exception => e)\r\n    end   \r\n```"}}