1

I have problem using quarkus using in persistence layer io.vertx.mutiny.mysqlclient.MySQLPool

This is the repo class:

@ApplicationScoped
public class OrderDaoImpl implements OrderDao {

@Inject
MySQLPool client;

    @Override
    public Uni<OrderTransaction> retrieveOrderByTrackingNumberReactive(String hashOrder) throws OrderException {

        try {
            return client
                    .preparedQuery(SELECT_ORDER_ID_BY_HASH)
                    .execute(Tuple.of(hashOrder))
                    .onItem()
                    .transform(m -> m.iterator().hasNext() ? OrderTransaction.from(m.iterator().next()) : null);

        } catch (Exception e) {
            throw new OrderException("Error during retrieve order");
        }

    }
}

and this is the error:

[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:2.7.5.Final:build (default) on project quarkus-root: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR]         [error]: Build step io.quarkus.arc.deployment.ArcProcessor#validate threw an exception: javax.enterprise.inject.spi.DeploymentException: Found 2 deployment problems: 
[ERROR] [1] Unsatisfied dependency for type io.vertx.mutiny.mysqlclient.MySQLPool and qualifiers [@Default]

Have you got any suggestions? Thank you!

this is the pom.xml of submodel where i launch :

mvn compile quarkus:dev

    <dependencies>

        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-resteasy</artifactId>
            <scope>provided</scope>
        </dependency>


        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-smallrye-openapi</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-arc</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-resteasy-jsonb</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-rest-client</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.smallrye.reactive</groupId>
            <artifactId>smallrye-mutiny-vertx-sql-client</artifactId>
            <version>2.21.0</version>
        </dependency>

Added just the dependency.

krz00
  • 11
  • 2

1 Answers1

0

I know this is a late reply.

Remove the following in your pom.xml file:

    <dependency>
       <groupId>io.quarkus</groupId>
       <artifactId>quarkus-rest-client</artifactId>
       <scope>provided</scope>
    </dependency>

    <dependency>
       <groupId>io.smallrye.reactive</groupId>
       <artifactId>smallrye-mutiny-vertx-sql-client</artifactId>
       <version>2.21.0</version>
    </dependency>

Replace with:

    <dependency>
       <groupId>io.quarkus</groupId>
       <artifactId>quarkus-reactive-mysql-client</artifactId>
       <version>3.1.0.Final</version>
    </dependency>