I'm attempting to run the sample project from How to setup akka persistence project : https://developer.lightbend.com/start/?group=akka&project=akka-samples-persistence-dc-java
When I try to run the example using the command :
mvn exec:java -Dexec.mainClass="sample.persistence.multidc.ThumbsUpApp" -Dexec.args="cassandra"
I receive the error:
[INFO] --< com.lightbend.akka.samples:akka-sample-replicated-event-sourcing-java >--
[INFO] Building Akka replicated event sourcing multi dc sample 1.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- exec-maven-plugin:3.0.0:java (default-cli) # akka-sample-replicated-event-sourcing-java ---
[WARNING]
java.lang.ClassNotFoundException: sample.persistence.multidc.ThumbsUpApp
at java.net.URLClassLoader.findClass (URLClassLoader.java:471)
at java.lang.ClassLoader.loadClass (ClassLoader.java:589)
at java.lang.ClassLoader.loadClass (ClassLoader.java:522)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:246)
at java.lang.Thread.run (Thread.java:834)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.426 s
[INFO] Finished at: 2021-07-25T20:52:54+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:java (default-cli) on project akka-sample-replicated-event-sourcing-java: An exception occured while executing the Java class. sample.persistence.multidc.ThumbsUpApp -> [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
Looking at the project source:
The package sample.persistence.multidc.ThumbsUpApp does not appear to exist. How to include the missing package sample.persistence.multidc.ThumbsUpApp ? Shouldn't this project execute without adding additional src code ?
It seems you are referencing a class name that doesn't exist in the project source.
You may use the following command instead.
mvn exec:java -Dexec.mainClass="sample.persistence.res.MainApp" -Dexec.args="cassandra"
Related
Why it still fails even after setting the WebContent as the Resource?
This solution doesn't help
[INFO] --- maven-war-plugin:2.2:war (default-war) # ESWebApp ---
[INFO] Packaging webapp
[INFO] Assembling webapp [ESWebApp] in
[/Users/alim/practice/ElasticSearchAutoComplete/webApp-api/target/webapp-api]
[INFO] Processing war project
[INFO] Copying webapp webResources
[/Users/alim/practice/ElasticSearchAutoComplete/webApp-api/WebContent\WEB-INF\pages] to
[/Users/alim/practice/ElasticSearchAutoComplete/webApp-api/target/webapp-api]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.863 s
[INFO] Finished at: 2018-11-25T21:17:49+08:00
[INFO] Final Memory: 25M/310M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project ESWebApp: Could not copy resource
[/Users/alim/practice/ElasticSearchAutoComplete/webApp-api/WebContent\WEB-INF\pages]: File /Users/alim/practice/ElasticSearchAutoComplete/webApp-api/WebContent\WEB-INF\pages/autocomplete.jsp does not exist -> [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
Please take a look.
Thanks in advance
I have a maven project in Eclipse called TdkUtils, with this pom.xml:
This is a utils project. So I want to create a jar, put it in the repository and use it in another projects.
...
<groupId>com.tdk</groupId>
<artifactId>tdkUtils</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>tdkUtils</name>
...
But I got these errors when installing the plugin:
MacBook-Pro-de-nunito:tdkUtils nunito$ mvn install:install-file -Dfile=target/tdkUtils-0.0.1-SNAPSHOT.jar
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building tdkUtils 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) # tdkUtils ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.353 s
[INFO] Finished at: 2017-09-18T11:29:58+02:00
[INFO] Final Memory: 9M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install-file (default-cli) on project tdkUtils: The artifact information is incomplete or not valid:
[ERROR] [0] 'groupId' is missing.
[ERROR] [1] 'artifactId' is missing.
[ERROR] [2] 'packaging' is missing.
[ERROR] [3] 'version' is missing.
[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/MojoExecutionException
If you just execute mvn install while inside the same directory with the util pom.xml file, maven will install the jar file into local repository for the user.
After that, the jar file can be used by the same user from other projects.
you can install a jar to local repo without pom.xml like this:
mvn install:install-file -Dfile=target/tdkUtils-0.0.1-SNAPSHOT.jar -DgroupId=com.tdk -DartifactId=tdkUtils -Dversion=0.0.1-SNAPSHOT -Dpackaging=jar
Im building a custom maven project for jenkins. After using the command
mvn -Plight-test install
I recieve this error .Please help. I have also added the plugin for surefire exception in the pom.xml file, but it isn't working! The error log is as follows :
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Jenkins main module ................................ SUCCESS [ 11.809 s]
[INFO] Jenkins cli ........................................ SUCCESS [ 38.319 s]
[INFO] Jenkins core ....................................... FAILURE [11:15 min]
[INFO] Jenkins war ........................................ SKIPPED
[INFO] Tests for Jenkins core ............................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12:10 min
[INFO] Finished at: 2016-05-05T12:26:54+05:30
[INFO] Final Memory: 39M/277M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project jenkins-core:
.
[ERROR]
[ERROR] Please refer to C:\Users\Anishas\git\jenkins\core\target\surefire-reports for the individual test results.
[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 :jenkins-core
Compile :
I had the same issues and I found out that the problem was that some of tests tried to create a System link and it was not possible because I didn't start my IDE (IntellijIdea) as administrator in Windows.
I started Intellij as administrator and that solved the problem.
Skipping test is not a good practice when developing.
mvn -Dmaven.test.skip=true -DskipTests=true clean install
use this command
Rerun with mvn -Plight-test install -rf jenkins-core -X to isolate the error
So I am running
mvn exec:java -Dexec.mainClass=”com.utm.csc.HTMLParser” -Dexec.args=”http://www.simplehtmlguide.com”
for my Java project. It runs in Eclipse but with the command above, gives me the following errors:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building assignment1 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.4.0:java (default-cli) # assignment1 ---
[WARNING]
java.lang.ClassNotFoundException: ”com.utm.csc.HTMLParser”
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:281)
at java.lang.Thread.run(Thread.java:745)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.064 s
[INFO] Finished at: 2016-01-24T16:17:21-05:00
[INFO] Final Memory: 9M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven- plugin:1.4.0:java (default-cli) on project assignment1: An exception occured while executing the Java class. ”com.utm.csc.HTMLParser” -> [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
This is an image of my paths
I am using OS X El Capitan on a 64-bit MacBook Air mid-2012. What am I doing incorrectly?
The error is that you are giving the argument incorrectly. Your command should be:
mvn clean compile exec:java -Dexec.mainClass=com.utm.csc.HTMLParser -Dexec.args=http://www.simplehtmlguide.com
Notice the lack of quotes. This can be hinted from the error message:
java.lang.ClassNotFoundException: ”com.utm.csc.HTMLParser”
means that somehow, Java searched for a class called ”com.utm.csc.HTMLParser” but it didn't find any, simply because it is actually named com.utm.csc.HTMLParser, without the quotes.
Don't forget to compile first. exec:java doesn't do it by default.
mvn clean compile exec:java -Dexec.mainClass=”com.utm.csc.HTMLParser” -Dexec.args=”http://www.simplehtmlguide.com”
I'm trying to build a version of OpenTripPlanner on my system for the first time. There are a couple of dependencies errors, out of which I was able to resolve the first one by downloading the jar manually and adding it to the .m2/repository
However, I'm unable to get around the second dependency error. Following is the error log for the maven build
[INFO] opentripplanner-geocoder .......................... SUCCESS [ 1.976 s]
[INFO] opentripplanner-gui ............................... FAILURE [ 11.088 s]
[INFO] opentripplanner-webapp ............................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 53.144 s
[INFO] Finished at: 2015-02-18T15:33:08-05:00
[INFO] Final Memory: 25M/412M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project opentripplanner-gui: Could not resolve dependencies for project org.opentripplanner:opentripplanner-gui:jar:0.6.0-SNAPSHOT: Failed to collect dependencies at org.processing:core:jar:1.0.7: Failed to read artifact descriptor for org.processing:core:jar:1.0.7: Could not transfer artifact org.processing:core:pom:1.0.7 from/to axis (http://people.apache.org/repo/m1-ibiblio-rsync-repository/org.apache.axis2/): connect timed out -> [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/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :opentripplanner-gui
I know it has something to do with core-1.0.7.jar but am unable to get around it
Turns out that switching the repository from OpenGeo to Conveyal was all that was required. Discussion thread which helped me to solve it : https://groups.google.com/forum/#!topic/opentripplanner-users/pKPGut4iCyQ