Uploaded image for project: 'Seam Faces'
  1. Seam Faces
  2. SEAMFACES-118

Deployment to Glassfish 3.1 fails with "WELD-001409 Ambiguous dependencies for type [Flash]"

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.0.0.CR2
    • Fix Version/s: 3.0.0.Final
    • Component/s: CDI Integration
    • Labels:
    • Environment:
    • Steps to Reproduce:
      Hide

      To reproduce:

      git clone git://github.com/ringerc/scrapcode.git
      cd scrapcode/testcases/javaee/glassfish-seamfaces-flash-injection
      mvn clean install
      asadmin deploy --contextroot justtesting target/glassfish-seamfaces-flash-injection.war

      Show
      To reproduce: git clone git://github.com/ringerc/scrapcode.git cd scrapcode/testcases/javaee/glassfish-seamfaces-flash-injection mvn clean install asadmin deploy --contextroot justtesting target/glassfish-seamfaces-flash-injection.war

      Description

      Deploying Seam Faces to Glassfish 3.1 fails if a class is present that has an injection point for the Flash scope, ie "@Inject private javax.faces.context.Flash flash". The deployment failure suggests that there is an ambiguous dependency caused by multiple Flash producers within Seam Faces its self:

      org.jboss.weld.exceptions.DeploymentException: WELD-001409 Ambiguous dependencies for type [Flash] with qualifiers [@Default] at injection point [[field] @Inject private com.mycompany.glassfishseamfacesflashinjection.InjectionTest.flash]. Possible dependencies [[Producer Method [Flash] with qualifiers [@Any @Default] declared as [[method] @Produces @RequestScoped public org.jboss.seam.faces.environment.FacesFlashProducer.getFlash()], Producer Method [Flash] with qualifiers [@Any @Default] declared as [[method] @Produces @RequestScoped public org.jboss.seam.faces.context.FlashProducer.getFlash()]]]

      Full exception and server log here:

      https://github.com/ringerc/scrapcode/blob/master/testcases/javaee/glassfish-seamfaces-flash-injection/README.txt

      I've put together a minimal test case here:

      https://github.com/ringerc/scrapcode/tree/master/testcases/javaee/glassfish-seamfaces-flash-injection

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                bleathem Brian Leathem
                Reporter:
                ringerc Craig Ringer
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: