Forward failures to resolve beans from Spring/CDI

Description

See https://discourse.hibernate.org/t/indexation-post-treatment/3753/19

One problem that prevents us from forwarding such failures is that we fall back to using reflection when we can't find a bean using Spring/CDI, and Hibernate ORM (who manages this fallback) does not preserve both stack traces, just the one from the fallback.

One solution would be to change Hibernate ORM so that it preserves both stack traces and gives a clearer error message.

Another solution would be to change the format of bean references so that the user tells us precisely whether they want a Spring/CDI bean or an instantiation through reflection; that way, we would not have to fall back anymore. For exemple require a "bean:"/"classpath:" prefix in string references. The problem would still be there for references by type (Class<?>), though.

Environment

None

Assignee

Unassigned

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Pull Request

None

Feedback Requested

None

Components

Fix versions

Priority

Major
Configure