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

Misleading error message during Weld bootstrap

    Details

    • Type: Enhancement
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 3.0.0.Alpha16
    • Fix Version/s: 2.3.5.Final, 3.0.0.Alpha17
    • Component/s: Java SE Support
    • Labels:
      None
    • Environment:

      Windows 7
      Oracle JDK 1.7_75, 1.8_40
      Weld 2.3.4.Final, 3.0.0.Alpha16

      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".

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: