lucidworks / hive-solr

Code to index Hive tables to Solr and Solr indexes to Hive
Apache License 2.0
47 stars 34 forks source link

Not able to Build the Jar using Java 1.7 #34

Open sandeepkt opened 7 years ago

sandeepkt commented 7 years ago

My cluster is build on Java 1.7 after exporting the JAVA HOME i am not able to build the jar file failing with below exception Please let me know if it is compatible with Java 1.7

Error: Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':solr-hadoop-common:solr-hadoop-io:compileJava'.] from daemon DaemonInfo{pid=10063, address=[c6420d07-8233-4272-9515-ea571d8e1e75 port:40778, addresses:[/127.0.0.1]], idle=false, lastBusy=1501864598134, context=DefaultDaemonContext[uid=d6b0e1b2-e9d5-4ade-bae6-64c2c1c46f0b,javaHome=/local/java/jdk1.7.0_80,daemonRegistryDir=/home/admin_toopras/.gradle/daemon,pid=10063,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be done). hive-solr.txt

acesar commented 7 years ago

To compile with java 1.7, please use the following commit: https://github.com/lucidworks/hive-solr/commit/f39cd7b0d5ba02cb0e06f4230d21c0d2a83cc346

hive-solr in master was updated to Solr 6.x and it now only works with java 1.8

sandeepkt commented 7 years ago

Thanks for the reply. I have used the f39cd7b0d5 commit and build but still failing with Java compatible issue. Using java jdk1.7.0_80.

Error: :solr-hadoop-common:solr-hadoop-io:compileJava FAILED :solr-hadoop-common:solr-hadoop-io:compileJava (Thread[Daemon worker Thread 3,5,main]) completed. Took 0.433 secs.

FAILURE: Build failed with an exception.

acesar commented 7 years ago

The problem is with the submodule. You need to change it too. use this commit for the solr-hadoop-common https://github.com/lucidworks/solr-hadoop-common/commit/b484c84223d769a1231d091bf44056794bf65439

sandeepkt commented 7 years ago

Thanks, once again, But Still failing with same exception. For main project i used f39cd7b For hadoop-common i used b484c84

Error: 4 errors 44 warnings :solr-hadoop-common:solr-hadoop-io:compileJava FAILED :solr-hadoop-common:solr-hadoop-io:compileJava (Thread[Daemon worker,5,main]) completed. Took 39.18 secs.

FAILURE: Build failed with an exception.

sandeepkt commented 7 years ago

More information 👍 Error: Download https://jcenter.bintray.com/commons-codec/commons-codec/1.9/commons-codec-1.9.jar Executing task ':solr-hadoop-common:solr-hadoop-io:compileJava' (up-to-date check took 37.968 secs) due to: No history is available. All input files are considered out-of-date for incremental task ':solr-hadoop-common:solr-hadoop-io:compileJava'. Compiling with JDK Java compiler API. warning: /root/.gradle/caches/modules-2/files-2.1/org.apache.solr/solr-solrj/6.5.0/ed4ca06c007898374506cf3b0a493ffd738336ae/solr-solrj-6.5.0.jar(org/apache/solr/common/SolrInputDocument.class): major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded.