4 Replies Latest reply on Apr 29, 2011 3:34 PM by garcimouche

    Where to package SEAM-FACES in my ear?

    garcimouche

      AS: JBOSS 6.0.0.Final


      I have some difficulty to package seam-faces in my ear bundle which has basically the following struct.:


      my-app.ear
        |_lib
           |_seam-solder-3.0.0-final.jar
           |_seam-persistence-3.0.0-final.jar
           |_other-common-jars-to-all-my-ee-modules.jar
        |_my-ejb-module-that-needs-seam-solder.jar
        |_my-other-ejb-module-that-also-need-solder.jar
        |_my-web-module.war
           |_WEB-INF
                |_lib
                    |_seam-faces-3.0.0.final.jar
                    |_seam-international-3.0.0.final.jar
        |_my-web-module2.war
      


      At Deployment, Weld is complaining with this error:

      (HDScanner) Error installing to Start: name=vfs:///home/franck/jboss-6.0.0.Final/server/default/deploy/my-app-ear.ear_WeldBootstrapBean state=Create: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [ViewConfigExtension] with qualifiers [@Default] at injection point [[parameter 1] of [method] @Inject public org.jboss.seam.faces.view.config.ViewConfigStoreImpl.setup(ViewConfigExtension)]
      


      I also tried to move seam-faces (and international) into my-app.ear/lib but this time I have the following error @ deployment:
      2011-04-27 11:33:43,823 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (HDScanner) Unsanitized stacktrace from failed start...: org.jboss.seam.solder.beanManager.BeanManagerUnavailableException: Failed to locate BeanManager using any of these providers: org.jboss.seam.solder.beanManager.DefaultJndiBeanManagerProvider(11), org.jboss.seam.solder.beanManager.ServletContainerJndiBeanManagerProvider(10)
           at org.jboss.seam.solder.beanManager.BeanManagerLocator.getBeanManager(BeanManagerLocator.java:91) [:3.0.0.Final]
           at org.jboss.seam.solder.beanManager.BeanManagerAware.getBeanManager(BeanManagerAware.java:56) [:3.0.0.Final]
           at org.jboss.seam.faces.event.AbstractListener.getListeners(AbstractListener.java:25) [:3.0.0.Final]
      


      Any pointers are greatly appreciated!


      Thanks!


        • 1. Re: Where to package SEAM-FACES in my ear?
          bschoen

          I have the same problem. I've got solder, faces and international all in WEB-INF/lib and I get the exact same error as you. I've looked into the source for faces and can't find a producer for ViewConfigExtension.


          Have you made any headway?

          • 2. Re: Where to package SEAM-FACES in my ear?
            jharting

            Your problem is caused by a bug in the JBoss AS 6 which does not recognize CDI extensions when packaged within an ear. See AS7-623 for more details.


            There is a workaround for the issue:


            Comment out WarClassLoaderDeployer in deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml


            The workaround works fine for single-webapp ear. Problems may occur if multiple web applications are packaged within the ear.

            • 3. Re: Where to package SEAM-FACES in my ear?
              garcimouche

              Thanks Jozef I have several web modules in the ear. I finally put back seam-faces into the ear/lib folder and it deploys correctly. However I now try to use the  UIInputContainer component defined in seam-faces inside one of my web-module through the JSF 2 composite mechanism. However I've got this error :

              SEVERE [javax.enterprise.resource.webcontainer.jsf.application] JSF1068: Cannot instantiate component with component-type org.jboss.seam.faces.InputContainer
              


              I use Mojarra 2.0.4.
              I don't know if a FacesComponent present in a jar in the ear/lib directory get scanned by JSF 2.


              • 4. Re: Where to package SEAM-FACES in my ear?
                garcimouche

                For the record, I've redeclared the UIInputContainer inside my web-module faces-config:

                    <component>
                        <component-type>org.jboss.seam.faces.InputContainer</component-type>
                        <component-class>org.jboss.seam.faces.component.UIInputContainer</component-class>
                    </component>
                


                and it's working......