An exception occurred while running the jar package: Exception in thread "main" Java.lang.ExceptionInInitializerError

Source: Internet
Author: User

/usr/local/java/jdk1.8.0_60/bin/javaslf4j:class path contains multiple slf4j bindings. Slf4j:found Binding in [jar:file:/usr/local/jstorm-2.2.1/wait_deploy/test-jstorm-bolt.jar!/org/slf4j/impl/ Staticloggerbinder.class]slf4j:found Binding in [jar:file:/usr/local/jstorm-2.2.1/lib/logback-classic-1.0.13.jar! /org/slf4j/impl/staticloggerbinder.class]slf4j:see Http://www.slf4j.org/codes.html#multiple_bindings for an Explanation. Slf4j:actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]Exception in thread "main" Java.lang.ExceptionInInitializerErrorAt JAVA.LANG.CLASS.FORNAME0 (Native Method) at Java.lang.Class.forName (class.java:264) at backtype.storm.conf Ig$loading__4958__auto__.invoke (config.clj:17) at Backtype.storm.config__init.LoadUnknown Source)At Backtype.storm.config__init.<clinit> (Unknown Source)At JAVA.LANG.CLASS.FORNAME0 (Native Method)At Java.lang.Class.forName (Class.java:348)At Clojure.lang.RT.loadClassForName (Rt.java:2093)At Clojure.lang.RT.Load (Rt.java:430)At Clojure.lang.RT.Load (Rt.java:411)At clojure.core$Load$fn__1476.invoke (CORE.CLJ:5641)At clojure.core$Load.doinvoke (CORE.CLJ:5640)At Clojure.lang.RestFn.invoke (Restfn.java:408)At Clojure.core$load_one.invoke (CORE.CLJ:5446)At Clojure.core$load_lib$fn__1425.invoke (CORE.CLJ:5486)At Clojure.core$load_lib.doinvoke (CORE.CLJ:5485)At Clojure.lang.RestFn.applyTo (Restfn.java:142)At Clojure.core$apply.invoke (CORE.CLJ:626)At Clojure.core$load_libs.doinvoke (CORE.CLJ:5528)At Clojure.lang.RestFn.applyTo (Restfn.java:137)At Clojure.core$apply.invoke (CORE.CLJ:628)At Clojure.core$use.doinvoke (CORE.CLJ:5618)At Clojure.lang.RestFn.invoke (Restfn.java:408)At Backtype.storm.command.config_value$loading__4958__auto__.invoke (CONFIG_VALUE.CLJ:16)At Backtype.storm.command.config_value__init.LoadUnknown Source)At Backtype.storm.command.config_value__init.<clinit> (Unknown Source)At JAVA.LANG.CLASS.FORNAME0 (Native Method)At Java.lang.Class.forName (Class.java:348)At Clojure.lang.RT.loadClassForName (Rt.java:2093)At Clojure.lang.RT.Load (Rt.java:430)At Clojure.lang.RT.Load (Rt.java:411)At clojure.core$Load$fn__1476.invoke (CORE.CLJ:5641)At clojure.core$Load.doinvoke (CORE.CLJ:5640)At Clojure.lang.RestFn.invoke (Restfn.java:408)At Clojure.lang.Var.invoke (Var.java:379)At Backtype.storm.command.config_value.<clinit> (Unknown Source) causedBy:java.lang.RuntimeException:java.io.IOException:Found multiple Defaults.yaml resources. You' Re probably bundling the Storm jars with your topology jar. [Jar:file:/usr/local/jstorm-2.2.1/jstorm-core-2.2.1.jar!/defaults.yaml, Jar:file:/usr/local/jstorm-2.2.1/wait_ Deploy/test-jstorm-bolt.jar!/defaults.yaml] at Backtype.storm.utils.Utils.findAndReadConfigFile (utils.java:222) At Backtype.storm.utils.Utils.readDefaultConfig (utils.java:266) at Backtype.storm.utils.Utils.readStormConfig ( utils.java:292) at backtype.storm.utils.utils.<clinit> (utils.java:62) ... morecaused by:java.io.IOException:Found multiple Defaults.yaml resources. You ' re probably bundling the Storm jarsWith your topology jar. [jar:file:/usr/local/jstorm-2.2.1/jstorm-core-2.2.1.jar!/defaults.yaml, jar:file:/usr/local/jstorm-2.2.1/wait_deploy/test-jstorm-bolt.jar!/defaults.yaml]At Backtype.storm.utils.Utils.getConfigFileInputStream (Utils.java:248)At Backtype.storm.utils.Utils.findAndReadConfigFile (Utils.java:202) ...Morefailedto get config Java.library.pathNonecannot concatenate  ' str ' and  ' Nonetype ' objectssyntax: [ Jstorm jar Topology-jar-path class ...] Runs The Main method of class with the specified arguments. The jstorm jars and configs in $JSTORM _conf_dir/storm.yaml Span class= "Hljs-keyword" >are put on the classpath. The process is configured So, Stormsubmitter (https://github.com/alibaba/jstorm/wiki/ jstorm-chinese-documentation) would upload the jar at topology-jar-path when The topology is submitted.        

The reason for the error is: When you hit the jar package, the Jstorm-core jar package is also included, such as:

When packaging, remove the jar and deploy again.

Or:
The scope for modifying Storm-core in the Pom file is provided

< dependency> <groupid>org.apache.storm </groupid> < artifactid>storm-core</ artifactid> <version>1.1.0</ version> <!--Local debugging, block out scope, and so on when the package deployment is released----<scope>provided</ scope></DEPENDENCY>   

This will not involve changing the jar when idea is packaged.

Small bet
Provided is an indication that dependency is provided by a JDK or container, such as a servlet AP and some Java EE APIs. This scope only works when compiling and testing, and there is no transitivity at the same time.

An exception occurred while running the jar package: Exception in thread "main" Java.lang.ExceptionInInitializerError

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.