web-dev-qa-db-ja.com

クラス「org.slf4j.impl.StaticLoggerBinder」エラーのロードに失敗しました

ルールに従ったにもかかわらず、 "クラス" org.slf4j.impl.StaticLoggerBinder "のロードに失敗しました:

slf4j-nop.jar、slf4j-simple.jar、slf4j-log4j12.jar、slf4j-jdk14.jar、またはlogback-classic.jarの1つ(および1つのみ)を配置します

誰かが私を助けてくれたらとても嬉しいです、事前に感謝します。


これが私の依存関係です:

    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
    </dependency>

    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>${slf4j.version}</version>
    </dependency>

    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.15</version>
        <exclusions>
            <exclusion>
                <groupId>com.Sun.jmx</groupId>
                <artifactId>jmxri</artifactId>
            </exclusion>
            <exclusion>
                <groupId>com.Sun.jdmk</groupId>
                <artifactId>jmxtools</artifactId>
            </exclusion>
            <exclusion>
                <groupId>javax.jms</groupId>
                <artifactId>jms</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

Maven依存関係ツリーの出力は次のとおりです:

[INFO] com.tk.sample:ext4:jar:1.0
[INFO] +- org.slf4j:slf4j-api:jar:1.6.1:compile
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.6.1:compile
[INFO] +- log4j:log4j:jar:1.2.15:compile
[INFO] |  \- javax.mail:mail:jar:1.4:compile
[INFO] |     \- javax.activation:activation:jar:1.1:compile
[INFO] +- commons-lang:commons-lang:jar:2.5:compile
[INFO] +- junit:junit:jar:4.8.2:test (scope not updated to compile)
[INFO] +- org.easymock:easymock:jar:3.0:test
[INFO] |  \- org.objenesis:objenesis:jar:1.2:test
[INFO] +- javax.servlet:servlet-api:jar:2.5:provided
[INFO] +- taglibs:standard:jar:1.1.2:compile
[INFO] +- javax.servlet:jstl:jar:1.2:compile
[INFO] +- org.springframework:spring-core:jar:3.1.1.RELEASE:compile
[INFO] +- org.springframework:spring-expression:jar:3.1.1.RELEASE:compile
[INFO] +- org.springframework:spring-beans:jar:3.1.1.RELEASE:compile
[INFO] +- org.springframework:spring-context:jar:3.1.1.RELEASE:compile
[INFO] +- org.springframework:spring-asm:jar:3.1.1.RELEASE:compile
[INFO] +- org.springframework:spring-aop:jar:3.1.1.RELEASE:compile
[INFO] |  \- aopalliance:aopalliance:jar:1.0:compile
[INFO] +- org.springframework:spring-web:jar:3.1.1.RELEASE:compile
[INFO] +- org.springframework:spring-tx:jar:3.1.1.RELEASE:compile
[INFO] +- org.springframework:spring-jdbc:jar:3.1.1.RELEASE:compile
[INFO] +- org.springframework:spring-webmvc:jar:3.1.1.RELEASE:compile
[INFO] |  \- org.springframework:spring-context-support:jar:3.1.1.RELEASE:compile
[INFO] +- org.springframework:spring-orm:jar:3.1.1.RELEASE:compile
[INFO] +- org.springframework:spring-oxm:jar:3.1.1.RELEASE:compile
[INFO] +- org.springframework:spring-jms:jar:3.1.1.RELEASE:compile
[INFO] +- org.springframework:spring-test:jar:3.1.1.RELEASE:compile
[INFO] +- cglib:cglib-nodep:jar:2.2.2:runtime
[INFO] +- org.aspectj:aspectjrt:jar:1.6.11:compile
[INFO] +- org.aspectj:aspectjweaver:jar:1.6.11:compile
[INFO] +- org.hibernate:hibernate-core:jar:4.1.1.Final:compile
[INFO] |  +- antlr:antlr:jar:2.7.7:compile
[INFO] |  +- org.jboss.logging:jboss-logging:jar:3.1.0.GA:compile
[INFO] |  +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:jar:1.0.0.Final:compile
[INFO] |  +- dom4j:dom4j:jar:1.6.1:compile
[INFO] |  +- org.javassist:javassist:jar:3.15.0-GA:compile
[INFO] |  \- org.hibernate.common:hibernate-commons-annotations:jar:4.0.1.Final:compile
[INFO] +- org.hibernate:hibernate-c3p0:jar:4.1.1.Final:compile
[INFO] |  \- c3p0:c3p0:jar:0.9.1:compile
[INFO] +- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.1.Final:compile
[INFO] +- org.hibernate:hibernate-entitymanager:jar:4.1.1.Final:compile
[INFO] +- net.sf.json-lib:json-lib:jar:jdk15:2.4:compile
[INFO] |  +- commons-beanutils:commons-beanutils:jar:1.8.0:compile
[INFO] |  +- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] |  \- net.sf.ezmorph:ezmorph:jar:1.0.6:compile
[INFO] +- mysql:mysql-connector-Java:jar:5.1.20:compile
[INFO] +- commons-io:commons-io:jar:1.3.2:compile
[INFO] +- commons-fileupload:commons-fileupload:jar:1.2.1:compile
[INFO] +- commons-dbcp:commons-dbcp:jar:1.4:compile
[INFO] |  \- commons-pool:commons-pool:jar:1.5.4:compile
[INFO] +- javax.xml:jaxrpc-api:jar:1.1:compile
[INFO] +- commons-discovery:commons-discovery:jar:0.4:compile
[INFO] +- javax.transaction:jta:jar:1.1:compile
[INFO] +- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] +- com.itextpdf:itextpdf:jar:5.3.0:compile
[INFO] +- net.sf.jasperreports:jasperreports:jar:4.6.0:compile
[INFO] |  +- commons-digester:commons-digester:jar:2.1:compile
[INFO] |  +- com.lowagie:itext:jar:2.1.7:compile
[INFO] |  |  +- bouncycastle:bcmail-jdk14:jar:138:compile
[INFO] |  |  +- bouncycastle:bcprov-jdk14:jar:138:compile
[INFO] |  |  \- org.bouncycastle:bctsp-jdk14:jar:1.38:compile
[INFO] |  |     +- org.bouncycastle:bcprov-jdk14:jar:1.38:compile
[INFO] |  |     \- org.bouncycastle:bcmail-jdk14:jar:1.38:compile
[INFO] |  +- jfree:jcommon:jar:1.0.15:compile
[INFO] |  +- jfree:jfreechart:jar:1.0.12:compile
[INFO] |  +- xml-apis:xml-apis:jar:1.3.02:compile
[INFO] |  +- Eclipse:jdtcore:jar:3.1.0:compile
[INFO] |  +- org.codehaus.castor:castor:jar:1.2:compile
[INFO] |  +- org.Apache.poi:poi-ooxml:jar:3.7:compile
[INFO] |  |  +- org.Apache.poi:poi:jar:3.7:compile
[INFO] |  |  \- org.Apache.poi:poi-ooxml-schemas:jar:3.7:compile
[INFO] |  |     +- org.Apache.xmlbeans:xmlbeans:jar:2.3.0:compile
[INFO] |  |     |  \- stax:stax-api:jar:1.0.1:compile
[INFO] |  |     \- org.Apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar:1.0:compile
[INFO] |  +- org.codehaus.jackson:jackson-core-asl:jar:1.9.4:compile
[INFO] |  \- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.4:compile
[INFO] +- org.Twitter4j:Twitter4j-core:jar:2.2.5:compile
[INFO] \- org.codehaus.mojo:emma-maven-plugin:jar:1.0-alpha-3:compile
[INFO]    +- emma:emma:jar:2.1.5320:compile
[INFO]    +- org.Apache.maven:maven-artifact:jar:2.0.8:compile
[INFO]    +- org.Apache.maven:maven-plugin-api:jar:2.0:compile
[INFO]    +- org.Apache.maven:maven-model:jar:2.0.8:compile
[INFO]    +- org.Apache.maven:maven-project:jar:2.0.8:compile
[INFO]    |  +- org.Apache.maven:maven-settings:jar:2.0.8:compile
[INFO]    |  +- org.Apache.maven:maven-profile:jar:2.0.8:compile
[INFO]    |  +- org.Apache.maven:maven-artifact-manager:jar:2.0.8:compile
[INFO]    |  |  +- org.Apache.maven:maven-repository-metadata:jar:2.0.8:compile
[INFO]    |  |  \- org.Apache.maven.wagon:wagon-provider-api:jar:1.0-beta-2:compile
[INFO]    |  +- org.Apache.maven:maven-plugin-registry:jar:2.0.8:compile
[INFO]    |  \- org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
[INFO]    |     \- classworlds:classworlds:jar:1.1-alpha-2:compile
[INFO]    +- org.Apache.maven.doxia:doxia-site-renderer:jar:1.0:compile
[INFO]    |  +- org.Apache.maven.doxia:doxia-core:jar:1.0:compile
[INFO]    |  +- org.Apache.maven.doxia:doxia-sink-api:jar:1.0:compile
[INFO]    |  +- org.codehaus.plexus:plexus-i18n:jar:1.0-beta-7:compile
[INFO]    |  +- org.codehaus.plexus:plexus-velocity:jar:1.1.7:compile
[INFO]    |  +- org.Apache.velocity:velocity:jar:1.5:compile
[INFO]    |  |  \- oro:oro:jar:2.0.8:compile
[INFO]    |  +- org.Apache.maven.doxia:doxia-decoration-model:jar:1.0:compile
[INFO]    |  +- org.Apache.maven.doxia:doxia-module-apt:jar:1.0:compile
[INFO]    |  +- org.Apache.maven.doxia:doxia-module-fml:jar:1.0:compile
[INFO]    |  +- org.Apache.maven.doxia:doxia-module-xdoc:jar:1.0:compile
[INFO]    |  \- org.Apache.maven.doxia:doxia-module-xhtml:jar:1.0:compile
[INFO]    +- org.Apache.maven.reporting:maven-reporting-api:jar:2.0.8:compile
[INFO]    +- org.Apache.maven.reporting:maven-reporting-impl:jar:2.0.4.2:compile
[INFO]    |  \- commons-validator:commons-validator:jar:1.2.0:compile
[INFO]    +- org.codehaus.plexus:plexus-utils:jar:1.4.5:compile
[INFO]    \- xom:xom:jar:1.1:compile
[INFO]       +- xerces:xmlParserAPIs:jar:2.6.2:compile
[INFO]       +- xerces:xercesImpl:jar:2.6.2:compile
[INFO]       \- jaxen:jaxen:jar:1.1-beta-8:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

完全なエラースタックトレース:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
11
talha06

ついに問題が見つかりました。 IDE私が使用しているもの-IntelliJ Idea-表示する必要がありますアーティファクトを構築するために明示的にslf4jの依存関係。ご清聴ありがとうございましたCeki ..

8
talha06