在jboss-deployment-structure.xml
应用程序war文件中,我排除了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大师只是在和我开玩笑......
任何提示表示赞赏。