我尝试在OpenShift环境中托管和部署Wildfly 9上的应用程序,但是我在我的机器中卡住,工作正常,但是在OpenShift中, 与Wildlfy版本9一样,下面的错误被抛出,我试图评论de jacksons和resteasy依赖,检查是否是一些 问题,但错误仍然发生,任何知道这个错误是什么意思?
错误:
2015-10-01 12:48:29,601 WARN [org.jboss.as.weld] (ServerService Thread Pool -- 72) WFLYWELD0052: Using deployment classloader to load proxy classes for module org.jbos
s.resteasy.resteasy-jackson2-provider:main. Package-private access will not work. To fix this the module should declare dependencies on [org.jboss.weld.core, org.jboss.
weld.spi]
2015-10-01 12:48:29,797 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 72) MSC000001: Failed to start service jboss.undertow.deployment.default-server
.default-host./sellAppWeb: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./sellAppWeb: com.google.common.util.con
current.ExecutionError: java.lang.LinkageError: loader constraint violation: when resolving overridden method "org.jboss.resteasy.plugins.providers.jackson.ResteasyJack
son2Provider$Proxy$_$$_WeldClientProxy.setDefaultReadView(Ljava/lang/Class;)Lcom/fasterxml/jackson/jaxrs/base/ProviderBase;" the class loader (instance of org/jboss/mod
ules/ModuleClassLoader) of the current class, org/jboss/resteasy/plugins/providers/jackson/ResteasyJackson2Provider$Proxy$_$$_WeldClientProxy, and its superclass loader
(instance of org/jboss/modules/ModuleClassLoader), have different Class objects for the type vider$Proxy$_$$_WeldClientProxy used in the signature
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: com.google.common.util.concurrent.ExecutionError: java.lang.LinkageError: loader constraint violation: when resolving overridden method "org.jboss.resteasy.p
lugins.providers.jackson.ResteasyJackson2Provider$Proxy$_$$_WeldClientProxy.setDefaultReadView(Ljava/lang/Class;)Lcom/fasterxml/jackson/jaxrs/base/ProviderBase;" the cl
ass loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, org/jboss/resteasy/plugins/providers/jackson/ResteasyJackson2Provider$Proxy$_$$_WeldC
lientProxy, and its superclass loader (instance of org/jboss/modules/ModuleClassLoader), have different Class objects for the type vider$Proxy$_$$_WeldClientProxy used
in the signature
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2201)
at com.google.common.cache.LocalCache.get(LocalCache.java:3937)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
at org.jboss.weld.util.cache.LoadingCacheUtils.getCacheValue(LoadingCacheUtils.java:49)
at org.jboss.weld.util.cache.LoadingCacheUtils.getCastCacheValue(LoadingCacheUtils.java:74)
at org.jboss.weld.bean.proxy.ClientProxyProvider.getClientProxy(ClientProxyProvider.java:222)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:755)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:784)
at org.jboss.weld.util.ForwardingBeanManager.getReference(ForwardingBeanManager.java:61)
at org.jboss.weld.bean.builtin.BeanManagerProxy.getReference(BeanManagerProxy.java:85)
at org.jboss.resteasy.cdi.CdiConstructorInjector.construct(CdiConstructorInjector.java:64)
at org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:2211)
at org.jboss.resteasy.spi.ResteasyProviderFactory.addMessageBodyReader(ResteasyProviderFactory.java:784)
at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1402)
at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1346)
at org.jboss.resteasy.plugins.providers.RegisterBuiltin.registerProviders(RegisterBuiltin.java:70)
at org.jboss.resteasy.plugins.providers.RegisterBuiltin.register(RegisterBuiltin.java:31)
at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:221)
at org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap.contextInitialized(ResteasyBootstrap.java:28)
at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173)
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:195)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
... 6 more
与i的依赖关系试图评论,但没有成功:
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson2-provider</artifactId>
<version>3.0.5.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>3.0.10.Final</version>
<scope>provided</scope>
</dependency>
答案 0 :(得分:-1)