0

~/storm/examples/fyp-storm-try/ ディレクトリで sudo mvn exec:java -D storm.topology=fyp-storm-try.src.jvm.Topology を実行すると、実行中に例外が発生したというエラーに直面しましたJava クラスの問題を解決するには?

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.838s
[INFO] Finished at: Sun Apr 05 09:09:28 UTC 2015
[INFO] Final Memory: 9M/22M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project fyp-storm-try: An exception occured while executing the Java class. fyp-storm-try.src.jvm.Topology -> [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

以下は私のpom.xmlです:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
      <artifactId>storm</artifactId>
      <groupId>org.apache.storm</groupId>
      <version>0.9.4</version>
      <relativePath>../../pom.xml</relativePath>
  </parent>

  <groupId>org.apache.storm</groupId>
  <artifactId>fyp-storm-try</artifactId>
  <packaging>jar</packaging>

  <name>fyp-storm-try</name>

......いくつかの部分をスキップします......

  <build>
    <sourceDirectory>src/jvm</sourceDirectory>
    <testSourceDirectory>test/jvm</testSourceDirectory>
    <resources>
      <resource>
        <directory>${basedir}/multilang</directory>
      </resource>
    </resources>

    <plugins>

......いくつかの部分をスキップ...... これは pom.xml の最後の部分です

  <plugin>
    <artifactId>maven-assembly-plugin</artifactId>
    <configuration>
      <descriptorRefs>
        <descriptorRef>jar-with-dependencies</descriptorRef>
      </descriptorRefs>
      <archive>
        <manifest>
          <mainClass />
        </manifest>
      </archive>
    </configuration>
    <executions>
      <execution>
        <id>make-assembly</id>
        <phase>package</phase>
        <goals>
          <goal>single</goal>
        </goals>
      </execution>
    </executions>
  </plugin>

ただし、コマンド sudo mvn -e exec:java at ~/storm/examples/fyp-storm-try/ で実行すると

以下のエラーが表示されます。

[エラー] プロジェクト fyp-storm-try でゴール org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) を実行できませんでした: ゴール org.codehaus.mojo のパラメーター 'mainClass': exec-maven-plugin:1.2.1:java が見つからないか無効です -> [ヘルプ 1] org.apache.maven.lifecycle.LifecycleExecutionException: ゴール org.codehaus.mojo:exec-maven-plugin:1.2.1 の実行に失敗しました:java (default-cli) on project fyp-storm-try: 目標 org.codehaus.mojo:exec-maven-plugin:1.2.1:java のパラメーター 'mainClass' が見つからないか無効です

......いくつかの部分をスキップします......

[エラー] [ヘルプ 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginParameterException

4

0 に答える 0