Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

global cached lookups / java.sql.SQLException: No suitable driver found for jdbc #3770

Closed
grocon opened this issue Dec 12, 2016 · 5 comments
Closed

Comments

@grocon
Copy link

grocon commented Dec 12, 2016

Hello,
as described on https://groups.google.com/forum/#!topic/druid-user/c0iQVkDFToE , I had a problem with druid (0.9.2) not loading lookups from a mysql database.

org.skife.jdbi.v2.exceptions.UnableToObtainConnectionException: java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/xxxxxxx
        at org.skife.jdbi.v2.DBI.open(DBI.java:230) ~[jdbi-2.63.1.jar:2.63.1]
        at org.skife.jdbi.v2.DBI.withHandle(DBI.java:279) ~[jdbi-2.63.1.jar:2.63.1]
        at io.druid.server.lookup.namespace.JDBCExtractionNamespaceCacheFactory$2.call(JDBCExtractionNamespaceCacheFactory.java:84) ~[druid-lookups-cached-global-0.9.2.jar:0.9.2]
        at io.druid.server.lookup.namespace.JDBCExtractionNamespaceCacheFactory$2.call(JDBCExtractionNamespaceCacheFactory.java:73) ~[druid-lookups-cached-global-0.9.2.jar:0.9.2]
        at io.druid.server.lookup.namespace.cache.NamespaceExtractionCacheManager$3.run(NamespaceExtractionCacheManager.java:362) [druid-lookups-cached-global-0.9.2.jar:0.9.2]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [?:1.7.0_111]
        at java.util.concurrent.FutureTask.run(FutureTask.java:262) [?:1.7.0_111]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [?:1.7.0_111]
        at java.util.concurrent.FutureTask.run(FutureTask.java:262) [?:1.7.0_111]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [?:1.7.0_111]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [?:1.7.0_111]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_111]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0_111]
        at java.lang.Thread.run(Thread.java:745) [?:1.7.0_111]
Caused by: java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/xxxxxxx
        at java.sql.DriverManager.getConnection(DriverManager.java:596) ~[?:1.7.0_111]
        at java.sql.DriverManager.getConnection(DriverManager.java:215) ~[?:1.7.0_111]
        at org.skife.jdbi.v2.DBI$3.openConnection(DBI.java:140) ~[jdbi-2.63.1.jar:2.63.1]
        at org.skife.jdbi.v2.DBI.open(DBI.java:212) ~[jdbi-2.63.1.jar:2.63.1]
        ... 13 more

as a temporary fix, I copied mysql-connector-java-5.1.38.jar from the mysql-metadata-storage extension to lib directory.

@drcrallen drcrallen added the Bug label Dec 12, 2016
@drcrallen
Copy link
Contributor

Related to #2345

If adding the SQL driver jars to the application classpath fixes things, then the documentation should be updated to reflect this until a "proper" fix is in place.

@Igosuki
Copy link
Contributor

Igosuki commented Jan 19, 2017

I personnally fixed the issue with postgres here.
Igosuki@7435372

I haven't tested it, but I bet I could remove the manual driver registration and simply implement the connection factory in the main thread.

@chirpy2291
Copy link

Please update the documentation for lookups:regarding jdbc lookups!It would help others :)

donbowman added a commit to Agilicus/incubator-druid that referenced this issue Feb 7, 2019
This works around issue apache#3770
apache#3770

Signed-off-by: Don Bowman <don@agilicus.com>
dylwylie pushed a commit that referenced this issue Feb 8, 2019
* Add docker container for druid

This container is an 'omnibus' (since there is such a high
overlap with the various services). It includes all contrib
extension as well as the msql connector.

It is intended to be run as `docker run NAME SERVICE`
(e.g. docker run druid:latest broker)

* Add Apache license header

* Resolve issues from Pull Request review

* Add comments at top of script per PR comments

* Revert BUILDKIT. Not available everywhere.

* Don't set hostname, allow default (IP)

Some environments (e.g. Kubernetes Deployments) don't resolve
hostname to IP.

* Switch to amd64 glibc-based busybox from 32-bit uclibc

* Override service-specific configuration

* Replace MAINTAINER w/ LABEL

* Add mysql connector to application classpath

This works around issue #3770
#3770

* Add docker-compose and sample environment

Signed-off-by: Don Bowman <don@agilicus.com>
donbowman added a commit to Agilicus/incubator-druid that referenced this issue Mar 16, 2019
This works around issue apache#3770
apache#3770

Signed-off-by: Don Bowman <don@agilicus.com>
@github-actions
Copy link

This issue has been marked as stale due to 280 days of inactivity.
It will be closed in 4 weeks if no further activity occurs. If this issue is still
relevant, please simply write any comment. Even if closed, you can still revive the
issue at any time or discuss it on the dev@druid.apache.org list.
Thank you for your contributions.

@github-actions github-actions bot added the stale label May 30, 2023
@github-actions
Copy link

This issue has been closed due to lack of activity. If you think that
is incorrect, or the issue requires additional review, you can revive the issue at
any time.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants