Closed lucacerone closed 6 years ago
Your tests were successful. I just downloaded the 1.3 tar file and did mvn package
and got the same results. Note that it says Tests run: 25, Failures: 0, Errors: 0, Skipped: 1
, that is, no test errors or failures.
Sorry the output looks a bit scary; we are executing negative tests, to make sure that sqlline does the right thing even if it can't connect to the database.
I get the same problem with the sqlline
command. I edited it as follows:
BINPATH=$(dirname $0)
exec java -cp $BINPATH/../target/sqlline-1.3.0-jar-with-dependencies.jar sqlline.SqlLine "$@"
and it worked (except that it printed "??" as the version).
Most projects that use sqlline have a launcher script that pull in sqlline and other dependencies via maven; see e.g. https://github.com/apache/calcite/blob/master/sqlline.
Thanks a lot for your answer Julian!
I understood the part regarding the tests, I am sorry not to have figured it myself.
About sqlline, if I understood correctly I have to modify the script then? What about the drivers? Does sqlline always have to be in the same directory with the tars of a JDBC driver? or I can pass somehow the directory where they are stores? or should I make sure the CLASSPATH variables contains the directory where JDBC drivers are stored?
Thanks again for your help with this!
Yes, you need to modify the script. This is typical for Java programs. Put the drivers after the -cp
argument in the command, separated by colons (or semi-colons on windows). Or you can put them in the CLASSPATH variable, but most people prefer the -cp
argument these days.
Many thanks @julianhyde !
Fixed in 2b403a6; thanks for the PR, @snuyanzin!
Your tests were successful. I just downloaded the 1.3 tar file and did
mvn package
and got the same results. Note that it saysTests run: 25, Failures: 0, Errors: 0, Skipped: 1
, that is, no test errors or failures.Sorry the output looks a bit scary; we are executing negative tests, to make sure that sqlline does the right thing even if it can't connect to the database.
I get the same problem with the
sqlline
command. I edited it as follows:BINPATH=$(dirname $0) exec java -cp $BINPATH/../target/sqlline-1.3.0-jar-with-dependencies.jar sqlline.SqlLine "$@"
and it worked (except that it printed "??" as the version).
Most projects that use sqlline have a launcher script that pull in sqlline and other dependencies via maven; see e.g. https://github.com/apache/calcite/blob/master/sqlline.
Where can I make these changes??
if you use sqlline 1.5.0+ then all changes are already there and you can use scripts bin/sqlline
, bin\sqlline.bat
. Otherwise you could make changes in these scripts or in a script you use to run sqlline
Yes, I have these scripts. But should I simply add those 2 lines of code?
you can just simply update them in a way it was done in PR #100 (direct link to file diff https://github.com/julianhyde/sqlline/pull/100/files).
Here is the code of sqlline.bat file: https://codeshare.io/5OoeBg And here of sqlline file: https://codeshare.io/5QqdQW
I don't know where I can add those modifications.
it looks like you use Drill's customizations of these files (https://github.com/apache/drill/blob/e9c7f51e8a6b4c4be95fc3aef05b89596414e98d/distribution/src/resources/sqlline). It is better to ask people from Drill in that case. Could you please raise an a question in Drill's jira https://issues.apache.org/jira/projects/DRILL ?
cc @arina-ielchiieva , @vvysotskyi
Hi, this is probably a mistake on my side but I couldn't understand how to install/run properly sqlline I fear.
I downloaded the source zip file for the 1.3.0 release. I unzipped it in a folder and from a terminal and within the sqlline folder I run:
Some of the tests failed, but I can't understand why:
Despite the failure I tried to go in the bin directory and run
which produced the error
I also tried to not build the package and run the sqlline executable that comes in the bin folder.
Could you please help me to figure out what I am doing wrong? Could it be because there is no jdbc driver in the folder? if that's the problem, I have several JDBC drivers already installed in some directory, is there any way I can make them "visible" to sqlline regardless of the directory where I am running sqlline?
Thanks for the help and apologies for the silly questions. Luca