Wildfly Jboss NoClassDefFoundError: Failed to link Error for org/jboss/ws/core/jaxws/spi/ProviderImpl
Wildfly Jboss NoClassDefFoundError: Failed to link Error for org/jboss/ws/core/jaxws/spi/ProviderImpl
目前正致力于在 wildlfy 17 上部署 Web 应用程序(使用 Grails)。
WAR 已部署,但当我 运行 在 运行 执行特定操作时,
我收到以下错误(堆栈跟踪缩小):
WARN [org.jboss.modules.define] (default task-18) Failed to define class org.jboss.ws.core.jaxws.spi.ProviderImpl in Module "com.project" from local module loader @68b6f0d6 (finder: local module finder @4044fb95 (roots: C:\Programs\Wildfly\modules,C:\Programs\Wildfly\modules\system\layers\base)): java.lang.NoClassDefFoundError: Failed to link org/jboss/ws/core/jaxws/spi/ProviderImpl (Module "com.project" from local module loader @68b6f0d6 (finder: local module finder @4044fb95 (roots: C:\IDeaS\CMA\G302\Programs\Wildfly\modules,C:\Programs\Wildfly\modules\system\layers\base))): javax/xml/ws/spi/Provider
ERROR [StackTrace] (default task-18) Full Stack Trace:: javax.xml.ws.WebServiceException: Error while searching for service [javax.xml.ws.spi.Provider]
Caused by: java.lang.NoClassDefFoundError: Failed to link org/jboss/ws/core/jaxws/spi/ProviderImpl (Module "com.project" from local module loader @68b6f0d6 (finder: local module finder @4044fb95 (roots: C:\Programs\Wildfly\modules,C:\Programs\Wildfly\modules\system\layers\base))): javax/xml/ws/spi/Provider
ERROR [StackTrace] (default task-18) Full Stack Trace:: java.lang.NoClassDefFoundError: Failed to link org/jboss/ws/core/jaxws/spi/ProviderImpl (Module "com.project" from local module loader @68b6f0d6 (finder: local module finder @4044fb95 (roots: C:\Programs\Wildfly\modules,C:\Programs\Wildfly\modules\system\layers\base))): javax/xml/ws/spi/Provider
ERROR [StackTrace] (default task-18) Full Stack Trace:: javax.xml.ws.WebServiceException: Error while searching for service [javax.xml.ws.spi.Provider]
Caused by: java.lang.NoClassDefFoundError: Failed to link org/jboss/ws/core/jaxws/spi/ProviderImpl (Module "com.project" from local module loader @68b6f0d6 (finder: local module finder @4044fb95 (roots: C:\Programs\Wildfly\modules,C:\Programs\Wildfly\modules\system\layers\base))): javax/xml/ws/spi/Provider
ERROR [org.grails.web.errors.GrailsExceptionResolver] (default task-18) NoClassDefFoundError occurred when processing request: [POST] /cma/Sql/runQuery
Failed to link org/jboss/ws/core/jaxws/spi/ProviderImpl (Module "com.project" from local module loader @68b6f0d6 (finder: local module finder @4044fb95 (roots: C:\Programs\Wildfly\modules,C:\Programs\Wildfly\modules\system\layers\base))): javax/xml/ws/spi/Provider. Stacktrace follows:: javax.xml.ws.WebServiceException: Error while searching for service [javax.xml.ws.spi.Provider]
Caused by: java.lang.NoClassDefFoundError: Failed to link org/jboss/ws/core/jaxws/spi/ProviderImpl (Module "com.project" from local module loader @68b6f0d6 (finder: local module finder @4044fb95 (roots: C:\Programs\Wildfly\modules,C:\Programs\Wildfly\modules\system\layers\base))): javax/xml/ws/spi/Provider
我已将包含此 类 的 Jar 添加到我的项目中,我已经检查并且这些 类 存在于生成的 WAR 文件中。此外,这些不在 Wildlfy 的模块文件夹中
我已经创建了jboss-deployment-structure.xml:
<?xml version='1.0' encoding='UTF-8'?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<deployment>
<exclusions>
<module name="org.quartz" />
<module name="org.jboss.ws.core" />
</exclusions>
<resources>
<resource-root path="jbossws-client.jar" />
</resources>
<dependencies>
<module name="org.jboss.ws.core" />
</dependencies>
</deployment>
</jboss-deployment-structure>
在这里,我分别尝试了排除、资源和依赖项,但为了简单起见,我只是在这里合并。但是 none 似乎对我有用。
添加 <module name="org.quartz" />
解决了我的 quartz-scheduling 问题,但似乎对这个问题不起作用。
发生的事情是一个名为com.project的模块已经存在于wildlfy中。
这就是错误的意思-
Failed to link org/jboss/ws/core/jaxws/spi/ProviderImpl (Module "com.project" from local module loader
这意味着“com.project”(在 wildlfy 和 WAR 中也是如此)有这个 class 并且这导致两个罐子被加载和两个相同的 classes 导致 NoClassDefFoundError
通过添加我能够让它工作。
现在可以在用户添加时从 wildlfy 中删除模块,但在我的情况下,其他 wars 需要此模块。因此需要在创建此错误所需的 war 处将其排除。
目前正致力于在 wildlfy 17 上部署 Web 应用程序(使用 Grails)。 WAR 已部署,但当我 运行 在 运行 执行特定操作时,
我收到以下错误(堆栈跟踪缩小):
WARN [org.jboss.modules.define] (default task-18) Failed to define class org.jboss.ws.core.jaxws.spi.ProviderImpl in Module "com.project" from local module loader @68b6f0d6 (finder: local module finder @4044fb95 (roots: C:\Programs\Wildfly\modules,C:\Programs\Wildfly\modules\system\layers\base)): java.lang.NoClassDefFoundError: Failed to link org/jboss/ws/core/jaxws/spi/ProviderImpl (Module "com.project" from local module loader @68b6f0d6 (finder: local module finder @4044fb95 (roots: C:\IDeaS\CMA\G302\Programs\Wildfly\modules,C:\Programs\Wildfly\modules\system\layers\base))): javax/xml/ws/spi/Provider
ERROR [StackTrace] (default task-18) Full Stack Trace:: javax.xml.ws.WebServiceException: Error while searching for service [javax.xml.ws.spi.Provider]
Caused by: java.lang.NoClassDefFoundError: Failed to link org/jboss/ws/core/jaxws/spi/ProviderImpl (Module "com.project" from local module loader @68b6f0d6 (finder: local module finder @4044fb95 (roots: C:\Programs\Wildfly\modules,C:\Programs\Wildfly\modules\system\layers\base))): javax/xml/ws/spi/Provider
ERROR [StackTrace] (default task-18) Full Stack Trace:: java.lang.NoClassDefFoundError: Failed to link org/jboss/ws/core/jaxws/spi/ProviderImpl (Module "com.project" from local module loader @68b6f0d6 (finder: local module finder @4044fb95 (roots: C:\Programs\Wildfly\modules,C:\Programs\Wildfly\modules\system\layers\base))): javax/xml/ws/spi/Provider
ERROR [StackTrace] (default task-18) Full Stack Trace:: javax.xml.ws.WebServiceException: Error while searching for service [javax.xml.ws.spi.Provider]
Caused by: java.lang.NoClassDefFoundError: Failed to link org/jboss/ws/core/jaxws/spi/ProviderImpl (Module "com.project" from local module loader @68b6f0d6 (finder: local module finder @4044fb95 (roots: C:\Programs\Wildfly\modules,C:\Programs\Wildfly\modules\system\layers\base))): javax/xml/ws/spi/Provider
ERROR [org.grails.web.errors.GrailsExceptionResolver] (default task-18) NoClassDefFoundError occurred when processing request: [POST] /cma/Sql/runQuery
Failed to link org/jboss/ws/core/jaxws/spi/ProviderImpl (Module "com.project" from local module loader @68b6f0d6 (finder: local module finder @4044fb95 (roots: C:\Programs\Wildfly\modules,C:\Programs\Wildfly\modules\system\layers\base))): javax/xml/ws/spi/Provider. Stacktrace follows:: javax.xml.ws.WebServiceException: Error while searching for service [javax.xml.ws.spi.Provider]
Caused by: java.lang.NoClassDefFoundError: Failed to link org/jboss/ws/core/jaxws/spi/ProviderImpl (Module "com.project" from local module loader @68b6f0d6 (finder: local module finder @4044fb95 (roots: C:\Programs\Wildfly\modules,C:\Programs\Wildfly\modules\system\layers\base))): javax/xml/ws/spi/Provider
我已将包含此 类 的 Jar 添加到我的项目中,我已经检查并且这些 类 存在于生成的 WAR 文件中。此外,这些不在 Wildlfy 的模块文件夹中
我已经创建了jboss-deployment-structure.xml:
<?xml version='1.0' encoding='UTF-8'?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<deployment>
<exclusions>
<module name="org.quartz" />
<module name="org.jboss.ws.core" />
</exclusions>
<resources>
<resource-root path="jbossws-client.jar" />
</resources>
<dependencies>
<module name="org.jboss.ws.core" />
</dependencies>
</deployment>
</jboss-deployment-structure>
在这里,我分别尝试了排除、资源和依赖项,但为了简单起见,我只是在这里合并。但是 none 似乎对我有用。
添加 <module name="org.quartz" />
解决了我的 quartz-scheduling 问题,但似乎对这个问题不起作用。
发生的事情是一个名为com.project的模块已经存在于wildlfy中。
这就是错误的意思-
Failed to link org/jboss/ws/core/jaxws/spi/ProviderImpl (Module "com.project" from local module loader
这意味着“com.project”(在 wildlfy 和 WAR 中也是如此)有这个 class 并且这导致两个罐子被加载和两个相同的 classes 导致 NoClassDefFoundError
通过添加我能够让它工作。 现在可以在用户添加时从 wildlfy 中删除模块,但在我的情况下,其他 wars 需要此模块。因此需要在创建此错误所需的 war 处将其排除。