Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-2178

Misleading error message during Weld bootstrap

    XMLWordPrintable

    Details

      Description

      For weld-se 2.3.4.Final and even for Java 8 + weld-se-core 3.0.0.Alpha16 I'm getting following error message when executing the attached sample app:

      org.jboss.weld.exceptions.UnsatisfiedResolutionException: WELD-001308: Unable to resolve any beans for Type: class weld.bug.report.demo.BeanA; Qualifiers: []
      		at org.jboss.weld.bean.builtin.InstanceImpl.get(InstanceImpl.java:100)
      		at weld.bug.report.demo.Main.main(Main.java:14)
      
      

      So we are getting UnsatisfiedResolutionException while the bean definition clearly exists but the real problem is lack of the default constructor inside BeanA class. Unfortunately error message says nothing about this.

      IMHO it is misleading.

      Expected behaviour: approperiate error message which would say something like "Lack of the approperiate constructor".

        Attachments

          Activity

            People

            Assignee:
            tremes Tomas Remes
            Reporter:
            gdemecki Grzegorz Demecki (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: