3 Replies Latest reply on May 31, 2016 8:54 AM by ctomc

    CDI enabled module

    nickarls

      (shameless cross-post from the Weld group, can you even post in multiple places?)

       

       

      I'm trying to make Seam 3 a module in WF10 (yesyes, I know it's deprecated but we're in the progress of migrating). I've created the module but end up with a deployment error of

       

         Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type SecurityExtension with qualifiers @Default

        at injection point [BackedAnnotatedField] @Inject org.jboss.seam.security.SecurityInterceptor.extension

        at org.jboss.seam.security.SecurityInterceptor.extension(SecurityInterceptor.java:0)

       

      The SecurityExtension is in the same JAR as the SecurityInterceptor and the jar (surprise, surprise) a beans.xml present. Any trick involved in this?

       

      Thanks in advance,

        Nik

        • 1. Re: CDI enabled module
          ctomc

          Yes there is some trick (and I of course forgot what exactly it is).

          how do you add dep to your module? and how does your module.xml look like?

           

          AFAIR you need to import also annotations & services (meta-inf)

          • 2. Re: CDI enabled module
            nickarls

            I got it mostly working (it deploys!) with

             

            <module xmlns="urn:jboss:module:1.3" name="my.module">
              <resources>
              <resource-root path="picketlink-idm-api-1.5.0.Alpha02.jar"/>
              <resource-root path="picketlink-idm-common-1.5.0.Alpha02.jar"/>
              <resource-root path="picketlink-idm-core-1.5.0.Alpha02.jar"/>
              <resource-root path="picketlink-idm-spi-1.5.0.Alpha02.jar"/>
              <resource-root path="seam-faces-3.1.0.Beta4.jar"/>
              <resource-root path="seam-faces-api-3.1.0.Beta4.jar"/>
              <resource-root path="seam-international-3.1.0.Beta4.jar"/>
              <resource-root path="seam-international-api-3.1.0.Beta4.jar"/>
              <resource-root path="seam-persistence-3.1.0.Beta4.jar"/>
              <resource-root path="seam-persistence-api-3.1.0.Beta4.jar"/>
              <resource-root path="seam-security-3.1.0.Beta4.jar"/>
              <resource-root path="seam-security-api-3.1.0.Beta4.jar"/>
              <resource-root path="seam-transaction-3.1.0.Beta4.jar"/>
              <resource-root path="seam-transaction-api-3.1.0.Beta4.jar"/>
              <resource-root path="solder-api-3.1.1.Final.jar"/>
              <resource-root path="solder-impl-3.1.1.Final.jar"/>
              <resource-root path="solder-logging-3.1.1.Final.jar"/>
              <resource-root path="commons-logging-1.1.1.jar"/>
              <resource-root path="hamcrest-all-1.1.jar"/>
              <resource-root path="lambdaj-2.2.jar"/>
              <resource-root path="objenesis-1.2.jar"/>
              </resources>
              <dependencies>
              <module name="javax.enterprise.api"/>
              <module name="javax.transaction.api"/>
              <module name="javax.faces.api"/>
              <module name="javax.persistence.api"/>
              <module name="org.hibernate"/>
              <module name="javax.ejb.api"/>
              </dependencies>
            </module>
            

             

            and

             

            <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">
              <deployment>
                <dependencies>
                  <module name="my.module" services="import"/>
                </dependencies>
              </deployment>
            </jboss-deployment-structure>
            

             

            Now I'm hunting down misc runtime-errors...

            • 3. Re: CDI enabled module
              ctomc

              also try adding annotations=true

               

              also

              <resource-root path="commons-logging-1.1.1.jar"/> 

              <resource-root path="hamcrest-all-1.1.jar"/>

              feel bit out of place....