I am following the steps as per the Kantega/storm-twitter-workshop project link
but I am stuck at a point. While testing credentials by running the main class in folder cheating
cd cheating
mvn compile exec:java -Dexec.classpathScope=compile -Dexec.mainClass=storm.starter.CheatingTwitterFunTopology
I am getting the below error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project storm-assignment-solution: Compilation failure
[ERROR] Unable to locate the Javac Compiler in:
[ERROR] /usr/lib/jvm/java-7-openjdk-amd64/jre/../lib/tools.jar
[ERROR] Please ensure you are using JDK 1.4 or above and
[ERROR] not a JRE (the com.sun.tools.javac.Main class is required).
[ERROR] In most cases you can change the location of your Java
[ERROR] installation by setting the JAVA_HOME environment variable.
[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
Where am I going wrong?
The Error says it all ..
[ERROR] Unable to locate the Javac Compiler in:[ERROR] /usr/lib/jvm/java-7-openjdk-amd64/jre/../lib/tools.jar
[ERROR] Please ensure you are using JDK 1.4 or above and
Looking at your project page found the following
1) It uses 2 maven modules namely cheating and storm-assignment and both of them are expected to run under Java 1.6 as found in their pom.xml
Check the pom.xml for both the module has this
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
Make sure you are running with atleast Java 1.6 or Higher
Related
I wanted to deploy my application to heroku server and I am facing this problem. Any idea?
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.339 s
[INFO] Finished at: 2021-08-09T04:05:01Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project russion_spring_boot: Fatal error compiling: invalid target release: 11 -> [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/MojoExecutionException
! ERROR: Failed to build app with Maven
We're sorry this build is failing! If you can't find the issue in application code,
please submit a ticket so we can help: https://help.heroku.com/
! Push rejected, failed to compile Java app.
! Push failed
<properties>
<java.version>15.0.1</java.version>
</properties>
Logs depict the error - invalid target release: 11. Basically this error means that you have mentioned higher/mismatched version of Java in maven compiler's source and target java version settings in your pom.xml compared to the JDK which is being pointed out by JAVA_HOME environment variable.
To fix this error, just check the Java version in pom.xml and JAVA_HOME. They should match.
To know more about this issue, check this post - https://dzone.com/articles/how-to-fix-invalid-target-release-17-18-19-or-110
I'm running my Java application using Mavin and after the running, I have this message:
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project test: Fatal error compiling: error: invalid target release: 16 -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Could you help me please
I had exactly the same problem:
Eclipse 2021-06
maven-compiler-plugin v3.8.1
-> "invalid target release: 16"
Changing the default JRE under "Preferences/Installed JREs" from 14 to 16 fixed this for me. (The Build was set correctly to JDK 16 all along, so Maven should have been using the 16 Runtime Environment which was pointed at JDK 16, but it obviously wasn't)
Go to java build path and set JAVA_HOME to jdk not to JDK_DIR/jre
I am building Apache Spark with the make-distribution.sh script. It works fine till the spark-streaming-mqtt_2.10 module.
My MAVEN_OPTS environment variable is:
export MAVEN_OPTS="-Xmx15g -XX:MaxPermSize=15000M -XX:ReservedCodeCacheSize=15000M"
Even though the memory assigned to Maven is very high, it still fails in the creation of spark-streaming-mqtt-test-1.5.2.jar jar file.
Below is the error stacktrace:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.5.5:single (test-jar-with-dependencies) on project spark-streaming-mqtt_2.10: Failed to create assembly: Error creating assembly archive test-jar-with-dependencies: Problem creating jar: Execution exception: Java heap space -> [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/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :spark-streaming-mqtt_2.10
My Jenkins build fails sometimes while deploying to JBoss/WildFly 8 with Java heap space problem.
[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.1.0.Alpha2:deploy (default-cli) on project Prometheus: Deployment failed: Operation failed: "JBAS014749: Operation handler failed: Java heap space" -> [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:
I have to restart my JBoss/WildFly every time this happens to deploy to server. Please help me in clearing the problem so that it doesn't hinder my automation.
I am new to maven installation. While executing a .bat file which installs maven, I am getting the below error. Could you please check :
Launching environment tests
checking Java 4 compile, java 4 run
[ERROR] COMPILATION ERROR :
[ERROR] Failure executing javac, but could not parse the error:
The system cannot find the path specified.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default
-compile) on project devenv-validate: Compilation failure
[ERROR] Failure executing javac, but could not parse the error:
[ERROR] The system cannot find the path specified.
[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 arti
cles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
checking Java 4 compile, java 6 run
[ERROR] COMPILATION ERROR :
[ERROR] Failure executing javac, but could not parse the error:
The system cannot find the path specified.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default
-compile) on project devenv-validate: Compilation failure
[ERROR] Failure executing javac, but could not parse the error:
[ERROR] The system cannot find the path specified.
[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 arti
cles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
checking Java 6 compile, java 6 run
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestDevEnvValidator
Java version : Actual [1.6.0_20], expected [1.6.0_20]
Java compiler : Actual [6], expected [6]
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
Results :
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0
Press any key to continue . . .
Can anyone please have a look and say why it is failing. Thanks in advance.
The system cannot find the path specified.
If you are using Windows, please check if the path specified for system variables: Path, JAVA_HOME, M2_HOME, M2.
Check out this tutorial:
http://www.tutorialspoint.com/maven/maven_environment_setup.htm