Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Works as designed
    • Affects Version/s: 4.0_b89_RC5
    • Fix Version/s: None
    • Component/s: cdi
    • Labels:
      None

      Description

      I've just created a simple project with a servlet (MyServlet) and a bean ( MyService), when I try to inject the bean into the servlet I got an exception teling me :

      org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [MyService] with qualifiers [@Default] at injection point [[BackedAnnotatedField] @Inject com.mycompany.mavenjavaee7.MyServlet.myService]

      This works fine on previous promoted build ( eg b_77 )

      Attached is a maven project to test this issue

        Activity

        Hide
        b_faissal added a comment -

        Thank you,

        Didn't notice it as I'was testing netbeans support of JAVA EE 7 , and bean.xml was generated by netbeans.

        I'll fill a bug on netbeans side.

        Show
        b_faissal added a comment - Thank you, Didn't notice it as I'was testing netbeans support of JAVA EE 7 , and bean.xml was generated by netbeans. I'll fill a bug on netbeans side.
        Hide
        jjsnyder83 added a comment - - edited

        In beans.xml the bean-discovery-mode is set to "annotated". This means that only beans identified by a bean-defining annotation will be managed by CDI. There are 2 ways to fix this in the application:
        1) change "annoated" to "all"
        or
        2) Add @Dependent to the MyService class.

        Show
        jjsnyder83 added a comment - - edited In beans.xml the bean-discovery-mode is set to "annotated". This means that only beans identified by a bean-defining annotation will be managed by CDI. There are 2 ways to fix this in the application: 1) change "annoated" to "all" or 2) Add @Dependent to the MyService class.
        Hide
        b_faissal added a comment -

        I'm not allowed to attach file here,

        I've put the projet on drive : https://docs.google.com/file/d/0B-VFW86XwkF3LVhRUXhxODdzY3M/edit?usp=sharing

        ps : it's a simple project created by Netbeans 3.1

        Show
        b_faissal added a comment - I'm not allowed to attach file here, I've put the projet on drive : https://docs.google.com/file/d/0B-VFW86XwkF3LVhRUXhxODdzY3M/edit?usp=sharing ps : it's a simple project created by Netbeans 3.1
        Hide
        jjsnyder83 added a comment -

        Please attach the application and source code.

        Show
        jjsnyder83 added a comment - Please attach the application and source code.

          People

          • Assignee:
            jjsnyder83
            Reporter:
            b_faissal
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: