Closed beigithub closed 9 years ago
What is your output of "javac -version" and "java -version"?
Just did a test. If you have multiple Java/JDK installed, make sure you have /export/apps/jdk/JDK-1_8_0_40/bin in your PATH env before other java path.
I also have the 1.6 installed, however, JAVA_HOME is set to 1.8, and the $PATH had 1.8 also, [bxu@bxu-ld1 ~]$ javac -version javac 1.6.0_27 [bxu@bxu-ld1 ~]$ java -version java version "1.6.0_27" Java(TM) SE Runtime Environment (build 1.6.0_27-b07) Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode)
/export/apps/xtools/bin:/export/apps/xtools/lib/ruby/gems/1.9.1/bin:/export/apps/xtools/bin:/usr/lib64/qt-3.3/bin:/export/apps/xtools/gradle-1.12/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/export/apps/xtools/apache-ant-1.7.1/bin:/var/cfengine/bin:/export/apps/xtools/charles-proxy/bin:/export/apps/xtools/oracle-instant-client_10.2:/home/bxu/bin:/export/apps/jdk/JDK-1_8_0_40/bin:/usr/local/bin:/usr/local/mysql/bin:
I will put 1.8 in front of /usr/bin and try
No luck, 1.6 is in /usr/bin, I change the $PATH to have 1.8 in front of the /usr/bin, still same error, please advice. [bxu@bxu-ld1 mysql_perf_analyzer-master]$ /usr/bin/java -version java version "1.6.0_27" Java(TM) SE Runtime Environment (build 1.6.0_27-b07) Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode)
[bxu@bxu-ld1 mysql_perf_analyzer-master]$ echo $PATH /export/apps/xtools/bin:/export/apps/xtools/lib/ruby/gems/1.9.1/bin:/export/apps/xtools/bin:/usr/lib64/qt-3.3/bin:/export/apps/xtools/gradle-1.12/bin:/export/apps/jdk/JDK-1_8_0_40/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/export/apps/xtools/apache-ant-1.7.1/bin:/var/cfengine/bin:/export/apps/xtools/charles-proxy/bin:/export/apps/xtools/oracle-instant-client_10.2:/home/bxu/bin:/usr/local/bin:/usr/local/mysql/bin:
[bxu@bxu-ld1 mysql_perf_analyzer-master]$ /home/bxu/Downloads/apache-maven-3.0.5/bin/mvn clean package Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher
At the end of /home/bxu/Downloads/apache-maven-3.0.5/bin/mvn, you will see the actual java command and class path maven uses. You can modify the mvm script to print out two variables: $M2_HOME and $JAVACMD. mvn is expecting a jar file like $M2_HOME/boot/plexus-classworlds-*.jar.
Rao, thanks for pointing me to the right direction, the M2_HOME was set wrong, after I point it to the right path, it pass with flying colors, thanks!
Hi, I tried to run the following statement:======================== echo $JAVA_HOME /export/apps/jdk/JDK-1_8_0_40 cd mysql_perf_analyzer-master /apache-maven-3.0.5/bin/mvn clean package
When I run as non-root user, I get below error message:===================== Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher
When I run as root, I get further but still error:=========================== [WARNING] [WARNING] Some problems were encountered while building the effective model for com.yahoo.dba.perf:myperf:war:2.0.0-SNAPSHOT [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing. @ line 131, column 12 [WARNING] [WARNING] Some problems were encountered while building the effective model for com.yahoo.dba.tools:myperfserver:jar:2.0.0-SNAPSHOT [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 92, column 12 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing. @ line 104, column 12 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] MySQL Performance Analyzer [INFO] MySQL Database Performance Tool [INFO] myperfserver [INFO] MySQL Perf Analyzer [INFO] -rf :myperf
[INFO] ------------------------------------------------------------------------ [INFO] Building MySQL Performance Analyzer 2.0.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ myperf-project --- [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] Building MySQL Database Performance Tool 2.0.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ myperf --- [INFO] Deleting /home/bxu/Downloads/mysql_perf_analyzer-master/myperf/target [INFO] [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ myperf --- [debug] execute contextualize [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 3 resources [INFO] [INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ myperf --- [INFO] Changes detected - recompiling the module! [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! [INFO] Compiling 106 source files to /home/bxu/Downloads/mysql_perf_analyzer-master/myperf/target/classes [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] MySQL Performance Analyzer ........................ SUCCESS [0.175s] [INFO] MySQL Database Performance Tool ................... FAILURE [1.286s] [INFO] myperfserver ...................................... SKIPPED [INFO] MySQL Perf Analyzer ............................... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.590s [INFO] Finished at: Wed Jun 24 10:01:00 PDT 2015 [INFO] Final Memory: 7M/359M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project myperf: Compilation failure -> [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
Please advice