Bug 1772553

Summary: [GSS](6.4.z) JAVASERVERFACES-2171 - Use static initializer block in FactoryFinder - to fix thread safety issues
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Brad Maxwell <bmaxwell>
Component: JSFAssignee: baranowb <bbaranow>
Status: CLOSED UPSTREAM QA Contact: Peter Mackay <pmackay>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: bbaranow, jstefl, pslavice, rpelisse
Target Milestone: ---   
Target Release: EAP 6.4.23   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-02-10 04:00:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1699388, 1772542, 1798212    

Description Brad Maxwell 2019-11-14 15:25:47 UTC
Intermittent Application error when starting JBoss EAP

12:02:06,042 INFO  [stdout] (ServerService Thread Pool -- 25) FactoryFinder.getImplementationInstance: implementations is not null
12:02:06,042 INFO  [stdout] (ServerService Thread Pool -- 25) FactoryFinder.getImplementationInstance curlImplClass is com.redhat.examples.jsf.ExampleFacesContextFactory
12:02:06,042 INFO  [stdout] (ServerService Thread Pool -- 25) FactoryFinder.getImplGivenPreviousImpl: entering
12:02:06,042 INFO  [stdout] (ServerService Thread Pool -- 25) FactoryFinder.getImplGivenPreviousImpl factoryName javax.faces.context.FacesContextFactory
12:02:06,042 INFO  [stdout] (ServerService Thread Pool -- 25) FactoryFinder.getImplGivenPreviousImpl implName com.redhat.examples.jsf.ExampleFacesContextFactory
12:02:06,043 INFO  [stdout] (ServerService Thread Pool -- 25) FactoryFinder.getImplGivenPreviousImpl previousImpl com.sun.faces.context.FacesContextFactoryImpl@6f317603
12:02:06,043 INFO  [stdout] (ServerService Thread Pool -- 25) previousImpl and factoryClass both null, implName is  com.redhat.examples.jsf.ExampleFacesContextFactory
12:02:06,077 ERROR [stderr] (ServerService Thread Pool -- 25) java.lang.InstantiationException: com.redhat.examples.jsf.ExampleFacesContextFactory
12:02:06,077 ERROR [stderr] (ServerService Thread Pool -- 25)   at java.lang.Class.newInstance(Class.java:427)
12:02:06,077 ERROR [stderr] (ServerService Thread Pool -- 25)   at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:554)
12:02:06,078 ERROR [stderr] (ServerService Thread Pool -- 25)   at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:411)
12:02:06,095 ERROR [stderr] (ServerService Thread Pool -- 25)   at javax.faces.FactoryFinder.access$400(FactoryFinder.java:135)
12:02:06,095 ERROR [stderr] (ServerService Thread Pool -- 25)   at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:743)
12:02:06,095 ERROR [stderr] (ServerService Thread Pool -- 25)   at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:239)
12:02:06,095 ERROR [stderr] (ServerService Thread Pool -- 25)   at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:187)
12:02:06,095 ERROR [stderr] (ServerService Thread Pool -- 25)   at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:132)
12:02:06,095 ERROR [stderr] (ServerService Thread Pool -- 25)   at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:205)
12:02:06,111 ERROR [stderr] (ServerService Thread Pool -- 25)   at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:201)
12:02:06,111 ERROR [stderr] (ServerService Thread Pool -- 25)   at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339)
12:02:06,111 ERROR [stderr] (ServerService Thread Pool -- 25)   at org.apache.catalina.core.StandardContext.start(StandardContext.java:3780)
12:02:06,111 ERROR [stderr] (ServerService Thread Pool -- 25)   at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:163)
12:02:06,112 ERROR [stderr] (ServerService Thread Pool -- 25)   at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:61)
12:02:06,112 ERROR [stderr] (ServerService Thread Pool -- 25)   at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96)
12:02:06,112 ERROR [stderr] (ServerService Thread Pool -- 25)   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
12:02:06,112 ERROR [stderr] (ServerService Thread Pool -- 25)   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
12:02:06,112 ERROR [stderr] (ServerService Thread Pool -- 25)   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
12:02:06,113 ERROR [stderr] (ServerService Thread Pool -- 25)   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
12:02:06,130 ERROR [stderr] (ServerService Thread Pool -- 25)   at java.lang.Thread.run(Thread.java:748)
12:02:06,130 ERROR [stderr] (ServerService Thread Pool -- 25)   at org.jboss.threads.JBossThread.run(JBossThread.java:122)
12:02:06,136 ERROR [stderr] (ServerService Thread Pool -- 25) Caused by: java.lang.NoSuchMethodException: com.redhat.examples.jsf.ExampleFacesContextFactory.<init>()
12:02:06,136 ERROR [stderr] (ServerService Thread Pool -- 25)   at java.lang.Class.getConstructor0(Class.java:3082)
12:02:06,136 ERROR [stderr] (ServerService Thread Pool -- 25)   at java.lang.Class.newInstance(Class.java:412)
12:02:06,137 ERROR [stderr] (ServerService Thread Pool -- 25)   ... 20 more
12:02:06,139 FINE  [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 25) Unsanitized stacktrace from failed start...: com.sun.faces.config.ConfigurationException: Factory 'javax.faces.context.FacesContextFactory' was not configured properly.
        at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:190) [jsf-impl-1.2.15.b01.SP2.jar:1.2.15.b01.SP2]
        at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:132) [jsf-impl-1.2.15.b01.SP2.jar:1.2.15.b01.SP2]
        at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:205) [jsf-impl-1.2.15.b01.SP2.jar:1.2.15.b01.SP2]
        at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:201) [jsf-impl-1.2.15.b01.SP2.jar:1.2.15.b01.SP2]
        at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) [jbossweb.jar:7.5.30.Final-redhat-1]
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:3780) [jbossweb.jar:7.5.30.Final-redhat-1]
        at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:163) [jboss-as-web.jar:7.5.22.Final-redhat-1]
        at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:61) [jboss-as-web.jar:7.5.22.Final-redhat-1]
        at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96) [jboss-as-web.jar:7.5.22.Final-redhat-1]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_232]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_232]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_232]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_232]
        at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_232]
        at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: javax.faces.FacesException: com.redhat.examples.jsf.ExampleFacesContextFactory
        at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:557) [jsf-api-1.2.15.b01.SP2.jar:1.2.15.b01.SP2]
        at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:411) [jsf-api-1.2.15.b01.SP2.jar:1.2.15.b01.SP2]
        at javax.faces.FactoryFinder.access$400(FactoryFinder.java:135) [jsf-api-1.2.15.b01.SP2.jar:1.2.15.b01.SP2]
        at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:743) [jsf-api-1.2.15.b01.SP2.jar:1.2.15.b01.SP2]
        at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:239) [jsf-api-1.2.15.b01.SP2.jar:1.2.15.b01.SP2]
        at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:187) [jsf-impl-1.2.15.b01.SP2.jar:1.2.15.b01.SP2]
        ... 14 more
Caused by: java.lang.InstantiationException: com.redhat.examples.jsf.ExampleFacesContextFactory
        at java.lang.Class.newInstance(Class.java:427) [rt.jar:1.8.0_232]
        at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:554) [jsf-api-1.2.15.b01.SP2.jar:1.2.15.b01.SP2]
        ... 19 more
Caused by: java.lang.NoSuchMethodException: com.redhat.examples.jsf.ExampleFacesContextFactory.<init>()
        at java.lang.Class.getConstructor0(Class.java:3082) [rt.jar:1.8.0_232]
        at java.lang.Class.newInstance(Class.java:412) [rt.jar:1.8.0_232]
        ... 20 more

Comment 8 Peter Mackay 2020-06-30 12:39:58 UTC
Verified with EAP 6.4.23.CP.CR2

Comment 10 Red Hat Bugzilla 2025-02-10 04:00:01 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.