java - 执行 Java 类时发生异常。 java.lang.InterruptedException

标签 java maven

我从 http://mirror.symnds.com/software/Apache/storm/apache-storm-0.9.3/apache-storm-0.9.3.tar.gz 获取 Apache Storm

我从未修改过/home/user/storm/examples/storm-starter/目录中的任何内容。

当我运行此命令时

mvn exec:java -Dstorm.topology=storm.starter.WordCountTopology

在/home/user/storm/examples/storm-starter/中,出现如下错误:

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project storm-starter: An exception occured while executing the Java class. java.lang.InterruptedException -> [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
MojoExecutionException - Apache Maven - Apache Software Foundation
cwiki.apache.org

有人知道问题是什么以及如何解决吗? 我希望能给我一个详细的解决方案,因为我是新手。谢谢。

最佳答案

试试这个

转到 pom.xml 文件所在的路径并运行此命令

mvn -e -f pom.xml compile exec:java -D storm.topology=storm.starter.WordCountTopology

尝试将其添加到您的 pom.xml 并运行上面的命令。

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>exec-maven-plugin</artifactId>
    <version>1.2.1</version>
    <executions>
      <execution>
        <goals>
          <goal>exec</goal>
        </goals>
      </execution>
    </executions>
    <configuration>
      <executable>java</executable>
      <includeProjectDependencies>true</includeProjectDependencies>
      <includePluginDependencies>true</includePluginDependencies>
      <classpathScope>compile</classpathScope>
      <mainClass>${storm.topology}</mainClass>
    </configuration>
</plugin>

关于java - 执行 Java 类时发生异常。 java.lang.InterruptedException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29670562/

相关文章:

java - 为什么我的 Spring 设置失败并出现 NoSuchBeanDefinitionException?

Java - 反转 XML 属性

java - 如何在 CQ 6 中通过 LDAP 对目录进行用户身份验证

java - Maven 在构建 Java 项目时运行带有 junit @Ignore 注释的测试

maven - tomcat dbcp 和 NamingException

Java - 从 "http://www.example.com/something.php?id=1111"获取文件名

java - java中正则表达式的神奇日期

java - 使用maven生成校验和并将MD5文件存储在指定文件夹中

java - JSON 数据的 CORS 问题

maven - 将 tomcat 服务器凭据添加到项目的 pom 而不是 settings.xml