Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-615

Manual lookup of CDI-Instance doesn't work since 2016.8.1

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2016.8
    • Fix Version/s: 2016.9
    • Component/s: None
    • Labels:
      None

      Description

      Since swarm release 2016.8.1 a manual lookup of the current CDI-instance from within application code results the following error:

      Caused by: java.lang.IllegalStateException: Unable to locate CDIProvider
              at javax.enterprise.inject.spi.CDI.findAllProviders(CDI.java:139)
              at javax.enterprise.inject.spi.CDI.getCDIProvider(CDI.java:120)
              at javax.enterprise.inject.spi.CDI.current(CDI.java:56)
      

      I've got a scenario where i have to lookup a CDI-Bean manually and for this i need the CDI-instance. The problem occurs when starting the swarm app from the IDE and via java-jar swarmjar. It's possible to reproduce by add the following snippet in a simple rest-ressource.

      CDI<Object> current = CDI.current();
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                kenfinni Ken Finnigan
                Reporter:
                mhofi Marco Hofstetter
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: