在应用程序war文件的jboss-deployment-structure.xml
中,我已经排除了log4j模块
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
<deployment>
<dependencies>
<module name="oracle" />
</dependencies>
<exclusions>
<module name="org.apache.log4j" />
<module name="org.apache.commons.logging" />
<module name="org.jboss.logging" />
<module name="org.jboss.logging.jul-to-slf4j-stub" />
<module name="org.jboss.logmanager" />
<module name="org.jboss.logmanager.log4j" />
<module name="org.slf4j" />
</exclusions>
</deployment>
</jboss-deployment-structure>
应该没问题,但在部署并启动应用程序时,我收到了这个错误:
21:46:28,661 ERROR [stderr] (MSC service thread 1-1) log4j:ERROR A "org.apache.log4j.RollingFileAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
21:46:28,662 ERROR [stderr] (MSC service thread 1-1) log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
21:46:28,662 ERROR [stderr] (MSC service thread 1-1) log4j:ERROR [ModuleClassLoader for Module "org.jboss.log4j.logmanager:main" from local module loader @656de49c (roots: D:\JAVA\EAP-6.0.0.GA\jboss-eap-6.0\modules)] whereas object of type
21:46:28,662 ERROR [stderr] (MSC service thread 1-1) log4j:ERROR "org.apache.log4j.RollingFileAppender" was loaded by [ModuleClassLoader for Module "deployment.your-application.war:main" from Service Module Loader].
21:46:28,663 ERROR [stderr] (MSC service thread 1-1) log4j:ERROR Could not instantiate appender named "ROL".
这真的很烦人,因为我只是一个好孩子去做它应该做的事情,但是主人jboss只是和我一起玩耍....
任何提示都表示赞赏。