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

sqlline should give an error message and not throw a NPE #55

Closed
khurram-faraaz opened this issue Feb 9, 2017 · 1 comment
Closed

sqlline should give an error message and not throw a NPE #55

khurram-faraaz opened this issue Feb 9, 2017 · 1 comment

Comments

@khurram-faraaz
Copy link

Use of -u instead of -n option to sqlline results in a NPE, sqlline should report an error and not throw a NPE.

{noformat}
[root@centos-01 ~]# cd /opt/mapr/drill/drill-1.10.0/bin
[root@centos-01 bin]# ./sqlline -u "jdbc:drill:schema=dfs.tmp;drillbit=10.10.100.201" -u mapr -p mapr
...
...
No known driver to handle "mapr". Searching for known drivers...
java.lang.NullPointerException
apache drill 1.10.0-SNAPSHOT
"what ever the mind of man can conceive and believe, drill can query"
0: mapr> !q
No known driver to handle "mapr". Searching for known drivers...
java.lang.NullPointerException
at sqlline.DatabaseConnection.connect(DatabaseConnection.java:167)
at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:213)
at sqlline.Commands.close(Commands.java:925)
at sqlline.Commands.quit(Commands.java:889)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:36)
at sqlline.SqlLine.dispatch(SqlLine.java:742)
at sqlline.SqlLine.begin(SqlLine.java:621)
at sqlline.SqlLine.start(SqlLine.java:375)
at sqlline.SqlLine.main(SqlLine.java:268)
No known driver to handle "mapr". Searching for known drivers...
java.lang.NullPointerException
at sqlline.DatabaseConnection.connect(DatabaseConnection.java:167)
at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:213)
at sqlline.Commands.close(Commands.java:925)
at sqlline.Commands.closeall(Commands.java:899)
at sqlline.SqlLine.begin(SqlLine.java:649)
at sqlline.SqlLine.start(SqlLine.java:375)
at sqlline.SqlLine.main(SqlLine.java:268)

{noformat}

@julianhyde
Copy link
Owner

Fixed in 0b0be19, PR #116. Thanks @arina-ielchiieva!

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

No branches or pull requests

2 participants