quarkus: Offer missing extension advice upon Arc UnsatisfiedResolutionException

Here is a typical mistake a user makes: he forgets to add quarkus-vertx as a dependency leading to

Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type io.vertx.reactivex.core.Vertx and qualifiers [@Default]
	- java member: com.ziphii.promptpay.bulkpay.endpoints.NibssBulkPayService#vertx
	- declared on CLASS bean [types=[com.ziphii.promptpay.bulkpay.endpoints.NibssBulkPayService], qualifiers=[@Default, @Any], target=com.ziphii.promptpay.bulkpay.endpoints.NibssBulkPayService]
	at io.quarkus.arc.processor.Beans.resolveInjectionPoint(Beans.java:472)
	at io.quarkus.arc.processor.BeanInfo.init(BeanInfo.java:402)
	at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:205)
	... 14 more

I propose, that we have a mapping of missing type to extension so that we can throw a meaningful error “Have added the quarkus-vertx extension in your pom.xml or Gradle project?”. That would be a good usability improvement

This is not the first time I see people missing dependencies, and the ArC exception is quite intimidating and does not lead to the core of the problem.

CC @FroMage @mkouba

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 18 (16 by maintainers)

Most upvoted comments

CC @maxandersen might need more metadata down the line (post 1.0)