0

When I run sudo mvn exec:java -D storm.topology=fyp-storm-try.src.jvm.Topology at ~/storm/examples/fyp-storm-try/ directory, I faced an error regarding an exception occurred while executing the Java class, how to solve the problem?

[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

Below is my 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>

......SKIP SOME PART......

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

    <plugins>

......SKIP SOME PART...... This is final part of the 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>

However, when I run with the command sudo mvn -e exec:java at ~/storm/examples/fyp-storm-try/

The error below appear:

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project fyp-storm-try: The parameters 'mainClass' for goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java are missing or invalid -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project fyp-storm-try: The parameters 'mainClass' for goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java are missing or invalid

......SKIP SOME PART......

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginParameterException

Toshihiko
  • 325
  • 1
  • 8
  • 20
  • If possible, run maven with `-e` and update your question with stack trace. Consider update with `exec-maven-plugin`configuration and `Topology` class. – Bruno Ribeiro Apr 05 '15 at 23:11
  • Could you also post your pom.xml file? – jamierocks Apr 05 '15 at 23:38
  • possible duplicate of [Class Not Found exception with exec-maven-plugin when run on Linux](http://stackoverflow.com/questions/17458243/class-not-found-exception-with-exec-maven-plugin-when-run-on-linux) – AStopher May 13 '15 at 12:32
  • I use mvn clean install -D skipTests s=true before I issue mvn package & mvn compile – Toshihiko May 15 '15 at 00:48

0 Answers0