当我试图提交拓扑时,我发现了这一点
Exception in thread "main" java.lang.RuntimeException: Found multiple defaults.yaml resources. You're probably bundling the Storm jars with your topology jar.
at backtype.storm.utils.Utils.findAndReadConfigFile(Utils.java:115)
at backtype.storm.utils.Utils.readDefaultConfig(Utils.java:135)
at backtype.storm.utils.Utils.readStormConfig(Utils.java:155)
at backtype.storm.StormSubmitter.submitTopology(StormSubmitter.java:61)
at backtype.storm.StormSubmitter.submitTopology(StormSubmitter.java:40)
at trident.myproject.main(myproject.java:288)
Run Code Online (Sandbox Code Playgroud)
但是在pom.xml中更新后出现此错误
<scope>compile</scope> instead of <scope>provided</scope>
因为我是一个错误
An exception occured while executing the Java class. storm/trident/state/StateFactory
Run Code Online (Sandbox Code Playgroud)
这里是pom文件
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>trident.myproject</mainClass>
<!-- <mainClass>crawler.Crawler</mainClass> -->
</manifest>
</archive>
</configuration>
Run Code Online (Sandbox Code Playgroud)
pom文件的第2部分
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
Run Code Online (Sandbox Code Playgroud)
pom文件的第3部分
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source> …Run Code Online (Sandbox Code Playgroud)