如何设置akka持久性项目

qncylg1j  于 2022-11-06  发布在  其他
关注(0)|答案(1)|浏览(214)

我正在尝试从How to setup akka persistence project运行示例项目:https://developer.lightbend.com/start/?group=akka&project=akka-samples-persistence-dc-java
当我尝试使用以下命令运行示例时:
在这个示例中,您可以使用以下命令来执行此操作:
我收到错误:

[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

查看项目来源:

sample.persistence.multidc.ThumbsUpApp似乎不存在。如何包括丢失的包sample.persistence.multidc.ThumbsUpApp?这个项目不应该在不添加额外src代码的情况下执行吗?

kpbwa7wx

kpbwa7wx1#

您似乎引用了项目源中不存在的类名。您可以改用以下命令。

mvn exec:java -Dexec.mainClass="sample.persistence.res.MainApp" -Dexec.args="cassandra"

相关问题