JBOSS升级,观看了许多有关如何升级我的Java 7应用程序在JBOSS上运行的Java 7应用程序的教程,为7.1.1决赛到Java 8在JBOSS EAP 7.4上运行

发布于 2025-02-11 00:48:57 字数 17518 浏览 2 评论 0原文

我在服务器控制台(JBOSS EAP 7.4)中看到以下错误:

15:01:33,147 ERROR [stderr] (ServerService Thread Pool -- 73) java.lang.UnsupportedOperationException: The default implementation must override this method
15:01:33,148 ERROR [stderr] (ServerService Thread Pool -- 73)   at javax.faces.render.RenderKit.addClientBehaviorRenderer(RenderKit.java:239)
15:01:33,160 ERROR [stderr] (ServerService Thread Pool -- 73)   at com.sun.faces.config.processor.RenderKitConfigProcessor.addClientBehaviorRenderers(RenderKitConfigProcessor.java:338)
15:01:33,167 ERROR [stderr] (ServerService Thread Pool -- 73)   at com.sun.faces.config.processor.RenderKitConfigProcessor.process(RenderKitConfigProcessor.java:179)
15:01:33,185 ERROR [stderr] (ServerService Thread Pool -- 73)   at com.sun.faces.config.ConfigManager.lambda$initialize$1(ConfigManager.java:325)
15:01:33,190 ERROR [stderr] (ServerService Thread Pool -- 73)   at java.util.Iterator.forEachRemaining(Iterator.java:116)
15:01:33,191 ERROR [stderr] (ServerService Thread Pool -- 73)   at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
15:01:33,192 ERROR [stderr] (ServerService Thread Pool -- 73)   at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
15:01:33,192 ERROR [stderr] (ServerService Thread Pool -- 73)   at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:308)
15:01:33,193 ERROR [stderr] (ServerService Thread Pool -- 73)   at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:207)
15:01:33,193 ERROR [stderr] (ServerService Thread Pool -- 73)   at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187)
15:01:33,194 ERROR [stderr] (ServerService Thread Pool -- 73)   at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:219)
15:01:33,200 ERROR [stderr] (ServerService Thread Pool -- 73)   at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:187)
15:01:33,201 ERROR [stderr] (ServerService Thread Pool -- 73)   at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
15:01:33,202 ERROR [stderr] (ServerService Thread Pool -- 73)   at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
15:01:33,212 ERROR [stderr] (ServerService Thread Pool -- 73)   at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
15:01:33,212 ERROR [stderr] (ServerService Thread Pool -- 73)   at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
15:01:33,213 ERROR [stderr] (ServerService Thread Pool -- 73)   at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
15:01:33,214 ERROR [stderr] (ServerService Thread Pool -- 73)   at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
15:01:33,214 ERROR [stderr] (ServerService Thread Pool -- 73)   at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
15:01:33,215 ERROR [stderr] (ServerService Thread Pool -- 73)   at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:255)
15:01:33,216 ERROR [stderr] (ServerService Thread Pool -- 73)   at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:96)
15:01:33,226 ERROR [stderr] (ServerService Thread Pool -- 73)   at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:78)
15:01:33,227 ERROR [stderr] (ServerService Thread Pool -- 73)   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
15:01:33,227 ERROR [stderr] (ServerService Thread Pool -- 73)   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
15:01:33,228 ERROR [stderr] (ServerService Thread Pool -- 73)   at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
15:01:33,228 ERROR [stderr] (ServerService Thread Pool -- 73)   at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
15:01:33,228 ERROR [stderr] (ServerService Thread Pool -- 73)   at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
15:01:33,229 ERROR [stderr] (ServerService Thread Pool -- 73)   at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
15:01:33,230 ERROR [stderr] (ServerService Thread Pool -- 73)   at java.lang.Thread.run(Thread.java:748)
15:01:33,231 ERROR [stderr] (ServerService Thread Pool -- 73)   at org.jboss.threads.JBossThread.run(JBossThread.java:513)

这是一个旧应用程序,并竭尽全力最终查看登录页面。现在累了,但是任何指示都将不胜感激。我很高兴提供您需要帮助我解决此问题所需的文件。我已经设法将迁移工具用于Java应用程序,并在如何解决遇到的每个问题时学习。

更新:

我缩小了问题的根源。 旧服务器JBOSS-AS-7.1>>模块>> com>> sun>> jsf-impl>>主文件夹 只有一个文件JSF-IMPL-2.1.7-JBOSSOR-2.JAR 使用模块XML

<module xmlns="urn:jboss:module:1.1" name="com.sun.jsf-impl">
    <properties>
        <property name="jboss.api" value="private"/>
    </properties>

    <dependencies>
        <module name="javax.faces.api"/>
        <module name="javaee.api"/>
        <module name="javax.servlet.jstl.api"/>
        <module name="org.apache.xerces" services="import"/>
        <module name="org.apache.xalan" services="import"/>
    </dependencies>

    <resources>
        <resource-root path="jsf-impl-2.1.7-jbossorg-2.jar"/>
        <!-- Insert resources here -->
    </resources>
</module>

新服务器JBOSS EAP 7.4模块&gt; ...&gt;&gt;主文件夹具有2个JARS,JSF-IMPL-2.1.7-JBOSSORG-2.JAR和JSF-IMPL-2.3.14.SP04-REDHAT-00001.JAR,

带有Module.xml,

<module name="com.sun.jsf-impl" xmlns="urn:jboss:module:1.9">

    <properties>
        <property name="jboss.api" value="private"/>
    </properties>

    <dependencies>
        <module name="java.desktop"/>
        <module name="java.logging"/>
        <module name="java.naming"/>
        <module name="java.sql"/>
        <module name="javax.faces.api"/>
        <module name="javax.annotation.api"/>
        <module name="javax.servlet.api"/>
        <module name="javax.servlet.jsp.api"/>
        <module name="javax.websocket.api"/>
        <module name="javax.validation.api"/>
        <module name="javax.json.api"/>
        <module name="javax.ejb.api"/>
        <module name="javax.xml.bind.api"/>
        <module name="org.glassfish.jakarta.el"/>
        <!--WFLY-14219 Remove deprecated <module name="javax.api"/> -->
        <module name="javax.servlet.jstl.api"/>
        <module name="org.apache.xerces" services="import"/>
        <module name="org.apache.xalan" services="import"/>
        <module name="org.jboss.weld.core"/>
        <module name="org.jboss.weld.spi"/>
        <module name="java.xml"/>
    </dependencies>

    <resources>
         <resource-root path="jsf-impl-2.3.14.SP04-redhat-00001.jar"/>
    </resources>
</module>

因此当我更换

资源 - 根 - root Path =“ JSF-IMPL-2.3.14.SP04-REDHAT-00001.JAR”

在新服务器中,jsf-impl

带有资源 - 根路径=” JSF-IMPL-2.1.7-JBOSSORG-2.JAR

//试图降低成绩JAR版本。

我看到下面的例外,部署失败

11:12:26,366 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 81) MSC000001: Failed to start service jboss.deployment.subunit."EOS.ear"."EOSWeb.war".undertow-deployment: org.jboss.msc.service.StartException in service jboss.deployment.subunit."EOS.ear"."EOSWeb.war".undertow-deployment: java.lang.NoSuchMethodError: 'java.lang.ClassLoader com.sun.faces.util.Util.getContextClassLoader2()'
        at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:81)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at [email protected]//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
        at [email protected]//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
        at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
        at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
        at java.base/java.lang.Thread.run(Thread.java:829)
        at [email protected]//org.jboss.threads.JBossThread.run(JBossThread.java:513)
Caused by: java.lang.NoSuchMethodError: 'java.lang.ClassLoader com.sun.faces.util.Util.getContextClassLoader2()'
        at [email protected]//javax.faces.CurrentThreadToServletContext.getFactoryFinder(CurrentThreadToServletContext.java:59)
        at [email protected]//javax.faces.FactoryFinder.getFactory(FactoryFinder.java:273)
        at [email protected]//javax.faces.context.FacesContext.getCurrentInstance(FacesContext.java:953)
        at com.sun.jsf-impl//com.sun.faces.config.InitFacesContext.<init>(InitFacesContext.java:97)
        at com.sun.jsf-impl//com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:154)
        at [email protected]//io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187)
        at [email protected]//io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:219)
        at [email protected]//io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:187)
        at [email protected]//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
        at [email protected]//io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
        at [email protected]//org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
        at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
        at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
        at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
        at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
        at [email protected]//io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:255)
        at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:96)
        at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:78)
        ... 8 more

11:12:26,397 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "EOS.ear")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.subunit.\"EOS.ear\".\"EOSWeb.war\".undertow-deployment" => "java.lang.NoSuchMethodError: 'java.lang.ClassLoader com.sun.faces.util.Util.getContextClassLoader2()'
    Caused by: java.lang.NoSuchMethodError: 'java.lang.ClassLoader com.sun.faces.util.Util.getContextClassLoader2()'"}}

Env变量:Java Home指向JDK1.8.0_202 旧服务器版本:JBOSS-AS-7.1.1.-Final 新服务器版本:JBOSS-EAP-7.4.0 JBoss-Deployment structure.xml

<?xml version="1.0"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">
    <deployment>
        <dependencies>
            <module name="com.sun.jsf-impl" slot="1.2" />
            <module name="javax.faces.api" slot="1.2" />
        </dependencies>
        <exclusions>
            <module name="com.sun.jsf-impl" slot="main" />
            <module name="javax.faces.api" slot="main" />
        </exclusions>
    </deployment>

    <sub-deployment name="EOSWeb.war">
        <dependencies>
            <module name="com.sun.jsf-impl" slot="1.2" />
            <module name="javax.faces.api" slot="1.2" />
        </dependencies>
        <exclusions>
            <module name="com.sun.jsf-impl" slot="main" />
            <module name="javax.faces.api" slot="main" />        
        </exclusions>
    </sub-deployment>
</jboss-deployment-structure>

让我知道是否需要更多信息。

I am seeing the error below in the server console (JBoss eap 7.4):

15:01:33,147 ERROR [stderr] (ServerService Thread Pool -- 73) java.lang.UnsupportedOperationException: The default implementation must override this method
15:01:33,148 ERROR [stderr] (ServerService Thread Pool -- 73)   at javax.faces.render.RenderKit.addClientBehaviorRenderer(RenderKit.java:239)
15:01:33,160 ERROR [stderr] (ServerService Thread Pool -- 73)   at com.sun.faces.config.processor.RenderKitConfigProcessor.addClientBehaviorRenderers(RenderKitConfigProcessor.java:338)
15:01:33,167 ERROR [stderr] (ServerService Thread Pool -- 73)   at com.sun.faces.config.processor.RenderKitConfigProcessor.process(RenderKitConfigProcessor.java:179)
15:01:33,185 ERROR [stderr] (ServerService Thread Pool -- 73)   at com.sun.faces.config.ConfigManager.lambda$initialize$1(ConfigManager.java:325)
15:01:33,190 ERROR [stderr] (ServerService Thread Pool -- 73)   at java.util.Iterator.forEachRemaining(Iterator.java:116)
15:01:33,191 ERROR [stderr] (ServerService Thread Pool -- 73)   at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
15:01:33,192 ERROR [stderr] (ServerService Thread Pool -- 73)   at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
15:01:33,192 ERROR [stderr] (ServerService Thread Pool -- 73)   at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:308)
15:01:33,193 ERROR [stderr] (ServerService Thread Pool -- 73)   at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:207)
15:01:33,193 ERROR [stderr] (ServerService Thread Pool -- 73)   at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187)
15:01:33,194 ERROR [stderr] (ServerService Thread Pool -- 73)   at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:219)
15:01:33,200 ERROR [stderr] (ServerService Thread Pool -- 73)   at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:187)
15:01:33,201 ERROR [stderr] (ServerService Thread Pool -- 73)   at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
15:01:33,202 ERROR [stderr] (ServerService Thread Pool -- 73)   at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
15:01:33,212 ERROR [stderr] (ServerService Thread Pool -- 73)   at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
15:01:33,212 ERROR [stderr] (ServerService Thread Pool -- 73)   at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
15:01:33,213 ERROR [stderr] (ServerService Thread Pool -- 73)   at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
15:01:33,214 ERROR [stderr] (ServerService Thread Pool -- 73)   at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
15:01:33,214 ERROR [stderr] (ServerService Thread Pool -- 73)   at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
15:01:33,215 ERROR [stderr] (ServerService Thread Pool -- 73)   at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:255)
15:01:33,216 ERROR [stderr] (ServerService Thread Pool -- 73)   at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:96)
15:01:33,226 ERROR [stderr] (ServerService Thread Pool -- 73)   at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:78)
15:01:33,227 ERROR [stderr] (ServerService Thread Pool -- 73)   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
15:01:33,227 ERROR [stderr] (ServerService Thread Pool -- 73)   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
15:01:33,228 ERROR [stderr] (ServerService Thread Pool -- 73)   at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
15:01:33,228 ERROR [stderr] (ServerService Thread Pool -- 73)   at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
15:01:33,228 ERROR [stderr] (ServerService Thread Pool -- 73)   at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
15:01:33,229 ERROR [stderr] (ServerService Thread Pool -- 73)   at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
15:01:33,230 ERROR [stderr] (ServerService Thread Pool -- 73)   at java.lang.Thread.run(Thread.java:748)
15:01:33,231 ERROR [stderr] (ServerService Thread Pool -- 73)   at org.jboss.threads.JBossThread.run(JBossThread.java:513)

This is a legacy application and took lots of effort to finally see the sign-in page. Getting tired now, but any pointers would be appreciated. I am happy to provide the files you need to help me resolve this issue. I have managed to use the migration tool for java applications and learn as I go how to resolve each issue I encounter.

Update:

I narrowed down the root of the problem.
old server JBoss-as-7.1 >> modules >> com >> sun >> jsf-impl >> main folder
has only one file jsf-impl-2.1.7-jbossor-2.jar
with module XML

<module xmlns="urn:jboss:module:1.1" name="com.sun.jsf-impl">
    <properties>
        <property name="jboss.api" value="private"/>
    </properties>

    <dependencies>
        <module name="javax.faces.api"/>
        <module name="javaee.api"/>
        <module name="javax.servlet.jstl.api"/>
        <module name="org.apache.xerces" services="import"/>
        <module name="org.apache.xalan" services="import"/>
    </dependencies>

    <resources>
        <resource-root path="jsf-impl-2.1.7-jbossorg-2.jar"/>
        <!-- Insert resources here -->
    </resources>
</module>

new server JBoss EAP 7.4 modules >>... >> main folder has 2 jars, jsf-impl-2.1.7-jbossorg-2.jar and jsf-impl-2.3.14.SP04-redhat-00001.jar

with module.xml

<module name="com.sun.jsf-impl" xmlns="urn:jboss:module:1.9">

    <properties>
        <property name="jboss.api" value="private"/>
    </properties>

    <dependencies>
        <module name="java.desktop"/>
        <module name="java.logging"/>
        <module name="java.naming"/>
        <module name="java.sql"/>
        <module name="javax.faces.api"/>
        <module name="javax.annotation.api"/>
        <module name="javax.servlet.api"/>
        <module name="javax.servlet.jsp.api"/>
        <module name="javax.websocket.api"/>
        <module name="javax.validation.api"/>
        <module name="javax.json.api"/>
        <module name="javax.ejb.api"/>
        <module name="javax.xml.bind.api"/>
        <module name="org.glassfish.jakarta.el"/>
        <!--WFLY-14219 Remove deprecated <module name="javax.api"/> -->
        <module name="javax.servlet.jstl.api"/>
        <module name="org.apache.xerces" services="import"/>
        <module name="org.apache.xalan" services="import"/>
        <module name="org.jboss.weld.core"/>
        <module name="org.jboss.weld.spi"/>
        <module name="java.xml"/>
    </dependencies>

    <resources>
         <resource-root path="jsf-impl-2.3.14.SP04-redhat-00001.jar"/>
    </resources>
</module>

So when I replaced the

resource-root path="jsf-impl-2.3.14.SP04-redhat-00001.jar"

in the new server jsf-impl

with resource-root path="jsf-impl-2.1.7-jbossorg-2.jar"

//Trying to down grade the jar version.

I see the exception below and the deployment fails

11:12:26,366 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 81) MSC000001: Failed to start service jboss.deployment.subunit."EOS.ear"."EOSWeb.war".undertow-deployment: org.jboss.msc.service.StartException in service jboss.deployment.subunit."EOS.ear"."EOSWeb.war".undertow-deployment: java.lang.NoSuchMethodError: 'java.lang.ClassLoader com.sun.faces.util.Util.getContextClassLoader2()'
        at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:81)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at [email protected]//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
        at [email protected]//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
        at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
        at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
        at java.base/java.lang.Thread.run(Thread.java:829)
        at [email protected]//org.jboss.threads.JBossThread.run(JBossThread.java:513)
Caused by: java.lang.NoSuchMethodError: 'java.lang.ClassLoader com.sun.faces.util.Util.getContextClassLoader2()'
        at [email protected]//javax.faces.CurrentThreadToServletContext.getFactoryFinder(CurrentThreadToServletContext.java:59)
        at [email protected]//javax.faces.FactoryFinder.getFactory(FactoryFinder.java:273)
        at [email protected]//javax.faces.context.FacesContext.getCurrentInstance(FacesContext.java:953)
        at com.sun.jsf-impl//com.sun.faces.config.InitFacesContext.<init>(InitFacesContext.java:97)
        at com.sun.jsf-impl//com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:154)
        at [email protected]//io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187)
        at [email protected]//io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:219)
        at [email protected]//io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:187)
        at [email protected]//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
        at [email protected]//io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
        at [email protected]//org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
        at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
        at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
        at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
        at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
        at [email protected]//io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:255)
        at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:96)
        at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:78)
        ... 8 more

11:12:26,397 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "EOS.ear")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.subunit.\"EOS.ear\".\"EOSWeb.war\".undertow-deployment" => "java.lang.NoSuchMethodError: 'java.lang.ClassLoader com.sun.faces.util.Util.getContextClassLoader2()'
    Caused by: java.lang.NoSuchMethodError: 'java.lang.ClassLoader com.sun.faces.util.Util.getContextClassLoader2()'"}}

Env variable: Java home points to jdk1.8.0_202
Old server version: jboss-as-7.1.1.Final
New server version: jboss-eap-7.4.0
jboss-deployment-structure.xml

<?xml version="1.0"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">
    <deployment>
        <dependencies>
            <module name="com.sun.jsf-impl" slot="1.2" />
            <module name="javax.faces.api" slot="1.2" />
        </dependencies>
        <exclusions>
            <module name="com.sun.jsf-impl" slot="main" />
            <module name="javax.faces.api" slot="main" />
        </exclusions>
    </deployment>

    <sub-deployment name="EOSWeb.war">
        <dependencies>
            <module name="com.sun.jsf-impl" slot="1.2" />
            <module name="javax.faces.api" slot="1.2" />
        </dependencies>
        <exclusions>
            <module name="com.sun.jsf-impl" slot="main" />
            <module name="javax.faces.api" slot="main" />        
        </exclusions>
    </sub-deployment>
</jboss-deployment-structure>

let me know if more info is needed.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

空城之時有危險 2025-02-18 00:48:57

找到答案: this and

“今天,我快到了。谢谢大家

Found the answer: this and here

I still have work to do to upgrade this application but considering the successful database connection that was made today, I am nearly there. Thanks everyone

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文