當我部署我在JBOSS EAP6.4戰爭,我得到下面有我的類路徑傑克遜映射器,asl.1.9.2.jar和設置在部署結構讀取的錯誤inspite的NoClassDefFoundError在JBOSS EAP6.4
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="deploy" />
<module name="org.codehaus.jackson.jackson-mapper-asl" />
</dependencies>
</deployment>
</jboss-deployment-structure>
下面是日誌棧
Thread-11733 2016-09-12 06:12:10,169 | WARN | session= | user= | org.hornetq.jms.client | HQ122001: Unhandled exception thrown from onMessage: java.lang.RuntimeException: java.lang.LinkageError: Failed to link com/sun/jersey/api/json/JSONWithPadding (Module "deploy:main" from local module loader @ed17bee (finder: local module finder @2a33fae0 (roots: /vend/hybris/jboss/jboss-eap-6.4/modules,/vend/hybris/jboss/jboss-eap-6.4/modules/system/layers/base/.overlays/BZ1281963,/vend/hybris/jboss/jboss-eap-6.4/modules/system/layers/base,/vend/hybris/OTMM16/Media-Manager/mediamanagement,/vend/hybris/OTMM16/Media-Manager/mediamanagement)))
at com.artesia.event.services.EventListenerManager$EventListenerWrapper.onMessage(EventListenerManager.java:101)
at org.hornetq.jms.client.JMSMessageListenerWrapper.onMessage(JMSMessageListenerWrapper.java:98)
at org.hornetq.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:1117)
at org.hornetq.core.client.impl.ClientConsumerImpl.access$500(ClientConsumerImpl.java:57)
at org.hornetq.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:1252)
at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:105)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.LinkageError: Failed to link com/sun/jersey/api/json/JSONWithPadding (Module "deploy:main" from local module loader @ed17bee (finder: local module finder @2a33fae0 (roots: /vend/hybris/jboss/jboss-eap-6.4/modules,/vend/hybris/jboss/jboss-eap-6.4/modules/system/layers/base/.overlays/BZ1281963,/vend/hybris/jboss/jboss-eap-6.4/modules/system/layers/base,/vend/hybris/OTMM16/Media-Manager/mediamanagement,/vend/hybris/OTMM16/Media-Manager/mediamanagement)))
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:487)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:277)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:92)
at org.jboss.modules.Module.loadModuleClass(Module.java:568)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.getDeclaredMethods(Class.java:1975)
at com.sun.jersey.core.reflection.MethodList.getAllDeclaredMethods(MethodList.java:70)
at com.sun.jersey.core.reflection.MethodList.<init>(MethodList.java:64)
at com.sun.jersey.core.spi.component.ComponentConstructor.getPostConstructMethods(ComponentConstructor.java:132)
at com.sun.jersey.core.spi.component.ComponentConstructor.<init>(ComponentConstructor.java:124)
at com.sun.jersey.core.spi.component.ProviderFactory.__getComponentProvider(ProviderFactory.java:165)
at com.sun.jersey.core.spi.component.ProviderFactory.getComponentProvider(ProviderFactory.java:137)
at com.sun.jersey.core.spi.component.ProviderServices.getComponent(ProviderServices.java:283)
at com.sun.jersey.core.spi.component.ProviderServices.getServices(ProviderServices.java:163)
at com.sun.jersey.core.spi.factory.MessageBodyFactory.initWriters(MessageBodyFactory.java:207)
at com.sun.jersey.core.spi.factory.MessageBodyFactory.init(MessageBodyFactory.java:163)
at com.sun.jersey.api.client.Client.init(Client.java:343)
at com.sun.jersey.api.client.Client.access$000(Client.java:119)
at com.sun.jersey.api.client.Client$1.f(Client.java:192)
at com.sun.jersey.api.client.Client$1.f(Client.java:188)
at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
at com.sun.jersey.api.client.Client.<init>(Client.java:188)
at com.sun.jersey.api.client.Client.<init>(Client.java:171)
at com.microsoft.windowsazure.core.pipeline.jersey.Exports$3.create(Exports.java:81)
at com.microsoft.windowsazure.core.pipeline.jersey.Exports$3.create(Exports.java:65)
at com.microsoft.windowsazure.core.DefaultBuilder.build(DefaultBuilder.java:200)
at com.microsoft.windowsazure.core.DefaultBuilder$1.create(DefaultBuilder.java:138)
at com.microsoft.windowsazure.core.DefaultBuilder.build(DefaultBuilder.java:200)
at com.microsoft.windowsazure.core.DefaultBuilder$1.create(DefaultBuilder.java:138)
at com.microsoft.windowsazure.core.DefaultBuilder.build(DefaultBuilder.java:200)
at com.microsoft.windowsazure.Configuration.create(Configuration.java:119)
at com.microsoft.windowsazure.services.media.MediaService.create(MediaService.java:47)
at com.example.AzureAPIProxy.getMediaService(AzureAPIProxy.java:250)
at com.artesia.event.services.EventListenerManager$EventListenerWrapper.onMessage(EventListenerManager.java:85)
... 8 more
Caused by: java.lang.NoClassDefFoundError: org/codehaus/jackson/map/JsonSerializableWithType
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:361)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:482)
... 51 more
Caused by: java.lang.ClassNotFoundException: org.codehaus.jackson.map.JsonSerializableWithType from [Module "deploy:main" from local module loader @ed17bee (finder: local module finder @2a33fae0 (roots: /vend/hybris/jboss/jboss-eap-6.4/modules,/vend/hybris/jboss/jboss-eap-6.4/modules/system/layers/base/.overlays/BZ1281963,/vend/hybris/jboss/jboss-eap-6.4/modules/system/layers/base,/vend/hybris/OTMM16/Media-Manager/mediamanagement,/vend/hybris/OTMM16/Media-Manager/mediamanagement))]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134)
... 55 more
如何解決這個問題?
我們已經在其他位置創建了部署文件夾,我們正在項目中引用它。在添加與Jackson jar相關的代碼之前,它會在運行時加載jar並按預期工作。只有在添加與傑克遜相關的代碼之後,它纔會向我們拋出錯誤。 – rajadilipkolli
部署文件夾正在使用我們使用的第三方應用程序,並且我們正在從該應用程序接收所需的jar文件 – rajadilipkolli
因此,您還有一個外部模塊(在JBoss之外)文件夾嗎? – CoolBeans