当前位置: 首页 > 知识库问答 >
问题:

将JSF 1.2 Seam应用程序迁移到WildFly Beta 1

吴丁雷
2023-03-14

一个Seam war应用程序(JSF1.2),以前迁移到JBoss7.1并运行良好,现在需要迁移到Wildfly Beta1。

默认情况下Wildfly不支持JSF1.2,因此遵循以下说明启用它:

项目建设得很好,野蝇启动得也很好。当我尝试打开一个页面时,它会抛出异常:

11:13:43,546 ERROR [io.undertow.request] (default task-1) Servlet request failed HttpServerExchange{ GET /webapp/page.seam}: java.lang.NoSuchMethodError: javax.faces.context.FacesContext.getAttributes()Ljava/util/Map;
at org.jboss.weld.jsf.ConversationAwareViewHandler.getActionURL(ConversationAwareViewHandler.java:103) [weld-core-jsf-2.1.0.CR1.jar:2013-09-26 16:53]
at javax.faces.application.ViewHandlerWrapper.getActionURL(ViewHandlerWrapper.java:147) [jsf-api-1.2_15.jar:1.2_15-20100816-SNAPSHOT]
at com.sun.facelets.FaceletViewHandler.getActionURL(FaceletViewHandler.java:803) [jsf-facelets.jar:1.1.15.B1]
at org.ajax4jsf.application.ViewHandlerWrapper.getActionURL(ViewHandlerWrapper.java:86) [richfaces-api-3.3.3.Final.jar:3.3.3.Final]
at org.jboss.seam.faces.FacesManager.redirect(FacesManager.java:168) [jboss-seam.jar:2.2.2.Final]
at org.jboss.seam.faces.FacesManager.redirect(FacesManager.java:143) [jboss-seam.jar:2.2.2.Final]
at org.jboss.seam.navigation.Pages.redirectToLoginView(Pages.java:563) [jboss-seam.jar:2.2.2.Final]
at org.jboss.seam.navigation.Pages.postRestore(Pages.java:414) [jboss-seam.jar:2.2.2.Final]
at org.jboss.seam.jsf.SeamPhaseListener.postRestorePage(SeamPhaseListener.java:544) [jboss-seam.jar:2.2.2.Final]
at org.jboss.seam.jsf.SeamPhaseListener.afterRestoreView(SeamPhaseListener.java:393) [jboss-seam.jar:2.2.2.Final]
at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:229) [jboss-seam.jar:2.2.2.Final]
at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:195) [jboss-seam.jar:2.2.2.Final]
at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:175) [jsf-impl-1.2_15.jar:1.2_15-20100816-SNAPSHOT]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:114) [jsf-impl-1.2_15.jar:1.2_15-20100816-SNAPSHOT]
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:102) [jsf-impl-1.2_15.jar:1.2_15-20100816-SNAPSHOT]
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-1.2_15.jar:1.2_15-20100816-SNAPSHOT]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265) [jsf-api-1.2_15.jar:1.2_15-20100816-SNAPSHOT]
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:87) [undertow-servlet-1.0.0.Beta17.jar:1.0.0.Beta17]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130) [undertow-servlet-1.0.0.Beta17.jar:1.0.0.Beta17]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) [jboss-seam.jar:2.2.2.Final]
at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) [jboss-seam.jar:2.2.2.Final]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.2.2.Final]
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90) [jboss-seam.jar:2.2.2.Final]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.2.2.Final]
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) [jboss-seam.jar:2.2.2.Final]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.2.2.Final]
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) [jboss-seam.jar:2.2.2.Final]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.2.2.Final]
at org.jboss.seam.web.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:42) [jboss-seam.jar:2.2.2.Final]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.2.2.Final]
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206) [richfaces-impl-3.3.3.Final.jar:3.3.3.Final]
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) [richfaces-impl-3.3.3.Final.jar:3.3.3.Final]
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388) [richfaces-impl-3.3.3.Final.jar:3.3.3.Final]
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515) [richfaces-impl-3.3.3.Final.jar:3.3.3.Final]
at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56) [jboss-seam.jar:2.2.2.Final]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.2.2.Final]
at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) [jboss-seam.jar:2.2.2.Final]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.2.2.Final]
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) [jboss-seam.jar:2.2.2.Final]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:56) [undertow-servlet-1.0.0.Beta17.jar:1.0.0.Beta17]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.0.0.Beta17.jar:1.0.0.Beta17]
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) [undertow-servlet-1.0.0.Beta17.jar:1.0.0.Beta17]
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:93) [undertow-servlet-1.0.0.Beta17.jar:1.0.0.Beta17]
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.0.0.Beta17.jar:1.0.0.Beta17]
at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:81)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.0.Beta17.jar:1.0.0.Beta17]
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113) [undertow-servlet-1.0.0.Beta17.jar:1.0.0.Beta17]
at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:52) [undertow-core-1.0.0.Beta17.jar:1.0.0.Beta17]
at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51) [undertow-core-1.0.0.Beta17.jar:1.0.0.Beta17]
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.0.0.Beta17.jar:1.0.0.Beta17]
at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:55) [undertow-servlet-1.0.0.Beta17.jar:1.0.0.Beta17]
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:65) [undertow-servlet-1.0.0.Beta17.jar:1.0.0.Beta17]
at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:70) [undertow-core-1.0.0.Beta17.jar:1.0.0.Beta17]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.0.Beta17.jar:1.0.0.Beta17]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.0.Beta17.jar:1.0.0.Beta17]
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:218) [undertow-servlet-1.0.0.Beta17.jar:1.0.0.Beta17]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:205) [undertow-servlet-1.0.0.Beta17.jar:1.0.0.Beta17]
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:69) [undertow-servlet-1.0.0.Beta17.jar:1.0.0.Beta17]
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:134) [undertow-servlet-1.0.0.Beta17.jar:1.0.0.Beta17]
at io.undertow.server.HttpHandlers.executeRootHandler(HttpHandlers.java:36) [undertow-core-1.0.0.Beta17.jar:1.0.0.Beta17]
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:619) [undertow-core-1.0.0.Beta17.jar:1.0.0.Beta17]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_25]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_25]

11:13:43,578 ERROR [org.jboss.as.txn] (default task-1) JBAS010152: APPLICATION ERROR: transaction still active in request with status 0

根据这个链接,javax.faces.context.facescontext.getAttributes()的返回类型参数发生了变化:

https://java.net/jira/browse/JavaServerFaces-1847

INFO  [org.jboss.as.jsf] (ServerService Thread Pool -- 39) JBAS012605: Activated the following JSF Implementations: [mojarra-1.2_15, main]

共有1个答案

阎扬
2023-03-14

焊缝2不需要CDI,所以不需要焊接。必须在jboss-deployment-structure.xml中在系统级禁用它

<exclude-subsystems>
  <subsystem name="weld" />
</exclude-subsystems>
 类似资料:
  • 我正在探索将java web应用程序移动到Azure应用程序服务的可能性。应用程序on prem在启动时读取属性文件。 是否有可能将属性文件传递或放置到应用服务?如果没有,建议将此类遗留应用程序移动到Azure应用服务?

  • 我有一个Web项目,我很容易在tomcat上对其进行depoly。事实上,我有一个实现的类(这个类真的很胖),因为你知道每个支持servlet 3.0的应用程序服务器,它可以很容易地检测到它并尝试启动它。现在我想知道是否可以使用Spring启动启动器,并且无需任何进一步的配置,我将我的传递给它,并根据我的启动我的项目进行Spring启动? 我只想使用spring boot的方法在Tomcat上部署

  • 我用xcode11运行我的应用程序,并且可以发布它。但是,我看到了苹果发布的下面这则公告; “从2021年4月开始,所有提交到应用商店的iOS和iPadOS应用都必须使用Xcode 12和iOS 14 SDK构建。” 我到底该怎么做?如果我下载Xcode12并运行我的应用程序,SDK会自动更新吗?安装iOS 14 SDK该怎么做? 或者我需要为我现有的豆荚“豆荚更新”吗?在我的项目“iOS部署目标

  • 目前,我正在努力将我的seam jbpm应用程序从Jboss 5.1迁移到WildFly 8.2 我使用的是Seam 2.2和JBPM 3.3,在WildFly 8.2上部署了jboss 5.1应用程序。在java 8上编译后,修复了一些问题,我被JBPM问题阻止。 下面是我的服务器日志 如果有人有解决办法,请告诉我。

  • 我试图用以下xml文件在tomcat 8中部署一个应用程序: 我读了很多关于资源方法的迁移,并将xml文件更改为: 该应用程序启动正常,但没有从jar文件中导入类。我肯定我错过了一些东西,找不到一个好的例子来说明如何做到这一点。请帮助。 我的JSP无法编译,正在抛出 组织。阿帕奇。贾斯珀。JaspereException:无法为JSP编译类:在生成的java文件:[/usr/local/apach

  • 我正在将flutter应用程序从Firebase实时数据库迁移到Firestore。我在聊天应用程序中更新这段代码时遇到麻烦,因为firestore没有FireBaseAnimatedList。 旧代码: 现在只有错误是在动画中。我有错误: