[ERROR] javac: invalid target release: 1.7

532 views
Skip to first unread message

ry...@c-k.com

unread,
Jul 30, 2015, 10:52:48 PM7/30/15
to Crossdata Users
I've tried installing using the following command:

sudo mvn clean install -DskipUTs -DskipITs


It will not complete the installation. I get the below error:


[ERROR] COMPILATION ERROR : 

[INFO] -------------------------------------------------------------

[ERROR] Failure executing javac, but could not parse the error:

javac: invalid target release: 1.7

Usage: javac <options> <source files>

use -help for a list of possible options


[INFO] 1 error

[INFO] -------------------------------------------------------------

[INFO] ------------------------------------------------------------------------

[INFO] Reactor Summary:

[INFO] 

[INFO] Stratio Crossdata ................................. SUCCESS [1.623s]

[INFO] Stratio Crossdata common .......................... FAILURE [10.157s]

[INFO] Stratio Crossdata core ............................ SKIPPED

[INFO] Stratio Crossdata connector ....................... SKIPPED

[INFO] Stratio Crossdata server .......................... SKIPPED

[INFO] Stratio Crossdata connector maven plugins ......... SKIPPED

[INFO] Stratio Crossdata InMemory connector .............. SKIPPED

[INFO] Stratio Crossdata driver .......................... SKIPPED

[INFO] Stratio Crossdata shell ........................... SKIPPED

[INFO] Stratio Crossdata distribution .................... SKIPPED

[INFO] Stratio Crossdata Client examples ................. SKIPPED

[INFO] Stratio Crossdata Twitter connector ............... SKIPPED

[INFO] Stratio Crossdata Documentation ................... SKIPPED

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 12.059s

[INFO] Finished at: Thu Jul 30 21:50:08 CDT 2015

[INFO] Final Memory: 14M/81M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project crossdata-common: Compilation failure

[ERROR] Failure executing javac, but could not parse the error:

[ERROR] javac: invalid target release: 1.7

[ERROR] Usage: javac <options> <source files>

[ERROR] use -help for a list of possible options

[ERROR] -> [Help 1]

[ERROR] 

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR] 

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

[ERROR] 

[ERROR] After correcting the problems, you can resume the build with the command

[ERROR]   mvn <goals> -rf :crossdata-common


Any idea what I can do to fix this?


Thanks!

Miguel Angel Fernandez

unread,
Jul 31, 2015, 2:18:55 AM7/31/15
to Crossdata Users, ry...@c-k.com
Hi,

what Operating System are you using? It looks like Java version 1.7 is not installed in your system. Please, check your Java version by typing "java -version".


ry...@c-k.com

unread,
Jul 31, 2015, 7:35:33 AM7/31/15
to Crossdata Users, ry...@c-k.com, mafer...@stratio.com
I'm on Mac OS X, Yosemite. You're right, I don't have Java 1.7, I'm on 1.8. Is it possible to use with 1.8? When I tried to install 1.7, It would not let me because I'm on 1.8. I'm not sure if there's away to have both. 

Miguel Angel Fernandez

unread,
Jul 31, 2015, 7:57:14 AM7/31/15
to Crossdata Users, ry...@c-k.com, mafer...@stratio.com
Even if you have the version 1.8 installed, it should work. It might be a problem with the JAVA_HOME, could you please check if this variable is set up by typing "echo $JAVA_HOME" as root user?

ry...@c-k.com

unread,
Jul 31, 2015, 8:04:18 AM7/31/15
to Crossdata Users, ry...@c-k.com, mafer...@stratio.com
I was able to get 1.7 install. It still didn't work. I've got JAVA_HOME set to /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home.

Also, when I run mvn clean install -DskipUTs -DskipITswhich without sudo, it stops earlier, and gives me the following error:

[INFO] Reactor Summary:

[INFO] 

[INFO] Stratio Crossdata ................................. FAILURE [1.339s]

[INFO] Stratio Crossdata common .......................... SKIPPED

[INFO] Stratio Crossdata core ............................ SKIPPED

[INFO] Stratio Crossdata connector ....................... SKIPPED

[INFO] Stratio Crossdata server .......................... SKIPPED

[INFO] Stratio Crossdata connector maven plugins ......... SKIPPED

[INFO] Stratio Crossdata InMemory connector .............. SKIPPED

[INFO] Stratio Crossdata driver .......................... SKIPPED

[INFO] Stratio Crossdata shell ........................... SKIPPED

[INFO] Stratio Crossdata distribution .................... SKIPPED

[INFO] Stratio Crossdata Client examples ................. SKIPPED

[INFO] Stratio Crossdata Twitter connector ............... SKIPPED

[INFO] Stratio Crossdata Documentation ................... SKIPPED

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 1.631s

[INFO] Finished at: Fri Jul 31 07:01:59 CDT 2015

[INFO] Final Memory: 10M/245M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project crossdata-parent: Failed to clean project: Failed to delete /Users/Dev/Downloads/mongo-spark/crossdata/target/failsafe-reports/failsafe-summary.xml -> [Help 1]

[ERROR] 



Thanks for your help!

luis.c...@gmail.com

unread,
Jul 31, 2015, 8:17:18 AM7/31/15
to Crossdata Users
Hi!

You have to clean the old generated files with:

sudo mvn clean


after that, you could do a mvn clean install without sudo

ry...@c-k.com

unread,
Jul 31, 2015, 2:03:52 PM7/31/15
to Crossdata Users, luis.c...@gmail.com
Hey Luis, that worked! Everything got installed.

Thanks!
Reply all
Reply to author
Forward
0 new messages