undertow-deployment: java.lang.NoSuchMethodError: com.sun.faces.util.Util.getContextClassLoader2()Ljava/lang/ClassLoader;
Seeing the below error when deploying the .ear file from EAP deployments.
00:26:57,195 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 94) MSC000001: Failed to start service jboss.deployment.subunit.".ear".".war".undertow-deployment: org.jboss.msc.service.StartException in service jboss.deployment.subunit.".ear".".war".undertow-deployment: java.lang.NoSuchMethodError: com.sun.faces.util.Util.getContextClassLoader2()Ljava/lang/ClassLoader;
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.lang.Thread.run(Thread.java:750)
at org.jboss.threads.JBossThread.run(JBossThread.java:513)
Caused by: java.lang.NoSuchMethodError: com.sun.faces.util.Util.getContextClassLoader2()Ljava/lang/ClassLoader;
at javax.faces.CurrentThreadToServletContext.getFactoryFinder(CurrentThreadToServletContext.java:59)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:273)
at javax.faces.context.FacesContext.getCurrentInstance(FacesContext.java:953)
at com.sun.faces.config.InitFacesContext.(InitFacesContext.java:100)
at com.sun.faces.config.FacesInitializer.onStartup(FacesInitializer.java:114)
at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:204)
at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:187)
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1555)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1555)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1555)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1555)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1555)
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:255)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:96)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:78)
... 8 more
I don't see any JSF dependencies in my application classpath. Tried adding exclusions from jboss-deployment-structure.xml