Good day, I'm a newbies here. 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?
ubuntu@ip-10-0-0-101:~/storm/examples/fyp-storm-try$ sudo mvn -e exec:javasudo mvn exec:java -D storm .topology=fyp-storm-try.src.jvm.Topology [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for org.apache.storm:fyp-storm-try:jar:0.9.4 [WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ org.apache.storm:storm:0.9.4, /root/.m2/repository/org/apache/storm/storm/0.9.4/storm-0.9.4.pom, line 694, column 21 [WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-report-plugin is missing. @ org.apache.storm:storm:0.9.4, /root/.m2/repository/org/apache/storm/storm/0.9.4/storm-0.9.4.pom, line 660, column 21 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building fyp-storm-try 0.9.4 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] >>> exec-maven-plugin:1.2.1:java (default-cli) @ fyp-storm-try >>> [INFO] [INFO] <<< exec-maven-plugin:1.2.1:java (default-cli) @ fyp-storm-try <<< [INFO] [INFO] --- exec-maven-plugin:1.2.1:java (default-cli) @ fyp-storm-try --- [WARNING] java.lang.ClassNotFoundException: fyp-storm-try.src.jvm.Topology at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:285) at java.lang.Thread.run(Thread.java:745) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.524s [INFO] Finished at: Mon Apr 06 03:43:18 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 My pom.xml as below: ?xml version="1.0" encoding="UTF-8"?> <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> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>6.8.5</version> <scope>test</scope> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-all</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.easytesting</groupId> <artifactId>fest-assert-core</artifactId> <version>2.0M8</version> <scope>test</scope> </dependency> <dependency> <groupId>org.jmock</groupId> <artifactId>jmock</artifactId> <version>2.6.0</version> <scope>test</scope> </dependency> <dependency> <groupId>org.twitter4j</groupId> <artifactId>twitter4j-stream</artifactId> <version>3.0.3</version> </dependency> <dependency> <groupId>org.apache.storm</groupId> <artifactId>storm-core</artifactId> <version>${project.version}</version> <!-- keep storm out of the jar-with-dependencies --> <scope>provided</scope> </dependency> <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> <version>3.2.1</version> </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> </dependency> </dependencies> <build> <sourceDirectory>src/jvm</sourceDirectory> <testSourceDirectory>test/jvm</testSourceDirectory> <resources> <resource> <directory>${basedir}/multilang</directory> </resource> </resources> <plugins> <!-- Bind the maven-assembly-plugin to the package phase this will create a jar file without the storm dependencies suitable for deployment to a cluster. --> <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> <plugin> <groupId>com.theoryinpractise</groupId> <artifactId>clojure-maven-plugin</artifactId> <extensions>true</extensions> <configuration> <sourceDirectories> <sourceDirectory>src/clj</sourceDirectory> </sourceDirectories> </configuration> <executions> <execution> <id>compile</id> <phase>compile</phase> <goals> <goal>compile</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.2.1</version> <executions> <execution> <phase>test</phase> <goals> <goal>exec</goal> </goals> </execution> </executions> <configuration> <executable>java</executable> <includeProjectDependencies>true</includeProjectDependencies> <includePluginDependencies>false</includePluginDependencies> <classpathScope>compile</classpathScope> <mainClass>${storm.topology}</mainClass> </configuration> </plugin> </plugins> </build> </project>
