-
Bug
-
Resolution: Done
-
Critical
-
None
-
None
Run ForbiddenUrlTestCase against WF Preview or my WFLY-16432 branch and it fails with this in the log:
&#27;[0m&#27;[31m20:21:52,487 ERROR [stderr] (ServerService Thread Pool -- 24) java.lang.IllegalStateException: CDI is not available &#27;[0m&#27;[31m20:21:52,488 ERROR [stderr] (ServerService Thread Pool -- 24) at com.sun.jsf-impl@4.0.0.SP01//com.sun.faces.util.Util.getCdiBeanManager(Util.java:1493) &#27;[0m&#27;[31m20:21:52,488 ERROR [stderr] (ServerService Thread Pool -- 24) at com.sun.jsf-impl@4.0.0.SP01//com.sun.faces.application.applicationimpl.ExpressionLanguage.addELResolver(ExpressionLanguage.java:106) &#27;[0m&#27;[31m20:21:52,488 ERROR [stderr] (ServerService Thread Pool -- 24) at com.sun.jsf-impl@4.0.0.SP01//com.sun.faces.application.ApplicationImpl.addELResolver(ApplicationImpl.java:208) &#27;[0m&#27;[31m20:21:52,488 ERROR [stderr] (ServerService Thread Pool -- 24) at org.jboss.as.jsf-injection//org.jboss.as.jsf.injection.weld.WeldApplication.<init>(WeldApplication.java:60) &#27;[0m&#27;[31m20:21:52,488 ERROR [stderr] (ServerService Thread Pool -- 24) at org.jboss.as.jsf-injection//org.jboss.as.jsf.injection.weld.WeldApplicationFactory.getApplication(WeldApplicationFactory.java:52) &#27;[0m&#27;[31m20:21:52,488 ERROR [stderr] (ServerService Thread Pool -- 24) at com.sun.jsf-impl@4.0.0.SP01//com.sun.faces.application.InjectionApplicationFactory.getApplication(InjectionApplicationFactory.java:61) &#27;[0m&#27;[31m20:21:52,488 ERROR [stderr] (ServerService Thread Pool -- 24) at com.sun.jsf-impl@4.0.0.SP01//com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:109) &#27;[0m&#27;[31m20:21:52,488 ERROR [stderr] (ServerService Thread Pool -- 24) at com.sun.jsf-impl@4.0.0.SP01//com.sun.faces.lifecycle.ClientWindowFactoryImpl.<init>(ClientWindowFactoryImpl.java:39) &#27;[0m&#27;[31m20:21:52,488 ERROR [stderr] (ServerService Thread Pool -- 24) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) &#27;[0m&#27;[31m20:21:52,488 ERROR [stderr] (ServerService Thread Pool -- 24) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) &#27;[0m&#27;[31m20:21:52,489 ERROR [stderr] (ServerService Thread Pool -- 24) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) &#27;[0m&#27;[31m20:21:52,489 ERROR [stderr] (ServerService Thread Pool -- 24) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) &#27;[0m&#27;[31m20:21:52,489 ERROR [stderr] (ServerService Thread Pool -- 24) at java.base/java.lang.Class.newInstance(Class.java:584) &#27;[0m&#27;[31m20:21:52,489 ERROR [stderr] (ServerService Thread Pool -- 24) at jakarta.faces.api//jakarta.faces.FactoryFinderInstance.getImplGivenPreviousImpl(FactoryFinderInstance.java:431) &#27;[0m&#27;[31m20:21:52,489 ERROR [stderr] (ServerService Thread Pool -- 24) at jakarta.faces.api//jakarta.faces.FactoryFinderInstance.getImplementationInstance(FactoryFinderInstance.java:323) &#27;[0m&#27;[31m20:21:52,489 ERROR [stderr] (ServerService Thread Pool -- 24) at jakarta.faces.api//jakarta.faces.FactoryFinderInstance.getFactory(FactoryFinderInstance.java:183) &#27;[0m&#27;[31m20:21:52,489 ERROR [stderr] (ServerService Thread Pool -- 24) at jakarta.faces.api//jakarta.faces.FactoryFinder.getFactory(FactoryFinder.java:263) &#27;[0m&#27;[31m20:21:52,489 ERROR [stderr] (ServerService Thread Pool -- 24) at com.sun.jsf-impl@4.0.0.SP01//com.sun.faces.config.processor.FactoryConfigProcessor.lambda$verifyFactoriesExist$0(FactoryConfigProcessor.java:286) &#27;[0m&#27;[31m20:21:52,489 ERROR [stderr] (ServerService Thread Pool -- 24) at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) &#27;[0m&#27;[31m20:21:52,489 ERROR [stderr] (ServerService Thread Pool -- 24) at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658) &#27;[0m&#27;[31m20:21:52,490 ERROR [stderr] (ServerService Thread Pool -- 24) at com.sun.jsf-impl@4.0.0.SP01//com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:280) &#27;[0m&#27;[31m20:21:52,490 ERROR [stderr] (ServerService Thread Pool -- 24) at com.sun.jsf-impl@4.0.0.SP01//com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:195) &#27;[0m&#27;[31m20:21:52,490 ERROR [stderr] (ServerService Thread Pool -- 24) at com.sun.jsf-impl@4.0.0.SP01//com.sun.faces.config.ConfigManager.lambda$initialize$0(ConfigManager.java:265) &#27;[0m&#27;[31m20:21:52,490 ERROR [stderr] (ServerService Thread Pool -- 24) at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:720) &#27;[0m&#27;[31m20:21:52,490 ERROR [stderr] (ServerService Thread Pool -- 24) at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658) &#27;[0m&#27;[31m20:21:52,490 ERROR [stderr] (ServerService Thread Pool -- 24) at com.sun.jsf-impl@4.0.0.SP01//com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:263) &#27;[0m&#27;[31m20:21:52,490 ERROR [stderr] (ServerService Thread Pool -- 24) at com.sun.jsf-impl@4.0.0.SP01//com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:179) &#27;[0m&#27;[31m20:21:52,490 ERROR [stderr] (ServerService Thread Pool -- 24) at io.undertow.servlet@2.3.0.Alpha1//io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187)
Adding an empty beans.xml to the test deployment fixes this, but users shouldn't have to add a beans.xml to get Faces to work.
One possible solution would be to add a method to WeldCapability to allow capability users (i.e. the Faces subsystem) to tell the weld subsystem to mark a deployment as a Weld deployment. That's only if Mojarra really does require CDI and its doing so isn't a bug.