0

我正在尝试在我的应用程序中将 log4j 从 1.7 升级到 2.17.1。但我的基于 Web 的应用程序无法启动。

虽然我尝试在较低的 log4j 版本 2.8.2 上运行我正在运行的应用程序,其中应用程序出现没有任何问题,但在 log 4j 2.9.0 及更高版本中它没有出现。任何帮助表示赞赏。

EVERE: Exception sending context initialized event to listener instance of class [org.apache.webbeans.servlet.WebBeansConfigurationListener] org.apache.webbeans.exception.WebBeansDeploymentException: java.lang.IllegalArgumentException at org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery.scan(AbstractMetaDataDiscovery.java:144)

尝试使用 log4j 版本 2.10 时添加依赖关系树

    [INFO] --- maven-dependency-plugin:2.10:tree (default-cli) @ tnt-applicationserver ---
[INFO] com.companu.tnt:tnt-applicationserver:war:4.11.4-1-SNAPSHOT
[INFO] +- org.apache.logging.log4j:log4j-api:jar:2.10.0:compile
[INFO] +- org.apache.logging.log4j:log4j-core:jar:2.10.0:compile
[INFO] +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.10.0:compile
[INFO] |  \- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] +- org.apache.logging.log4j:log4j-jcl:jar:2.10.0:compile
[INFO] +- org.apache.logging.log4j:log4j-1.2-api:jar:2.10.0:compile
[INFO] +- com.companu.sentinel.common:sentinel-ua:jar:3.11.0-2:compile
[INFO] +- com.companu.sentinel.common:sentinel-common-circularbuffer:jar:3.11.0-2:runtime
[INFO] +- com.companu.sentinel.common:sentinel-common-core:jar:3.11.0-2:compile
[INFO] |  +- com.companu:companu-tools:jar:1.3.3:compile
[INFO] |  +- com.sun:tools:jar:1.8:system
[INFO] |  \- jradius:jradius-client:jar:2.0.0:compile
[INFO] +- org.flywaydb:flyway-core:jar:4.0.3:compile
[INFO] +- com.oracle:ojdbc6:jar:11.2.0.4:compile
[INFO] +- commons-cli:commons-cli:jar:1.3.1:compile
[INFO] +- commons-beanutils:commons-beanutils:jar:1.9.2:compile
[INFO] +- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] +- commons-codec:commons-codec:jar:1.10:compile
[INFO] +- org.apache.commons:commons-collections4:jar:4.1:compile
[INFO] +- commons-dbcp:commons-dbcp:jar:1.4:compile
[INFO] |  \- commons-pool:commons-pool:jar:1.5.4:compile
[INFO] +- commons-dbutils:commons-dbutils:jar:1.6:compile
[INFO] +- commons-fileupload:commons-fileupload:jar:1.3.2:compile
[INFO] +- commons-configuration:commons-configuration:jar:1.10:compile
[INFO] +- commons-io:commons-io:jar:2.4:compile
[INFO] +- commons-logging:commons-logging:jar:1.2:compile
[INFO] +- com.companu.report:companu-report-engine:jar:1.0.1:compile
[INFO] +- com.companu.ria.toolkit:ria-toolkit-tools-pojo2as3:jar:2.0:compile
[INFO] +- com.sun.xml.ws:servlet:jar:2.2.8:compile
[INFO] |  +- com.sun.xml.ws:rt:jar:2.2.8:compile
[INFO] |  |  +- com.sun.xml.ws:policy:jar:2.3.1:compile
[INFO] |  |  +- com.sun.xml.bind:jaxb-impl:jar:2.2.7:compile
[INFO] |  |  |  \- com.sun.xml.fastinfoset:FastInfoset:jar:1.2.12:compile
[INFO] |  |  +- org.glassfish.gmbal:gmbal-api-only:jar:3.1.0-b001:compile
[INFO] |  |  |  \- org.glassfish.external:management-api:jar:3.0.0-b012:compile
[INFO] |  |  +- org.jvnet.staxex:stax-ex:jar:1.7.1:compile
[INFO] |  |  +- com.sun.xml.stream.buffer:streambuffer:jar:1.5.1:compile
[INFO] |  |  +- org.jvnet.mimepull:mimepull:jar:1.9.1:compile
[INFO] |  |  +- org.codehaus.woodstox:woodstox-core-asl:jar:4.1.2:runtime
[INFO] |  |  +- org.codehaus.woodstox:stax2-api:jar:3.1.1:runtime
[INFO] |  |  \- com.sun.org.apache.xml.internal:resolver:jar:20050927:compile
[INFO] |  +- com.sun.xml.ws:rt-ha:jar:2.2.8:compile
[INFO] |  |  \- org.glassfish.ha:ha-api:jar:3.1.9:compile
[INFO] |  +- javax.annotation:javax.annotation-api:jar:1.2-b03:compile
[INFO] |  \- javax.jws:jsr181-api:jar:1.0-MR1:compile
[INFO] +- javax.jms:jms:jar:1.1:compile
[INFO] +- com.sun.mail:javax.mail:jar:1.5.6:compile
[INFO] +- javax.servlet:javax.servlet-api:jar:4.0.1:provided
[INFO] +- commons-lang:commons-lang:jar:2.6:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.5:compile
[INFO] +- org.apache.geronimo.specs:geronimo-annotation_1.2_spec:jar:1.0:compile
[INFO] +- org.apache.geronimo.specs:geronimo-interceptor_1.2_spec:jar:1.0:compile
[INFO] +- org.apache.geronimo.specs:geronimo-atinject_1.0_spec:jar:1.0:compile
[INFO] +- org.apache.geronimo.specs:geronimo-jcdi_1.1_spec:jar:1.0:compile
[INFO] +- org.apache.openwebbeans:openwebbeans-spi:jar:1.6.2:compile
[INFO] +- org.apache.openwebbeans:openwebbeans-impl:jar:1.6.2:compile
[INFO] |  +- org.apache.xbean:xbean-finder-shaded:jar:4.3:compile
[INFO] |  \- org.apache.xbean:xbean-asm5-shaded:jar:4.3:compile
[INFO] +- org.apache.openwebbeans:openwebbeans-web:jar:1.6.2:compile
[INFO] |  \- org.apache.openwebbeans:openwebbeans-el22:jar:1.6.2:compile
[INFO] +- org.quartz-scheduler:quartz:jar:2.3.1:compile
[INFO] |  +- com.mchange:c3p0:jar:0.9.5.3:compile
[INFO] |  +- com.mchange:mchange-commons-java:jar:0.2.15:compile
[INFO] |  \- com.zaxxer:HikariCP-java7:jar:2.4.13:compile
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.7.25:compile
[INFO] +- com.companu.tnt.thirdparty.org.eclipse.birt.runtime:org.eclipse.birt.runtime:jar:4.6.0-20160607:compile
[INFO] |  +- org.eclipse.birt.runtime:com.ibm.icu:jar:56.1.0.v201601250100:compile
[INFO] |  +- org.eclipse.birt.runtime:org.eclipse.datatools.connectivity.oda:jar:3.5.0.201603142002:compile
[INFO] |  +- org.eclipse.birt.runtime:org.eclipse.datatools.connectivity.oda.consumer:jar:3.3.0.201603142002:compile
[INFO] |  +- org.eclipse.birt.runtime:org.eclipse.datatools.enablement.oda.xml:jar:1.3.0.201603142002:compile
[INFO] |  +- org.eclipse.birt.runtime:org.w3c.css.sac:jar:1.3.1.v200903091627:compile
[INFO] |  +- org.eclipse.scout.sdk.deps:org.eclipse.core.runtime:jar:3.12.0.v20160606-1342:compile
[INFO] |  |  \- org.eclipse.scout.sdk.deps:org.eclipse.core.jobs:jar:3.8.0.v20160509-0411:compile (version selected from constraint [3.8.0,3.8.1))
[INFO] |  +- org.eclipse.scout.sdk.deps:org.eclipse.equinox.preferences:jar:3.6.0.v20160120-1756:compile
[INFO] |  +- org.eclipse.birt.runtime:org.mozilla.javascript:jar:1.7.5.v201504281450:compile
[INFO] |  +- org.eclipse.scout.sdk.deps:org.eclipse.equinox.registry:jar:3.6.100.v20160223-2218:compile
[INFO] |  +- org.eclipse.birt.runtime.3_7_1:org.apache.batik.util:jar:1.6.0:compile
[INFO] |  +- org.eclipse.scout.sdk.deps:org.eclipse.equinox.common:jar:3.8.0.v20160509-1230:compile
[INFO] |  +- org.eclipse.birt.runtime.3_7_1:org.apache.batik.css:jar:1.6.0:compile
[INFO] |  +- org.eclipse.scout.sdk.deps:org.eclipse.osgi:jar:3.11.0.v20160603-1336:compile
[INFO] |  +- org.eclipse.birt.runtime.3_7_1:com.lowagie.text:jar:2.1.7:compile
[INFO] |  \- org.eclipse.birt.runtime.3_7_1:org.apache.xerces:jar:2.9.0:compile
[INFO] +- org.apache.poi:poi:jar:3.16:compile
[INFO] +- org.apache.poi:poi-ooxml:jar:3.16:compile
[INFO] |  \- com.github.virtuald:curvesapi:jar:1.04:compile
[INFO] +- org.apache.poi:poi-ooxml-schemas:jar:3.16:compile
[INFO] +- net.sf.jtidy:jtidy:jar:r938:compile
[INFO] +- org.eclipse.jgit:org.eclipse.jgit:jar:4.11.9.201909030838-r:compile
[INFO] |  +- com.jcraft:jsch:jar:0.1.54:compile
[INFO] |  +- com.jcraft:jzlib:jar:1.1.1:compile
[INFO] |  \- com.googlecode.javaewah:JavaEWAH:jar:1.1.6:compile
[INFO] +- org.apache.flex.blazeds:flex-messaging-common:jar:4.7.3:compile
[INFO] +- org.apache.flex.blazeds:flex-messaging-core:jar:4.7.3:compile
[INFO] +- org.apache.flex.blazeds:flex-messaging-remoting:jar:4.7.3:compile
[INFO] +- org.apache.commons:commons-exec:jar:1.3:compile
[INFO] +- com.companu.documentation.trackandtrace:trackandtrace-en:zip:UserGuide:1.11.0-4:compile
[INFO] +- com.companu.tnt.ui:tnt-frontend-ui:zip:dist:1.8.4-1-1:compile
[INFO] +- com.companu.defence:companu-defence:jar:2.0.0-1:compile
[INFO] |  +- com.google.code.findbugs:jsr305:jar:2.0.3:compile
[INFO] |  +- com.fortify:fortify-annotations:jar:1.0:compile
[INFO] |  \- org.apache.felix:org.osgi.core:jar:1.4.0:compile
[INFO] +- org.apache.activemq:activemq-kahadb-store:jar:5.14.1:compile
[INFO] |  +- org.apache.activemq.protobuf:activemq-protobuf:jar:1.1:compile
[INFO] |  \- commons-net:commons-net:jar:3.5:compile
[INFO] +- org.apache.activemq:activemq-broker:jar:5.14.1:compile
[INFO] |  +- org.apache.activemq:activemq-client:jar:5.14.1:compile
[INFO] |  |  \- org.fusesource.hawtbuf:hawtbuf:jar:1.11:compile
[INFO] |  \- org.apache.activemq:activemq-openwire-legacy:jar:5.14.1:compile
[INFO] +- org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.1.1:compile
[INFO] +- org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec:jar:1.0.1:compile
[INFO] +- com.google.guava:guava:jar:19.0:compile
[INFO] +- javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile
[INFO] +- org.glassfish.jersey.core:jersey-server:jar:2.22.2:compile
[INFO] |  +- org.glassfish.jersey.core:jersey-common:jar:2.22.2:compile
[INFO] |  |  +- org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.22.2:compile
[INFO] |  |  \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile
[INFO] |  +- org.glassfish.jersey.media:jersey-media-jaxb:jar:2.22.2:compile
[INFO] |  +- org.glassfish.hk2:hk2-api:jar:2.4.0-b34:compile
[INFO] |  |  +- org.glassfish.hk2:hk2-utils:jar:2.4.0-b34:compile
[INFO] |  |  \- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.4.0-b34:compile
[INFO] |  +- org.glassfish.hk2.external:javax.inject:jar:2.4.0-b34:compile
[INFO] |  +- org.glassfish.hk2:hk2-locator:jar:2.4.0-b34:compile
[INFO] |  \- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] +- org.glassfish.jersey.containers:jersey-container-servlet:jar:2.22.2:compile
[INFO] |  \- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.22.2:compile
[INFO] +- javax.persistence:javax.persistence-api:jar:2.2:compile
[INFO] +- org.glassfish.jersey.core:jersey-client:jar:2.22.2:compile
[INFO] +- org.glassfish.jersey.ext.cdi:jersey-cdi1x:jar:2.22.2:compile
[INFO] +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.9.0:compile
[INFO] |  +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.9.0:compile
[INFO] |  |  \- com.fasterxml.jackson.core:jackson-core:jar:2.9.0:compile
[INFO] |  \- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.9.0:compile
[INFO] |     \- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] +- org.apache.xmlbeans:xmlbeans:jar:2.6.0:compile
[INFO] +- dom4j:dom4j:jar:1.6.1-jboss:compile
[INFO] +- com.companu.commons.search:commons-search:jar:1.8.0-2:compile
[INFO] |  \- com.fasterxml.jackson.core:jackson-databind:jar:2.7.4:compile
[INFO] +- org.antlr:antlr4-runtime:jar:4.1:runtime
[INFO] |  \- org.abego.treelayout:org.abego.treelayout.core:jar:1.0.1:runtime
[INFO] +- org.apache.shiro:shiro-core:jar:1.3.2:compile
[INFO] +- org.apache.shiro:shiro-web:jar:1.3.2:compile
[INFO] +- org.apache.shiro:shiro-ehcache:jar:1.3.2:compile
[INFO] |  \- net.sf.ehcache:ehcache-core:jar:2.5.3:compile
[INFO] +- com.jolbox:bonecp:jar:0.8.0.RELEASE:compile
[INFO] +- javax.xml.soap:javax.xml.soap-api:jar:1.3.5:compile
[INFO] +- javax.xml.bind:jaxb-api:jar:2.2.7:compile
[INFO] +- javax.xml.ws:jaxws-api:jar:2.2.9:compile
[INFO] +- org.apache.santuario:xmlsec:jar:1.5.8:compile
[INFO] +- org.glassfish.jersey.ext:jersey-bean-validation:jar:2.25.1:compile
[INFO] |  +- org.hibernate:hibernate-validator:jar:5.1.3.Final:compile
[INFO] |  +- javax.el:javax.el-api:jar:2.2.4:compile
[INFO] |  \- org.glassfish.web:javax.el:jar:2.2.4:compile
[INFO] +- com.sun.xml.bind:jaxb-core:jar:2.2.7:compile
[INFO] |  \- com.sun.istack:istack-commons-runtime:jar:2.16:compile
[INFO] +- junit:junit:jar:4.11:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- com.companu.tools.test:test:jar:1.9.0-1:test
[INFO] |  +- org.mockito:mockito-core:jar:1.9.5:test
[INFO] |  +- org.hsqldb:hsqldb:jar:2.3.1:test
[INFO] |  +- com.h2database:h2:jar:1.3.174:test
[INFO] |  \- org.mongodb:mongo-java-driver:jar:2.11.4:test
[INFO] +- com.jayway.restassured:rest-assured:jar:2.9.0:test
[INFO] |  +- org.codehaus.groovy:groovy:jar:2.4.4:test
[INFO] |  +- org.codehaus.groovy:groovy-xml:jar:2.4.4:test
[INFO] |  +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] |  +- org.ccil.cowan.tagsoup:tagsoup:jar:1.2.1:test
[INFO] |  +- com.jayway.restassured:json-path:jar:2.9.0:test
[INFO] |  |  +- org.codehaus.groovy:groovy-json:jar:2.4.4:test
[INFO] |  |  \- com.jayway.restassured:rest-assured-common:jar:2.9.0:test
[INFO] |  \- com.jayway.restassured:xml-path:jar:2.9.0:test
[INFO] +- com.networknt:json-schema-validator:jar:0.1.2:test
[INFO] |  +- org.slf4j:slf4j-ext:jar:1.7.21:test
[INFO] |  |  \- ch.qos.cal10n:cal10n-api:jar:0.8.1:test
[INFO] |  \- io.undertow:undertow-core:jar:1.4.0.Final:test
[INFO] |     +- org.jboss.xnio:xnio-api:jar:3.3.6.Final:test
[INFO] |     \- org.jboss.xnio:xnio-nio:jar:3.3.6.Final:test
[INFO] +- org.apache.httpcomponents:httpclient:jar:4.4.1:compile
[INFO] +- org.apache.httpcomponents:httpcore:jar:4.4.1:compile
[INFO] +- org.apache.httpcomponents:httpmime:jar:4.4.1:compile
[INFO] +- org.hibernate:hibernate-core:jar:5.2.18.Final:compile
[INFO] |  +- org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile
[INFO] |  +- org.javassist:javassist:jar:3.22.0-GA:compile
[INFO] |  +- antlr:antlr:jar:2.7.7:compile
[INFO] |  +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.0.1.Final:compile
[INFO] |  +- org.jboss:jandex:jar:2.0.3.Final:compile
[INFO] |  +- com.fasterxml:classmate:jar:1.3.0:compile
[INFO] |  +- org.dom4j:dom4j:jar:2.1.1:compile
[INFO] |  \- org.hibernate.common:hibernate-commons-annotations:jar:5.0.1.Final:compile
[INFO] +- org.hibernate:hibernate-jpamodelgen:jar:5.2.18.Final:compile
[INFO] +- xmlunit:xmlunit:jar:1.4:test
[INFO] +- org.mockito:mockito-all:jar:1.9.5:test
[INFO] +- org.apache.deltaspike.core:deltaspike-core-api:jar:1.5.2:test
[INFO] +- org.apache.deltaspike.core:deltaspike-core-impl:jar:1.5.2:test
[INFO] +- org.apache.deltaspike.cdictrl:deltaspike-cdictrl-owb:jar:1.5.2:test
[INFO] |  \- org.apache.deltaspike.cdictrl:deltaspike-cdictrl-api:jar:1.5.2:test
[INFO] +- org.apache.deltaspike.modules:deltaspike-test-control-module-api:jar:1.5.2:test
[INFO] +- org.apache.deltaspike.modules:deltaspike-test-control-module-impl:jar:1.5.2:test
[INFO] +- org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.14:test
[INFO] |  \- org.apache.tomcat:tomcat-annotations-api:jar:9.0.14:test
[INFO] +- org.apache.tomcat.embed:tomcat-embed-logging-juli:jar:9.0.0.M6:test
[INFO] +- org.apache.tomcat.embed:tomcat-embed-jasper:jar:9.0.14:test
[INFO] |  +- org.apache.tomcat.embed:tomcat-embed-el:jar:9.0.14:test
[INFO] |  \- org.eclipse.jdt:ecj:jar:3.15.0:test
[INFO] +- org.apache.tomcat:tomcat-jasper:jar:9.0.14:test
[INFO] |  +- org.apache.tomcat:tomcat-servlet-api:jar:9.0.14:test
[INFO] |  +- org.apache.tomcat:tomcat-juli:jar:9.0.14:test
[INFO] |  +- org.apache.tomcat:tomcat-el-api:jar:9.0.14:test
[INFO] |  +- org.apache.tomcat:tomcat-api:jar:9.0.14:test
[INFO] |  \- org.apache.tomcat:tomcat-util-scan:jar:9.0.14:test
[INFO] |     \- org.apache.tomcat:tomcat-util:jar:9.0.14:test
[INFO] +- org.apache.tomcat:tomcat-jasper-el:jar:9.0.14:test
[INFO] +- org.apache.tomcat:tomcat-jsp-api:jar:9.0.14:test
[INFO] +- org.awaitility:awaitility:jar:2.0.0:test
[INFO] |  +- cglib:cglib-nodep:jar:3.1:test
[INFO] |  \- org.objenesis:objenesis:jar:2.1:test
[INFO] +- com.companu.rdops.connectors.qc.notifier:qc-notifier-client:jar:1.4.1-1:test
[INFO] \- com.companu.rdops.connectors.qc.notifier:qc-notifier-shared:jar:1.4.1-1:test
[INFO] -
4

0 回答 0