IllegalAccessException: Class javax.faces.FactoryFinder can not access a member of class in JBoss EAP 7

Solution Unverified - Updated -

Issue

  • We are migrating our application from JBoss EAP 6 to JBoss EAP 7 and it is failing with this exception, we have some custom modules which the application is depending on:
Caused by: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! Class javax.faces.FactoryFinder can not access a member of class org.jboss.as.jsf.injection.weld.WeldApplicationFactory with modifiers "private"
  at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:241)
...
Caused by: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! Class javax.faces.FactoryFinder can not access a member of class org.jboss.as.jsf.injection.weld.WeldApplicationFactory with modifiers "private"
  at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:214)
  at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:200)
  at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187)
...
  at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1501)
  at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:239)
  ... 8 more
Caused by: java.lang.IllegalAccessException: Class javax.faces.FactoryFinder can not access a member of class org.jboss.as.jsf.injection.weld.WeldApplicationFactory with modifiers "private"
  at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:102)
  at java.lang.Class.newInstance(Class.java:436)
  at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:537)
  at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:405)
  at javax.faces.FactoryFinder.access$400(FactoryFinder.java:135)
  at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:717)
  at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:239)
  at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:187)
  at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:132)
  at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:204)
  ... 21 more

Environment

Red Hat JBoss Enterprise Application Platform (EAP) 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In