简体   繁体   English

无法在Jboss 7中添加resteasy本地模块

[英]Unable to add resteasy local module in Jboss 7

Failed to define class org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap in Module "com.test:main" from local m odule loader @4f4a7090 (finder: local module finder @18ef96 (roots: C:\\DEV\\jboss-eap-7.0.4\\modules,C:\\DEV\\jboss-eap-7.0.4\\modules\\system\\layers\\base.overlays\\layer-base-jboss-eap-7.0.4 .CP,C:\\DEV\\jboss-eap-7.0.4\\modules\\system\\layers\\base)): java.lang.NoClassDefFoundError: Failed to link org/jboss/resteasy/plugins/server/servlet/ResteasyBootstrap (Module "com.test:mai n" from local module loader @4f4a7090 (finder: local module finder @18ef96 (roots: C:\\DEV\\jboss-eap-7.0.4\\modules,C:\\DEV\\jboss-eap-7.0.4\\modules\\system\\layers\\base.overlays\\layer-base- jboss-eap-7.0.4.CP,C:\\DEV\\jboss-eap-7.0.4\\modules\\system\\layers\\base))) 无法从本地模块装载程序@ 4f4a7090(查找器:本地模块查找器@ 18ef96(根:C:\\ DEV \\ jboss)在模块“ com.test:main”中定义类org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap类-eap-7.0.4 \\ modules,C:\\ DEV \\ jboss-eap-7.0.4 \\ modules \\ system \\ layers \\ base.overlays \\ layer-base-jboss-eap-7.0.4 .CP,C:\\ DEV \\\\ jboss-eap-7.0.4 \\ modules \\ system \\ layers \\ base)):java.lang.NoClassDefFoundError:无法链接org / jboss / resteasy / plugins / server / servlet / ResteasyBootstrap(模块“ com.test:mai n来自本地模块加载程序@ 4f4a7090(查找器:本地模块查找器@ 18ef96(根:C:\\ DEV \\ jboss-eap-7.0.4 \\ modules,C:\\ DEV \\ jboss-eap-7.0.4 \\ modules \\ system \\ layers \\ base.overlays \\ layer-base- jboss-eap-7.0.4.CP,C:\\ DEV \\ jboss-eap-7.0.4 \\ modules \\ system \\ layers \\ base)))

09:17:27,157 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."Test.war".POST_M ce.StartException in service jboss.deployment.unit."Test.war".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "Test.war" 09:17:27,157错误[org.jboss.msc.service.fail](MSC服务线程1-2)MSC000001:无法启动服务jboss中的服务jboss.deployment.unit。“ Test.war” .POST_M ce.StartException .deployment.unit。“ Test.war”。POST_MODULE:WFLYSRV0153:无法处理部署“ Test.war”的阶段POST_MODULE

Jboss version 7.0.4 Jboss版本7.0.4

CLI commands used to add the module 用于添加模块的CLI命令

module add --name=com.test --resources=C:\jaxrs-api.jar;C:\resteasy-jaxb-    provider.jar;C:\resteasy-jaxrs.jar;C:\com.common.jar;C:\com.data.jar;

Tried even making it a global module 甚至尝试过使其成为全局模块

/subsystem=ee:write-attribute(name=global-modules,value=[{name=com.test}]

Resteasy jaxrs are part of Jboss 7. Hence there is no explicit need to add rest easy jars as part of WebInf-->lib or as part of module as in lower EAP version's of Jboss. Resteasy jaxrs是Jboss 7的一部分。因此,像在较低EAP版本的Jboss中一样,没有明确需要将rest easy jar作为WebInf-> lib的一部分或作为模块的一部分来添加。

The below url gives the right way to overcome the concern https://docs.jboss.org/author/display/AS7/JAX-RS+Reference+Guide 以下网址提供了解决问题的正确方法https://docs.jboss.org/author/display/AS7/JAX-RS+Reference+Guide

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM