0

我以前工作的小程序现在失败了。我正在使用 Log4J,什么都没有改变,但是它似乎是为JDK 1.3 日志配置的。(搜索 META-INF/services)有什么可以改变的,或者我如何覆盖现在的内容?谢谢你。

network: Connecting http://localhost:8083/10sdaanyd/org/apache/commons/logging/impl/WeakHashtable.class with cookie "blackbird={pos:2,size:1,load:null}; JSESSIONID=4D81E3F41BF95EE15BB2D44F54D837C8"
network: Connecting http://localhost:8083/10sdaanyd/commons-logging.properties with proxy=DIRECT
network: Connecting http://localhost:8083/10sdaanyd/commons-logging.properties with cookie "blackbird={pos:2,size:1,load:null}; JSESSIONID=4D81E3F41BF95EE15BB2D44F54D837C8"
network: Cache entry not found [url: http://localhost:8083/10sdaanyd/META-INF/services/org.apache.commons.logging.LogFactory, version: null]
network: Connecting http://localhost:8083/10sdaanyd/META-INF/services/org.apache.commons.logging.LogFactory with proxy=DIRECT
network: Connecting http://localhost:8083/10sdaanyd/META-INF/services/org.apache.commons.logging.LogFactory with cookie "blackbird={pos:2,size:1,load:null}; JSESSIONID=4D81E3F41BF95EE15BB2D44F54D837C8"
network: Cache entry not found [url: http://localhost:8083/10sdaanyd/org/apache/commons/logging/impl/LogFactoryImpl.class, version: null]
network: Connecting http://localhost:8083/10sdaanyd/org/apache/commons/logging/impl/LogFactoryImpl.class with proxy=DIRECT
network: Connecting http://localhost:8083/10sdaanyd/org/apache/commons/logging/impl/LogFactoryImpl.class with cookie "blackbird={pos:2,size:1,load:null}; JSESSIONID=4D81E3F41BF95EE15BB2D44F54D837C8"

奇怪的是,它正在发出 Log4J 语句直到一行JSONSerializer.toJSON(JSONData00); 然后在公共/日志对象上出错。我正在使用 json-lib-2.4-jdk15.jar。这是对公地/日志记录的要求吗?我该如何停止它,因为它需要不存在且我无法创建的路径。有什么帮助吗?

4

1 回答 1

0

解决了。它需要具有这两个名称/值行的 commons-logging.properties

org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
log4j.configuration=log4j.properties

此外,反常的是 beanutils,特别是 Dynabean。我对此没有明确的方法调用,我相信我可以重构它以消除它。HTH。

于 2013-07-23T16:06:21.460 回答