我正在努力尝试在Hibernate + CDI + Vraptor MVC框架下构建旧的Java Web应用程序。
该应用程序在Wildfly 11上部署为EAR。该存档包含一个带有JAR的WAR文件,如commons-logging。
有人可以提供一些提示吗?问候。
org.jboss.weld.core//org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:88) ... 102 more Caused by: org.apache.commons.discovery.DiscoveryException: Unable to instantiate implementation class for org.apache.commons.logging.LogFactory
java.lang.UnsupportedOperationException at org.jboss.logmanager.commons.logging//org.apache.commons.logging.LogFactory.getClassLoader(LogFactory.java:401) at deployment.kliftEAR.ear.klift.war//org.apache.commons.logging.impl.LogFactoryImpl.getClassLoader(LogFactoryImpl.java:447) at deployment.kliftEAR.ear.klift.war//org.apache.commons.logging.impl.LogFactoryImpl.initDiagnostics(LogFactoryImpl.java:476) at deployment.kliftEAR.ear.klift.war//org.apache.commons.logging.impl.LogFactoryImpl.(LogFactoryImpl.java:95) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source) at java.base/java.lang.Class.newInstance(Unknown Source) at deployment.kliftEAR.ear.klift.war//org.apache.commons.discovery.tools.ClassUtils.newInstance(ClassUtils.java:157) at deployment.kliftEAR.ear.klift.war//org.apache.commons.discovery.tools.SPInterface.newInstance(SPInterface.java:197) at deployment.kliftEAR.ear.klift.war//org.apache.commons.discovery.tools.DiscoverClass.newInstance(DiscoverClass.java:579) at deployment.kliftEAR.ear.klift.war//org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:418) at deployment.kliftEAR.ear.klift.war//org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:378) at deployment.kliftEAR.ear.klift.war//org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:45) at java.base/java.security.AccessController.doPrivileged(Native Method) at deployment.kliftEAR.ear.klift.war//org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:41) at deployment.kliftEAR.ear.klift.war//org.apache.axis.components.logger.LogFactory.(LogFactory.java:33) at deployment.kliftEAR.ear.klift.war//org.apache.axis.handlers.BasicHandler.(BasicHandler.java:43) at deployment.kliftEAR.ear.klift.war//org.apache.axis.client.Service.getAxisClient(Service.java:104) at deployment.kliftEAR.ear.klift.war//org.apache.axis.client.Service.(Service.java:113) at deployment.kliftEAR.ear.klift.war//WSSvm.WSSvmServiceLocator.(WSSvmServiceLocator.java:12) at deployment.kliftEAR.ear.klift.war//br.com.schmersal.svm.klift2.dao.EstruturaDAO.criarEstruturaTOTVS(EstruturaDAO.java:171) at deployment.kliftEAR.ear.klift.war//br.com.schmersal.svm.klift2.controller.antigos.OrcamentoItemPaiController.listaPorOrcamento(OrcamentoItemPaiController.java:94) at deployment.kliftEAR.ear.klift.war//br.com.schmersal.svm.klift2.controller.antigos.OrcamentoItemPaiController$Proxy$_$$_WeldClientProxy.listaPorOrcamento(Unknown Source) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at deployment.kliftEAR.ear.klift.war//net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:38) at deployment.kliftEAR.ear.klift.war//net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.core.DefaultReflectionProvider.invoke(DefaultReflectionProvider.java:42) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.core.DefaultReflectionProvider$Proxy$_$$_WeldClientProxy.invoke(Unknown Source) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.observer.ExecuteMethod$1.call(ExecuteMethod.java:82) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.observer.ExecuteMethod$1.call(ExecuteMethod.java:72) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.core.Try.run(Try.java:18) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.observer.ExecuteMethod.execute(ExecuteMethod.java:72) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at org.jboss.weld.core//org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:88) at org.jboss.weld.core//org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:78) at org.jboss.weld.core//org.jboss.weld.injection.MethodInvocationStrategy$SimpleMethodInvocationStrategy.invoke(MethodInvocationStrategy.java:129) at org.jboss.weld.core//org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:299) at org.jboss.weld.core//org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:277) at org.jboss.weld.core//org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:255) at org.jboss.weld.core//org.jboss.weld.event.ObserverNotifier.notifySyncObservers(ObserverNotifier.java:269) at org.jboss.weld.core//org.jboss.weld.event.ObserverNotifier.notify(ObserverNotifier.java:258) at org.jboss.weld.core//org.jboss.weld.event.EventImpl.fire(EventImpl.java:91) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:78) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor.intercept(ExceptionHandlerInterceptor.java:75) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor$Proxy$_$$_WeldClientProxy.intercept(Unknown Source) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler$1.call(ToInstantiateInterceptorHandler.java:71) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler$1.call(ToInstantiateInterceptorHandler.java:68) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.core.Try.run(Try.java:18) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.executeSafely(ToInstantiateInterceptorHandler.java:68) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:61) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.interceptor.FlashInterceptor.intercept(FlashInterceptor.java:98) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.interceptor.FlashInterceptor$Proxy$_$$_WeldClientProxy.intercept(Unknown Source) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler$1.call(ToInstantiateInterceptorHandler.java:71) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler$1.call(ToInstantiateInterceptorHandler.java:68) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.core.Try.run(Try.java:18) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.executeSafely(ToInstantiateInterceptorHandler.java:68) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:61) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$_$$_WeldClientProxy.next(Unknown Source) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack.next(DefaultSimpleInterceptorStack.java:49) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack$Proxy$_$$_WeldClientProxy.next(Unknown Source) at deployment.kliftEAR.ear.klift.war//br.com.schmersal.svm.klift2.interceptor.LoginInterceptor.intercept(LoginInterceptor.java:34) at deployment.kliftEAR.ear.klift.war//br.com.schmersal.svm.klift2.interceptor.LoginInterceptor$Proxy$_$$_WeldClientProxy.intercept(Unknown Source) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at deployment.kliftEAR.ear.klift.war//net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:38) at deployment.kliftEAR.ear.klift.war//net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.core.DefaultReflectionProvider.invoke(DefaultReflectionProvider.java:42) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.core.DefaultReflectionProvider$Proxy$_$$_WeldClientProxy.invoke(Unknown Source) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.interceptor.StepInvoker.invokeMethod(StepInvoker.java:64) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.interceptor.StepInvoker.tryToInvoke(StepInvoker.java:55) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.interceptor.StepInvoker$Proxy$_$$_WeldClientProxy.tryToInvoke(Unknown Source) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.interceptor.InterceptorExecutor.executeAround(InterceptorExecutor.java:75) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.interceptor.InterceptorExecutor$Proxy$_$$_WeldClientProxy.executeAround(Unknown Source) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.interceptor.AspectStyleInterceptorHandler.execute(AspectStyleInterceptorHandler.java:85) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.core.DefaultInterceptorStack.start(DefaultInterceptorStack.java:93) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$_$$_WeldClientProxy.start(Unknown Source) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.observer.RequestHandlerObserver.handle(RequestHandlerObserver.java:93) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at org.jboss.weld.core//org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:88) at org.jboss.weld.core//org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:78) at org.jboss.weld.core//org.jboss.weld.injection.MethodInvocationStrategy$SimpleMethodInvocationStrategy.invoke(MethodInvocationStrategy.java:129) at org.jboss.weld.core//org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:299) at org.jboss.weld.core//org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:277) at org.jboss.weld.core//org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:255) at org.jboss.weld.core//org.jboss.weld.event.ObserverNotifier.notifySyncObservers(ObserverNotifier.java:269) at org.jboss.weld.core//org.jboss.weld.event.ObserverNotifier.notify(ObserverNotifier.java:258) at org.jboss.weld.core//org.jboss.weld.event.EventImpl.fire(EventImpl.java:91) at deployment.kliftEAR.ear.klift.war//br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:123) at io.undertow.servlet//io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) at io.undertow.servlet//io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) at io.undertow.servlet//io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) at io.undertow.servlet//io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) at io.undertow.servlet//io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) at org.wildfly.extension.undertow//org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78) at io.undertow.core//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at io.undertow.servlet//io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) at io.undertow.servlet//io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) at io.undertow.core//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at io.undertow.core//io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) at io.undertow.servlet//io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) at io.undertow.core//io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) at io.undertow.servlet//io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) at io.undertow.core//io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50) at io.undertow.core//io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) at io.undertow.core//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at org.wildfly.extension.undertow//org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61) at io.undertow.core//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at org.wildfly.extension.undertow//org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68) at io.undertow.core//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at io.undertow.servlet//io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292) at io.undertow.servlet//io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81) at io.undertow.servlet//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138) at io.undertow.servlet//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135) at io.undertow.servlet//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) at io.undertow.servlet//io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) at org.wildfly.extension.undertow//org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105) at org.wildfly.extension.undertow//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508) at org.wildfly.extension.undertow//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508) at org.wildfly.extension.undertow//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508) at org.wildfly.extension.undertow//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508) at io.undertow.servlet//io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272) at io.undertow.servlet//io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) at io.undertow.servlet//io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104) at io.undertow.core//io.undertow.server.Connectors.executeRootHandler(Connectors.java:326) at io.undertow.core//io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:812) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) at deployment.kliftEAR.ear.klift.war//org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:426) at deployment.kliftEAR.ear.klift.war//org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:378) at deployment.kliftEAR.ear.klift.war//org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:45) at java.base/java.security.AccessController.doPrivileged(Native Method) at deployment.kliftEAR.ear.klift.war//org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:41) at deployment.kliftEAR.ear.klift.war//org.apache.axis.components.logger.LogFactory.(LogFactory.java:33) ... 126 more Caused by: java.lang.UnsupportedOperationException at org.jboss.logmanager.commons.logging//org.apache.commons.logging.LogFactory.getClassLoader(LogFactory.java:401) at deployment.kliftEAR.ear.klift.war//org.apache.commons.logging.impl.LogFactoryImpl.getClassLoader(LogFactoryImpl.java:447) at deployment.kliftEAR.ear.klift.war//org.apache.commons.logging.impl.LogFactoryImpl.initDiagnostics(LogFactoryImpl.java:476) at deployment.kliftEAR.ear.klift.war//org.apache.commons.logging.impl.LogFactoryImpl.(LogFactoryImpl.java:95) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source) at java.base/java.lang.Class.newInstance(Unknown Source) at deployment.kliftEAR.ear.klift.war//org.apache.commons.discovery.tools.ClassUtils.newInstance(ClassUtils.java:157) at deployment.kliftEAR.ear.klift.war//org.apache.commons.discovery.tools.SPInterface.newInstance(SPInterface.java:197) at deployment.kliftEAR.ear.klift.war//org.apache.commons.discovery.tools.DiscoverClass.newInstance(DiscoverClass.java:579) at deployment.kliftEAR.ear.klift.war//org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:418) ... 131 more
答案 0 :(得分:4)
Wildfly 11更改与Wildfly 10相关的日志记录模块。
尝试以这种方式恢复Wildfly 10日志记录配置:
<强> 1。复制&#34; jcl-over-slf4j&#34;从Wildfly 10到Wildfly 11的模块
cd /opt/wildfly-11.0.0.Final/modules/system/layers/base/org/slf4j
cp -R /opt/wildfly-10.1.0.Final/modules/system/layers/base/org/slf4j/jcl-over-slf4j。
<强> 2。转到Wildfly 11加载日志记录模块
cd /opt/wildfly-11.0.0.Final/modules/system/layers/base/org/apache/commons/logging/main
第3。加载新模块而不是Wildfly 11默认
vi module.xml
替换
<module name="org.jboss.logmanager.commons.logging" export="true"/>
使用
<module name="org.slf4j.jcl-over-slf4j" export="true"/>
这适合我。
PD:如果你没有Wildfly 10,你可以试试这个:
cd /opt/wildfly-11.0.0.Final/modules/system/layers/base/org/slf4j
mkdir jcl-over-slf4j
mkdir main
cd jcl-over-slf4j / main
vi module.xml
并在新文件中复制:
<module xmlns="urn:jboss:module:1.3" name="org.slf4j.jcl-over-slf4j">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources>
<resource-root path="jcl-over-slf4j-1.7.7.jar"/>
</resources>
<dependencies>
<module name="org.slf4j"/>
</dependencies>
</module>
最后,下载jcl-over-slf4j-1.7.7.jar并移至与module.xml相同的目录
答案 1 :(得分:2)
JBoss EAP服务器中存在类似的错误。原因是战争中捆绑的 commons-logging.jar 与EAP服务器中的模块 org.apache.commons.logging 之间存在库冲突。解决方法是在 WEB-INF 文件夹中添加具有以下内容的文件 jboss-deployment-structure.xml 。这将排除服务器org.apache.commons.logging库,并包括战争中包含的commons-logging.jar库。
<jboss-deployment-structure>
<deployment>
<exclusions>
<module name="org.apache.commons.logging" />
</exclusions>
</deployment>
</jboss-deployment-structure>
答案 2 :(得分:1)
您可以在$ WILDFLY_HOME / modules / system / layers / base / org / jboss / logmanager / commons / logging / main diretory中解决将commons-logging-jboss-logmanager Wildfly模块更新到版本1.0.3.Final的问题。
答案 3 :(得分:0)
从WildFly 10升级到WildFly 11时,我们看到了类似的错误。它似乎与我们的webapp中存在commons-logging.jar有关。您可以尝试删除该jar并看到您已配置为使用WildFly提供的内置日志记录模块。我相信该模块提供了一个工作的commons-logging API。
我们解决了我们的问题,因为我们的网络应用程序不使用内置日志记录模块。我们之前已禁用所有应用的日志记录:
<subsystem xmlns="urn:jboss:domain:logging:3.0">
<!-- allow modules to use alternate logging subsystem -->
<add-logging-api-dependencies value="false"/>
<use-deployment-logging-config value="false"/>
然后我们有了一个带Log4J jar的自定义模块。该模块包括commons日志记录桥log4j-jcl.jar,然后将commons-logging API重定向到log4j 2.