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

revisit how JDBC drivers are loaded #5

Closed
julianhyde opened this issue May 15, 2013 · 8 comments
Closed

revisit how JDBC drivers are loaded #5

julianhyde opened this issue May 15, 2013 · 8 comments

Comments

@julianhyde
Copy link
Owner

Since JDK 1.5, Java automatically loads drivers whose jar contains a META-INF/services/java.sql.Driver. All drivers have this file these days. This task is to (a) check that this mechanism works for MySQL's driver, (b) recommend whether SqlLine.KNOWN_DRIVERS should be removed.

@jtaylor-sfdc
Copy link

Also, maybe publicize the -d option where you can specify your driver class - that came in handy for us.

@julianhyde
Copy link
Owner Author

Good point. I've added a simple example in the README. We'll also update the manual at some point.

Julian

@mauro-miatello
Copy link

i've tried
sqlline -d oracle.jdbc.OracleDriver
and
sqlline -d /usr/share/java/ojdbc.jar with no success
it's not clear how to load it
thanks

@snuyanzin
Copy link
Collaborator

@mmiat recently I faced with the similar issue and it looks like sqlline needs url info also otherwise it just silently does nothing.
so working example should be like

sqlline -u <url> -n <user> -d oracle.jdbc.OracleDriver

I added PR to show warning in case of absent url rather than silently do nothing #236

@julianhyde
Copy link
Owner Author

Partial fix in 95a1ffb, PR #236.

@julianhyde
Copy link
Owner Author

Fixed in b053ffe, PR #235.

@snuyanzin
Copy link
Collaborator

It looks like it could be closed as fixed
//cc @julianhyde

@julianhyde
Copy link
Owner Author

I agree, closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants