eventuate-examples / eventuate-quarkus-examples-customers-and-orders

Other
9 stars 2 forks source link

io.quarkus.builder.BuildException: Build failure: Build failed due to errors [error]: Build step io.quarkus.arc.deployment.ArcProcessor#validate threw an exception: javax.enterprise.inject.spi.DeploymentException #2

Open dartartem opened 3 years ago

dartartem commented 3 years ago
* What went wrong:
Execution failed for task ':orders-service:quarkusBuild'.
> io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkus.arc.deployment.ArcProcessor#validate threw an exception: javax.enterprise.inject.spi.DeploymentException: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type javax.validation.Validator and qualifiers [@Default]
        - java member: io.quarkus.arc.runtime.config.ConfigPropertiesProducer#produceEventuateKafkaConsumerQuarkusConfigurationProperties()
        - declared on PRODUCER METHOD bean [types=[io.eventuate.messaging.kafka.quarkus.basic.consumer.EventuateKafkaConsumerQuarkusConfigurationProperties, java.lang.Object], qualifiers=[@Default, @Any], target=io.eventuate.messaging.kafka.quarkus.basic.consumer.EventuateKafkaConsumerQuarkusConfigurationProperties produceEventuateKafkaConsumerQuarkusConfigurationProperties(org.eclipse.microprofile.config.Config, javax.validation.Validator), declaringBean=io.quarkus.arc.runtime.config.ConfigPropertiesProducer]
        at io.quarkus.arc.processor.BeanDeployment.processErrors(BeanDeployment.java:1055)
        at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:245)
        at io.quarkus.arc.processor.BeanProcessor.initialize(BeanProcessor.java:129)
        at io.quarkus.arc.deployment.ArcProcessor.validate(ArcProcessor.java:423)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:972)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
        at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
        at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
        at java.lang.Thread.run(Thread.java:748)
        at org.jboss.threads.JBossThread.run(JBossThread.java:479)
  Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type javax.validation.Validator and qualifiers [@Default]
        - java member: io.quarkus.arc.runtime.config.ConfigPropertiesProducer#produceEventuateKafkaConsumerQuarkusConfigurationProperties()
        - declared on PRODUCER METHOD bean [types=[io.eventuate.messaging.kafka.quarkus.basic.consumer.EventuateKafkaConsumerQuarkusConfigurationProperties, java.lang.Object], qualifiers=[@Default, @Any], target=io.eventuate.messaging.kafka.quarkus.basic.consumer.EventuateKafkaConsumerQuarkusConfigurationProperties produceEventuateKafkaConsumerQuarkusConfigurationProperties(org.eclipse.microprofile.config.Config, javax.validation.Validator), declaringBean=io.quarkus.arc.runtime.config.ConfigPropertiesProducer]
        at io.quarkus.arc.processor.Beans.resolveInjectionPoint(Beans.java:484)
        at io.quarkus.arc.processor.BeanInfo.init(BeanInfo.java:378)
        at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:237)
        ... 14 more``
dartartem commented 3 years ago

Problem was in compile "org.springframework.boot:spring-boot-starter-web:$springBootVersion"

Chris:

Why does the order service need rest template from spring?

CustomerServiceProxy uses it to make calls to customer service: https://github.com/dartartem/eventuate-quarkus-examples-customers-and-orders/blob/master/orders-service/src/main/java/net/chrisrichardson/eventstore/examples/customersandorders/ordersservice/backend/CustomerServiceProxy.java

Micronaut version also uses it. RestTemplate is just a class, so why not use it? Quarkus provides too complicated way to do similar things: https://quarkus.io/guides/rest-client

cer commented 3 years ago

A few issues:

dartartem commented 3 years ago

@cer, ok then I will use quarkus http client