【问题标题】:Apache Storm - Error when "mvn clean install"Apache Storm - “mvn clean install”时出错
【发布时间】:2015-02-16 17:01:03
【问题描述】:

我配置了 Apache Storm 0.9.2。我运行 nimbus、主管和 UI,一切都好。 我配置了 Maven、Java。

我想从以下位置运行示例“storm-starter”: https://github.com/apache/storm/tree/master/examples/storm-starter

我运行时出现此错误:“mvn clean install -DskipTests=true”

Storm .............................................. SUCCESS [  3.983 s]
[INFO] maven-shade-clojure-transformer .................... SUCCESS [  4.242 s]
[INFO] storm-maven-plugins ................................ SUCCESS [  5.402 s]
[INFO] Storm Core ......................................... SUCCESS [01:10 min]
[INFO] storm-starter ...................................... SUCCESS [ 11.801 s]
[INFO] storm-kafka ........................................ FAILURE [  1.247 s]
[INFO] storm-hdfs ......................................... SKIPPED
[INFO] storm-hbase ........................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:37 min
[INFO] Finished at: 2015-02-16T08:57:15-08:00
[INFO] Final Memory: 44M/128M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project storm-kafka: Compilation failure
[ERROR] /home/emiliano/Documents/AmbienteStorm/ejemplos/storm/external/storm-kafka/src/jvm/storm/kafka/ExponentialBackoffMsgRetryManager.java:[159,24] cannot find symbol

这是 POM.xml

<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<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.10.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>org.apache.storm</groupId>
<artifactId>storm-starter</artifactId>
<packaging>jar</packaging>
<name>storm-starter</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>
<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>

【问题讨论】:

  • 错误信息被截断:cannot find symbol...。你能提供错误信息的结尾吗?看起来你需要提供storm-kafka,它是一个外部包。

标签: maven hadoop bigdata pom.xml apache-storm


【解决方案1】:

https://github.com/apache/storm/commit/fd066985a74c3140f61a465cfc49c83a6ddfa713

您必须使用 JDK 1.7 作为storm-kafka 的最低要求。

【讨论】:

  • 正确,我有同样的行为,这条评论暗示解决了这个问题。更详细:在 pom.xml 中,更改 maven-plugin 配置以将版本“1.7”而不是“1.6”作为源值和目标值,并确保运行 Java 1.7(例如,在 Mac 上,这是沿用的)运行 Maven 之前的 "export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home") 行。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-10-01
  • 1970-01-01
  • 2018-10-08
  • 2014-03-30
  • 2011-08-26
相关资源
最近更新 更多