Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Drill >> mail # dev >> RE: [OS: Windows] Could not find or load main class sqlline.SqlLine


Copy link to this message
-
RE: [OS: Windows] Could not find or load main class sqlline.SqlLine

Progress so far-------------------Looks like apache-rat-plugin didn't like me logging the content to log.txt under incubator-drill.  Once I instructed mvn to log the output outside the folder, the build got completed without any error.
 
Open issue---------------The sqlline.bat looks as follows:if not exist contrib\sqlline\target (
    cd contrib\sqlline
    mvn package
    cd ..\..
)java -Xmx1G -Dlogback.configurationFile=.\sqlparser\src\test\resources\logback.xml -jar contrib\sqlline\target\drill-sqlline-1.0.0-m2-incubating-SNAPSHOT.jar --verbose=true
The updated pom.xml has been attached.  In the pom.xml I have included maven-jar-plugin to add Manifest entries for Classpath and Main-Class.  I have attached the MANIFEST.MF as well for reference.  As per jar spec, maven breaks the classpath at 72 and the continuation starts with a single space.  I have checked that all the files specified in the classpath is available in my local repository.   The problem I am facing is that java is not able to find sqlline.SqlLine class from the classpath.   D:\workspace\incubator-drill>java -Xmx1G -Dlogback.configurationFile=.\sqlparser\src\test\resources\logback.xml -jar contrib\sqlline\target\drill-sqlline-1.0.0-m2-incubating-SNAPSHOT.jar --verbose=true
Error: Could not find or load main class sqlline.SqlLine For now I have ignored passing the command line parameter.  But that is not related to the problem at hand.   This SO answer suggests the command be included in the back quotes, if the command is not executed from the directory containing the jar, but Windows doesn't support command substitution.   And this SO answer suggests to downgrade the maven version to 2.3.2 and change classpath configuration so that each jar path starts in a new line.  Since I am not manually adding the classpath, I am not sure how to implement this suggestion. Would you please let me know your thoughts on this?  I appreciate any help on this.
Regards,
Ravi
 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: [OS: Windows] Could not find or load main class sqlline.SqlLine
Date: Sat, 28 Dec 2013 15:33:44 +0530
Some more information to troubleshoot the problem.  If I execute "mvn clean install -DskipTests", I am getting the output given at the bottom of this email, which indicates success.  On the other hand if I try to log the output into file, I am getting an error.  I am attaching the log file for reference.
 
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ distribution ---
[INFO] Installing D:\workspace\incubator-drill\distribution\pom.xml to C:\Users\ravisankars\.m2\repository\org\apache\drill\distribution\1.0.0-m2-incubating-SNA
PSHOT\distribution-1.0.0-m2-incubating-SNAPSHOT.pom
[INFO] Installing D:\workspace\incubator-drill\distribution\target\apache-drill-1.0.0-m2-incubating-SNAPSHOT-binary-release.tar.gz to C:\Users\ravisankars\.m2\r
epository\org\apache\drill\distribution\1.0.0-m2-incubating-SNAPSHOT\distribution-1.0.0-m2-incubating-SNAPSHOT-binary-release.tar.gz
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Drill Root POM ............................. SUCCESS [2.047s]
[INFO] Drill Protocol .................................... SUCCESS [3.090s]
[INFO] Common (Logical Plan, Base expressions) ........... SUCCESS [2.753s]
[INFO] contrib/Parent Pom ................................ SUCCESS [0.165s]
[INFO] contrib/hbase-storage-engine ...................... SUCCESS [0.247s]
[INFO] exec/Parent Pom ................................... SUCCESS [0.179s]
[INFO] exec/Reference Interpreter ........................ SUCCESS [1.677s]
[INFO] exec/Netty Little Endian Buffers .................. SUCCESS [0.383s]
[INFO] exec/Java Execution Engine ........................ SUCCESS [12.188s]
[INFO] SQL Parser ........................................ SUCCESS [1.703s]
[INFO] contrib/sqlline ................................... SUCCESS [1.897s]
[INFO] Packaging and Distribution Assembly ............... SUCCESS [56.521s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:23.110s
[INFO] Finished at: Sat Dec 28 15:29:55 IST 2013
[INFO] Final Memory: 52M/168M
[INFO] ------------------------------------------------------------------------
D:\workspace\incubator-drill>
 
Regards,
Ravi
 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: [OS: Windows] Could not find or load main class sqlline.SqlLine
Date: Sat, 28 Dec 2013 14:38:13 +0530
Hello Team,
 
I resolved the below error by reducing the heap memory.  I am not getting the following error?
 
D:\workspace\incubator-drill>java -Xmx1G -Dlogback.configurationFile=.\sqlparser\src\test\resources\logback.xml -cp contrib\sqlline\target\drill-sqlline-1.0.0-m2-incubating-SNAPSHOT.jar sqlline.SqlLine --verbose=true "$@"
Error: Could not find or load main class sqlline.SqlLine

 
I am not able to identify what I am doing wrong.  As per the unix script, an sqlline jar is supposed to be available in incubator-drill folder but mine doesn't have it.  Did I not checkout the folder correctly or did I miss a compilation step?
 
Regards,
Ravi
 
         
     
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB