glassfish
  1. glassfish
  2. GLASSFISH-20597

UnsatisfiedDependencyException is thrown by JAX-RS, Bean Validation and CDI integration

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 4.0_b89_RC5
    • Fix Version/s: 4.1
    • Component/s: bean-validator, cdi, jax-rs
    • Labels:
      None
    • Environment:

      Windows 7 and JDK7 update 21 (both x86 and x86-64)

      Description

      It is problem that a JAX-RS application (exactly a resource class) throws org.glassfish.hk2.api.UnsatisfiedDependencyException when I send GET request to it. The application uses both Bean Validation (@NotNull and @Min) and CDI (@Inject) into same resource class and it is neither Managed Bean nor EJB (Session Bean). If it uses either of them (for example, it uses without Bean Validation), it runs well and send response as status 200.

      As a trial, I rewrite the application using not @Inject but @EJB (the resource class becomes Stateless Bean) and then it runs as expected.

        Issue Links

          Activity

            People

            • Assignee:
              Michal Gajdos
              Reporter:
              HASUNUMA Kenji
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: