标签:noi mfs rdo psu 2.7 rac qps lftp 0kb
java.lang.RuntimeException: Found multiple defaults.yaml resources.
You‘re probably bundling the Storm jars with your topology jar.
[jar:file:/home/hadoop/app/storm/lib/storm-core-0.9.6.jar!/defaults.yaml,
jar:file:/home/hadoop/stormApi-wordcount-1.0-SNAPSHOT-jar-with-dependencies.jar!/defaults.yaml]
新浪微博:intsmaze刘洋洋哥
package cn.intsmaze; public class A { public static void main(String[] args) { System.out.println(args[0]); System.out.println("java工程打jar包"); } } package cn.intsmaze; import java.util.HashMap; import java.util.Map; import redis.clients.jedis.Jedis; public class demo { public static void main(String[] args) { System.out.println("java工程调用第三方jar包"); Jedis jedis = new Jedis("localhost", 6379); Map map=new HashMap(); map.put("11", "1"); d.jedis.hmset("33", map); d.jedis.close(); } }
Manifest-Version: 1.0
Main-Class: com.Task
Class-Path: lib/dom4j-1.6.1.jar lib/jaxen-1.1-beta-7.jar
注意:
<1> manifest.mf文件最后一行必须是一个空行。 <2> lib/dom4j-1.6.1.jar和lib/jaxen-1.1-beta-7.jar之间用一个空格隔开。 <3>每个冒号后有一个空格。
package cn.intsmaze; public class A { public static void main(String[] args) { System.out.println(args[0]); System.out.println("java工程打jar包"); } } package cn.intsmaze; import java.util.HashMap; import java.util.Map; import redis.clients.jedis.Jedis; public class demo { public static void main(String[] args) { System.out.println("java工程调用第三方jar包"); Jedis jedis = new Jedis("localhost", 6379); Map map=new HashMap(); map.put("11", "1"); d.jedis.hmset("33", map); d.jedis.close(); } }
<dependencies> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>2.7.3</version> </dependency> </dependencies>
<build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <archive> <manifest> <mainClass>cn.intsmaze.demo.RedisDemo</mainClass> </manifest> </archive> </configuration> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> </plugins> </build>
<dependencies> <dependency> <groupId>org.apache.storm</groupId> <artifactId>storm-core</artifactId> <version>0.9.5</version> </dependency> </dependencies>
<dependencies> <dependency> <groupId>org.apache.storm</groupId> <artifactId>storm-core</artifactId> <version>0.9.5</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.27</version> </dependency> </dependencies> <build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <archive> <manifest> <mainClass>cn.intsmaze.helloworld.WordCountTopologyMain</mainClass> </manifest> </archive> </configuration> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> </plugins> </build>
java.lang.RuntimeException: Found multiple defaults.yaml resources.
You‘re probably bundling the Storm jars with your topology jar.
[jar:file:/home/hadoop/app/storm/lib/storm-core-0.9.6.jar!/defaults.yaml,
jar:file:/home/hadoop/stormApi-wordcount-1.0-SNAPSHOT-jar-with-dependencies.jar!/defaults.yaml]
<dependency> <groupId>org.apache.storm</groupId> <artifactId>storm-core</artifactId> <scope>provided</scope>期望JDK、容器或使用者会提供这个依赖 <version>0.9.5</version> </dependency>
标签:noi mfs rdo psu 2.7 rac qps lftp 0kb
原文地址:http://www.cnblogs.com/intsmaze/p/5998646.html