George-Ha / starschema-bigquery-jdbc

Automatically exported from code.google.com/p/starschema-bigquery-jdbc
0 stars 0 forks source link

"No suitable driver found" when using "elasticsearch-jdbc-river" #15

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Install Elasticsearch
2. Install JBDC River https://github.com/jprante/elasticsearch-river-jdbc
3. Add BigQuery JDBC driver and chmod 0644
4. PUT the json below to elasticsearch to create connection.

EX: PUT
curl -XPUT 'localhost:9200/_river/my_logs/_meta' -d @example.json

{
  "type" : "jdbc",
  "strategy" : "simple",
  "fetchsize": 1000,
  "schedule": "0 0-59 0-23 ? * *",
  "jdbc" : {
    "max_retries": 5,
    "url" : "jdbc:BQDriver:my-logs",
    "user" : "your user",
    "password" : "your password",
    "sql" : "SELECT * FROM [prod_logs.request] LIMIT 1000",
    "index" : "bigquery",
    "type" : "logs"
  }
}

java.sql.SQLException: No suitable driver found for 
jdbc:BQDriver:my-logs?withServiceAccount=true
    at java.sql.DriverManager.getConnection(DriverManager.java:596)
    at java.sql.DriverManager.getConnection(DriverManager.java:187)
    at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverSource.getConnectionForReading(SimpleRiverSource.java:220)
    at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverSource.execute(SimpleRiverSource.java:388)
    at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverSource.fetch(SimpleRiverSource.java:332)
    at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow.fetch(SimpleRiverFlow.java:220)
    at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow.execute(SimpleRiverFlow.java:149)
    at org.xbib.elasticsearch.plugin.jdbc.RiverPipeline.request(RiverPipeline.java:88)
    at org.xbib.elasticsearch.plugin.jdbc.RiverPipeline.call(RiverPipeline.java:66)
    at org.xbib.elasticsearch.plugin.jdbc.RiverPipeline.call(RiverPipeline.java:30)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

What is the expected output? What do you see instead?

The JBDC river should sync data using the query i provide it. I should then be 
able to search/filter my logs. Instead It is rejecting the driver. I've 
successfully connected this plugin to potsgres and mysql but not to bigquery

What version of the product are you using? On what operating system?

this is being run on vagrant "hashicorp/precise64"

Please provide any additional information below.

Original issue reported on code.google.com by s...@adsnative.com on 26 Feb 2015 at 10:47

GoogleCodeExporter commented 8 years ago
This may have something to do with it. Im not sure if this is JDBC 4
https://github.com/jprante/elasticsearch-river-jdbc/issues/423

Original comment by s...@adsnative.com on 26 Feb 2015 at 11:08

GoogleCodeExporter commented 8 years ago
I tried adding the java.sql.Driver META-INF with no luck. It still throws a No 
suitable driver found exception.

These are the two file locations i tried.

src/main/META-INF/services/java.sql.Driver file
src/main/resources/META-INF/services/java.sql.Driver file

File Contains this single line:
net.net.starschema.clouddb.jdbc.BQDriver

Original comment by s...@adsnative.com on 3 Mar 2015 at 9:29

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Tried both file locations with (one net.)

net.starschema.clouddb.jdbc.BQDriver

Still did not work.

Original comment by s...@adsnative.com on 3 Mar 2015 at 9:41