Wildfly Jboss未找到类定义错误:无法链接组织/jboss/ws/core/jaxws/spi/ProviderImpl的错误

wyyhbhjk  于 2022-11-08  发布在  其他
关注(0)|答案(1)|浏览(256)

目前正在wildlfy 17上部署一个Web应用程序(使用Grails)。WAR得到了部署,但是当我在运行时运行一个特定的操作时,
我收到以下错误(stacktrace已缩小):

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>

在这里,我尝试了排除,资源和依赖项,每一个单独的,但只是在这里简单地结合起来。但他们似乎没有一个为我工作。
添加<module name="org.quartz" />解决了我的石英调度问题,但似乎不适用于这个问题。

vlurs2pr

vlurs2pr1#

发生的事情是wildlfy中已经存在一个名为com.project的模块。
这就是错误的含义--

Failed to link org/jboss/ws/core/jaxws/spi/ProviderImpl (Module "com.project" from local module loader

这意味着“com.project”(在wildlfy和WAR中也有)具有此类,这将导致两个jar都被加载,并且两个相同的类导致NoClassDefFoundError
通过添加,我可以使它工作。现在可以从wildlfy中删除模块,因为它的用户添加了,但在我的情况下,这个模块是其他战争所需要的。所以它需要被排除在所需的战争中,在那里它创建了这个错误。

相关问题