2 Replies Latest reply on Aug 26, 2015 12:34 PM by Dhaval Patel

    can richfaces jars should only be part of WEB module inside EAR ??? not of EJB ???

    Rahul Razdan Newbie

      hi,

       

       

      I was working on my EAR project and was getting some exceptions while creating ApplicationFactory ( Deployment Time ) .

       

      1. SeamApplicationFactory :-

       

      2. org.richfaces.context.SkinningExternalContextFactory :-

       

      Below u can see the deployment log where above 2 are getting added in Factory .

       

      {code}

      15:15:02,459 FINE  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-5) Calling FactoryFinder.setFactory(javax.faces.application.ApplicationFactory, com.sun.faces.application.ApplicationFactoryImpl)

      . . . . .  . [ some more code here ]
      15:15:02,497 FINE  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-5) Processing factory elements for document: 'vfs:/D:/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final/standalone/deployments/xxx-ee.ear/lib/jsf-facelets-1.1.14.jar/META-INF/faces-config.xml'

      15:15:02,498 FINE  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-5) Processing factory elements for document: 'vfs:/D:/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final/standalone/deployments/xxx-ee.ear/lib/richfaces-components-ui-4.2.3.Final.jar/META-INF/faces-config.xml'

      15:15:02,523 FINE  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-5) Calling FactoryFinder.setFactory(javax.faces.view.facelets.TagHandlerDelegateFactory, org.richfaces.view.facelets.html.BehaviorsTagHandlerDelegateFactoryImpl)

      15:15:02,524 FINE  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-5) Calling FactoryFinder.setFactory(javax.faces.context.FacesContextFactory, org.richfaces.context.FileUploadFacesContextFactory)

      15:15:02,525 FINE  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-5) Processing factory elements for document: 'vfs:/D:/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final/standalone/deployments/xxx-ee.ear/lib/richfaces-core-impl-4.2.3.Final.jar/META-INF/faces-config.xml'

      15:15:02,526 FINE  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-5) Calling FactoryFinder.setFactory(javax.faces.context.ExternalContextFactory, *org.richfaces.context.SkinningExternalContextFactory*)

      15:15:02,527 FINE  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-5) Calling FactoryFinder.setFactory(javax.faces.context.PartialViewContextFactory, org.richfaces.context.ExtendedPartialViewContextFactoryImpl)

      15:15:02,528 FINE  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-5) Processing factory elements for document: 'vfs:/D:/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final/standalone/deployments/xxx-ee.ear/lib/seam-faces-api-3.1.0.Final.jar/META-INF/faces-config.xml'

      15:15:02,529 FINE  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-5) Processing factory elements for document: 'vfs:/D:/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final/standalone/deployments/xxx-ee.ear/lib/seam-faces-3.1.0.Final.jar/META-INF/faces-config.xml'

      15:15:02,530 FINE  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-5) Calling FactoryFinder.setFactory(javax.faces.context.ExternalContextFactory, org.jboss.seam.faces.environment.SeamExternalContextFactory)

      15:15:02,531 FINE  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-5) Calling FactoryFinder.setFactory(javax.faces.context.ExceptionHandlerFactory, org.jboss.seam.faces.exception.CatchExceptionHandlerFactory)

      15:15:02,532 FINE  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-5) Calling FactoryFinder.setFactory(javax.faces.application.ApplicationFactory, *org.jboss.seam.faces.environment.SeamApplicationFactory*)

      15:15:02,533 FINE  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-5) Processing factory elements for document: 'jndi:/default-host/xxx-web/WEB-INF/faces-config.xml'

      {code}

       

      now after above i will get

       

      {code}

      15:18:54,823 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/xxx-web]] (MSC service thread 1-5) Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: Factory 'javax.faces.application.ApplicationFactory' was not configured properly.

          at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:292) [jsf-impl-2.1.7-jbossorg-2.jar:]

          at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]

          at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0]

          at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0]

      Caused by: com.sun.faces.config.ConfigurationException: Factory 'javax.faces.application.ApplicationFactory' was not configured properly.

          at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:305) [jsf-impl-2.1.7-jbossorg-2.jar:]

          at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:219) [jsf-impl-2.1.7-jbossorg-2.jar:]

          at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:361) [jsf-impl-2.1.7-jbossorg-2.jar:]

          at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225) [jsf-impl-2.1.7-jbossorg-2.jar:]

          ... 8 more

      Caused by: javax.faces.FacesException: org.jboss.seam.faces.environment.SeamApplicationFactory

          at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:643) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

          at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:509) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

          at javax.faces.FactoryFinder.access$400(FactoryFinder.java:139) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

          at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:993) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

          at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:343) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

          at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:303) [jsf-impl-2.1.7-jbossorg-2.jar:]

          ... 11 more

      Caused by: java.lang.InstantiationException: org.jboss.seam.faces.environment.SeamApplicationFactory

          at java.lang.Class.newInstance0(Class.java:357) [rt.jar:1.7.0]

          at java.lang.Class.newInstance(Class.java:325) [rt.jar:1.7.0]

          at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:641) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

          ... 16 more

      {code}

       

      now if i remove seam-faces from dependency then this error will go and same exception will come for richfaces related class.

       

      both the dependencies are in EJB module pom.xml .

       

      Then i tried to a demo and there i found that same dependencies in web module of EAR doesn't give any exception , but there if i put them back to ejb module of EAR then same exception comes again.

       

      so i want to ask , is richfaces and seam-faces are meant to be only in web module or I'm missing something else ????

       

      i need an answer please reply if you have anything on above.

       

      my project runs on jboss 7.1.1.final , seam 3 , cdi , richfaces .


      Thanks

       

      help needed !!!!!