glassfish
  1. glassfish
  2. GLASSFISH-16061

could not find Factory: javax.faces.context.FacesContextFactory

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 3.1_dev
    • Fix Version/s: None
    • Component/s: jsf
    • Labels:
      None
    • Environment:

      Linux, Seam 3

      Description

      On running my JSF/Seam 3 application (using netbeans), the application startup fails with the message:

      WARNING: StandardWrapperValve[FacesServlet]: PWC1382: Allocate exception for servlet FacesServlet
      java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory

      I have to undeploy my application, restart glassfish, and re-deploy my application (sometimes several times) to get this problem to go away.

      This problem is intermittent.

      --------------

      Stack trace:

      WARNING: StandardWrapperValve[FacesServlet]: PWC1382: Allocate exception for servlet FacesServlet
      java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
      at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:815)
      at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:317)
      at javax.faces.webapp.FacesServlet.init(FacesServlet.java:253)
      at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1439)
      at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:1071)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:189)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
      at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
      at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
      at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
      at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
      at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      at java.lang.Thread.run(Thread.java:662)

        Activity

        Hide
        Scott Fordin added a comment -

        Added issue to 3.1 Known Issues section of the 3.1-3.1.1 Release Notes.

        Show
        Scott Fordin added a comment - Added issue to 3.1 Known Issues section of the 3.1-3.1.1 Release Notes.
        Hide
        bleathem added a comment -

        This issue is sporadic issue, and is observed when a JSF application does not register the Faces Servlet in the web.xml.

        com.sun.faces.config.FacesInitializer will attempt to initialize the JSF Servlet, which normally works fine, except when Seam Faces is included in the application, which also tries to initialize the Servlet.

        This bug is not deterministic due to the random ordering of listeners by Glassfish.

        For more information, please see the corresponding issue in SeamFaces:
        https://issues.jboss.org/browse/SEAMFACES-163

        Show
        bleathem added a comment - This issue is sporadic issue, and is observed when a JSF application does not register the Faces Servlet in the web.xml. com.sun.faces.config.FacesInitializer will attempt to initialize the JSF Servlet, which normally works fine, except when Seam Faces is included in the application, which also tries to initialize the Servlet. This bug is not deterministic due to the random ordering of listeners by Glassfish. For more information, please see the corresponding issue in SeamFaces: https://issues.jboss.org/browse/SEAMFACES-163
        Hide
        rogerk added a comment -

        Closing as I have not heard back from reporter and this appears to be a configuration issue - in addition the reporter has workaround for config issue.

        Show
        rogerk added a comment - Closing as I have not heard back from reporter and this appears to be a configuration issue - in addition the reporter has workaround for config issue.
        Hide
        Scott Fordin added a comment -

        Need more info to add issue to 3.1 Release Notes.

        Show
        Scott Fordin added a comment - Need more info to add issue to 3.1 Release Notes.
        Hide
        rogerk added a comment -

        Are you saying your app was not configured to go through the FacesServlet?

        Show
        rogerk added a comment - Are you saying your app was not configured to go through the FacesServlet?

          People

          • Assignee:
            rogerk
            Reporter:
            bleathem
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: