简体   繁体   English

从JBoss 4.2迁移时出现JBoss wildfly 10 NoClassDefFoundError

[英]JBoss wildfly 10 NoClassDefFoundError at migrate from JBoss 4.2

I have a spring mvc application running into JBoss 4.2. 我有一个运行在JBoss 4.2中的spring mvc应用程序。 I'm trying migrate this web app to JBoss wildfly 10 (wildfly-10.0.0.Final version). 我正在尝试将此Web应用程序迁移到JBoss wildfly 10(wildfly-10.0.0.Final版本)。

When I try deploy my app show this error: 当我尝试部署我的应用程序时,显示以下错误:

"{\"WFLYCTL0080: Failed services\" => {\"jboss.deployment.unit.\\\"myApp.war\\\".POST_MODULE\" => \"org.jboss.msc.service.StartException in service jboss.deployment.unit.\\\"myApp.war\\\".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment \\\"myApp.war\\\"
Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class org.ajaxtags.tags.AjaxDisplayTag with ClassLoader ModuleClassLoader for Module \\\"deployment.myApp.war:main\\\" from Service Module Loader
Caused by: java.lang.NoClassDefFoundError: au/id/jericho/lib/html/Segment
Caused by: java.lang.ClassNotFoundException: au.id.jericho.lib.html.Segment from [Module \\\"deployment.myApp.war:main\\\" from Service Module Loader]\"}}"

Looking for the web, I read that I need to load the jar "jericho-html-2.6.1.jar". 在网上寻找,我读到我需要加载jar“ jericho-html-2.6.1.jar”。 To do it, I added in ${wildfly_home}/modules/system/layers/base/au/id/jericho/lib/html/main the jericho-html-2.6.1.jar and this module.xml 为此,我在$ {wildfly_home} / modules / system / layers / base / au / id / jericho / lib / html / main中添加了jericho-html-2.6.1.jar和这个module.xml

<?xml version="1.0" encoding="UTF-8"?>
    <module xmlns="urn:jboss:module:1.1" name="au.id.jericho.lib.html">
    <resources>
        <resource-root path="jericho-html-2.6.1.jar"/>
    </resources>
    <dependencies>
    </dependencies>
</module>

I added the extension in standalone.xml 我在standalone.xml中添加了扩展名

<extension module="au.id.jericho.lib.html"/>

But I get same error. 但是我得到了同样的错误。

Why do you add the extension in standalone.xml ?? 为什么要在standalone.xml中添加扩展名? You should add a WEB-INF/jboss-deployment-structure.xml file to your war with : 您应该使用以下命令将WEB-INF / jboss-deployment-structure.xml文件添加到您的战争中:

<jboss-deployment-structure>
    <deployment>
        <dependencies>
            <module name="au.id.jericho.lib.html" />
        </dependencies>
    </deployment>
</jboss-deployment-structure>

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

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