LogKit一执行就报错
Gemini.Liu 发布于102月前 1答/2087阅

使用job时。LogKit一运行就报这个错

@Override

public void execute(JobExecutionContext context) throws JobExecutionException {

String name = this.getClass().getName();

LogKit.info("Job Start:" + name);

try {

// 业务处理

process(context);

} catch (Exception e) {

LogKit.info("业务执行异常:", e);

}

LogKit.info("Job End:" + name);

 }


根据网上说的是log4j重复加载了,在配置文件里加了下面的也不行

log4j.ignoreTCL=true

 

报错如下

log4j:ERROR A "org.apache.log4j.xml.DOMConfigurator" object is not assignable to a "org.apache.log4j.spi.Configurator" variable.

log4j:ERROR The class "org.apache.log4j.spi.Configurator" was loaded by 

log4j:ERROR [org.apache.catalina.loader.StandardClassLoader@1c4ecb7] whereas object of type 

log4j:ERROR "org.apache.log4j.xml.DOMConfigurator" was loaded by [WebappClassLoader

  context: 

  delegate: false

  repositories:

    /WEB-INF/classes/

----------> Parent Classloader:

org.apache.catalina.loader.StandardClassLoader@1c4ecb7

].

log4j:ERROR Could not instantiate configurator [org.apache.log4j.xml.DOMConfigurator].

log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).

log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).

log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).

log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).

log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).

log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).

log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).

log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).

log4j:WARN Please initialize the log4j system properly.

log4j:WARN Please initialize the log4j system properly.

log4j:WARN Please initialize the log4j system properly.

log4j:WARN Please initialize the log4j system properly.

log4j:WARN Please initialize the log4j system properly.

log4j:WARN Please initialize the log4j system properly.

log4j:WARN Please initialize the log4j system properly.

log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).

log4j:WARN Please initialize the log4j system properly.

log4j:WARN Please initialize the log4j system properly.


[沙发] Jieven
你本地是否变更过环境,或者调整过引用,或者你去群里问问其它小伙伴是否有遇到跟你一样的问题,如果你找到人和你情况一下,请QQ私聊我解决!
最佳
提交评论