Seam in JSF 2.2 causes java.lang.NullPointerException at com.sun.faces.application.NavigationHandlerImpl.determineViewFromActionOutcome

和自甴很熟 提交于 2019-12-04 18:40:39
BalusC

This is caused by the combination Seam 2.3.x and JSF 2.2. You need to either migrate Seam to DeltaSpike, which is JSF 2.2 compatible, or to downgrade Mojarra 2.2.x in WildFly to 2.1.x.

The technical problem is, Seam used an Application implementation which didn't properly extend from javax.faces.application.ApplicationWrapper and thus it had to manually implement/delegate all Application methods to the wrapped application. In case of Seam 2.3.x, all those methods were based on JSF 2.1. In JSF 2.2, a new method getFlowHandler() was added to Application, which wasn't properly delegated by Seam and thus returned null, causing all the trouble further down in the chain relying on it not being null. If Seam guys had properly extended from ApplicationWrapper instead of hardcoding all delegate methods for a specific JSF version, then it would flawlessly have worked across JSF versions.

See also:

I have identified the root cause, the issue is because of the jar version,downgraded the jar version to 2.1.29-jbossorg-1 and it worked for me.

For doing this add the jar to ${JBOSS_HOME}/modules/system/layers/base/com/sun/jsf-impl/main/ and update module.xml (available in same path) "resource-root" tag to point to the new file name.

Ref: https://developer.jboss.org/thread/261071?sr=inbox&ru=123215

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!