jboss升级,看了很多教程,关于如何将我在jboss上运行的java 7应用程序作为7. 1. 1 final升级到在jboss eap 7. 4上运行的java 8

axr492tv  于 2022-11-08  发布在  Java
关注(0)|答案(1)|浏览(194)

我在服务器控制台(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模块〉〉〉〉主文件夹有两个jar文件夹,分别是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>

所以当我把
资源根目录路径=“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 org.wildfly.extension.undertow@7.4.0.GA-redhat-00005//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 org.jboss.threads@2.4.0.Final-redhat-00001//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
        at org.jboss.threads@2.4.0.Final-redhat-00001//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
        at org.jboss.threads@2.4.0.Final-redhat-00001//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
        at org.jboss.threads@2.4.0.Final-redhat-00001//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
        at java.base/java.lang.Thread.run(Thread.java:829)
        at org.jboss.threads@2.4.0.Final-redhat-00001//org.jboss.threads.JBossThread.run(JBossThread.java:513)
Caused by: java.lang.NoSuchMethodError: 'java.lang.ClassLoader com.sun.faces.util.Util.getContextClassLoader2()'
        at javax.faces.api@3.0.0.SP04-redhat-00001//javax.faces.CurrentThreadToServletContext.getFactoryFinder(CurrentThreadToServletContext.java:59)
        at javax.faces.api@3.0.0.SP04-redhat-00001//javax.faces.FactoryFinder.getFactory(FactoryFinder.java:273)
        at javax.faces.api@3.0.0.SP04-redhat-00001//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 io.undertow.servlet@2.2.5.Final-redhat-00001//io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187)
        at io.undertow.servlet@2.2.5.Final-redhat-00001//io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:219)
        at io.undertow.servlet@2.2.5.Final-redhat-00001//io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:187)
        at io.undertow.servlet@2.2.5.Final-redhat-00001//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
        at io.undertow.servlet@2.2.5.Final-redhat-00001//io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
        at org.wildfly.extension.undertow@7.4.0.GA-redhat-00005//org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
        at org.wildfly.extension.undertow@7.4.0.GA-redhat-00005//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
        at org.wildfly.extension.undertow@7.4.0.GA-redhat-00005//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
        at org.wildfly.extension.undertow@7.4.0.GA-redhat-00005//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
        at org.wildfly.extension.undertow@7.4.0.GA-redhat-00005//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
        at io.undertow.servlet@2.2.5.Final-redhat-00001//io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:255)
        at org.wildfly.extension.undertow@7.4.0.GA-redhat-00005//org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:96)
        at org.wildfly.extension.undertow@7.4.0.GA-redhat-00005//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()'"}}

环境变量:Java主目录指向jdk1.8.0_202旧服务器版本:jboss-as-7.1.1.最终新服务器版本:部署结构. 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>

如果需要更多信息,请告诉我。

fiei3ece

fiei3ece1#

找到了答案:this和此处
我仍然有工作要做,以升级这个应用程序,但考虑到成功的数据库连接,今天,我几乎有。谢谢大家

相关问题