Reputation: 381
I have a very simple project where I'm experimenting with BPM (Quarkus, Kogito, jBPM and Drools) and it fails to build on Java 11. Here is the github repo: https://github.com/JoaoCamposFrom94/bpmdemo/tree/2808d87428ddb91c43c0b2554a5808ca4299293e
The project has a couple of REST endpoints that save forms in a hashmap. I was going to experiment with drools by using it to validate some fields on the endpoint POST /demo/form/{id} and with jBPM by starting a simple process that executes arbitrary java code on the endpoint POST /demo/form.
By running mvn compile quarkus:dev
I get an error in some generated code.
import org.kie.kogito.Config;
@javax.inject.Singleton()
public class Application implements org.kie.kogito.Application {
@org.eclipse.microprofile.config.inject.ConfigProperty(name = "kogito.service.url", defaultValue = "")
java.lang.String kogitoService;
@javax.inject.Inject()
org.kie.kogito.Config config;
public Config config() {
return config;
}
}
...
(class changed for brevity)
11:16:28,528 ERROR [io.qua.dev.DevModeMain] Failed to start Quarkus: java.lang.RuntimeException: 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: Found 4 deployment problems:
[1] Ambiguous dependencies for type org.kie.kogito.Application and qualifiers [@Default]
- java member: com.demo.form.CreateFormProcessResource#application
- declared on CLASS bean [types=[com.demo.form.CreateFormProcessResource], qualifiers=[@Default, @Any], target=com.demo.form.CreateFormProcessResource]
- available beans:
- CLASS bean [types=[org.kie.kogito.app.Application, java.lang.Object, org.kie.kogito.Application], qualifiers=[@Default, @Any], target=org.kie.kogito.app.Application]
- CLASS bean [types=[com.demo.poc.Application, java.lang.Object, org.kie.kogito.Application], qualifiers=[@Default, @Any], target=com.demo.poc.Application]
[2] Ambiguous dependencies for type org.kie.kogito.Config and qualifiers [@Default]
- java member: org.kie.kogito.app.Application#config
- declared on CLASS bean [types=[org.kie.kogito.app.Application, java.lang.Object, org.kie.kogito.Application], qualifiers=[@Default, @Any], target=org.kie.kogito.app.Application]
- available beans:
- CLASS bean [types=[com.demo.poc.ApplicationConfig, org.kie.kogito.Config, java.lang.Object], qualifiers=[@Default, @Any], target=com.demo.poc.ApplicationConfig]
- CLASS bean [types=[org.kie.kogito.Config, java.lang.Object, org.kie.kogito.app.ApplicationConfig], qualifiers=[@Default, @Any], target=org.kie.kogito.app.ApplicationConfig]
Complete dump of the error message: https://pastebin.com/dLDwaWfJ
Upvotes: 3
Views: 2436
Reputation: 381
This got answered at https://groups.google.com/forum/#!topic/kogito-development/Xkkon4tLHdo.
My pom.xml was specifying a kogito build plugin and a quarkus build plugin. Having both causes conflicts, I simply removed the kogito build plugin.
Upvotes: 4