0

when I run

./mvnw liquibase:diff

The error I get is

[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:4.2.2:diff (default-cli) on project engine-7: Execution default-cli of goal org.liquibase:liquibase-maven-plugin:4.2.2:diff failed: A required class was missing while executing org.liquibase:liquibase-maven-plugin:4.2.2:diff: org/springframework/orm/jpa/persistenceunit/DefaultPersistenceUnitManager
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.liquibase:liquibase-maven-plugin:4.2.2
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy

What could be the issue in my Jhiptser + Micronaut setup

I am trying to add a new column in my entity I imported JDL file using jhipster jdl myjdl.jdl command.

My pom.xml

<dependency>
            <groupId>io.github.jhipster</groupId>
            <artifactId>jhipster-framework</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-context-support</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-autoconfigure</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-aop</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-web</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
Mrugesh Vaghela
  • 195
  • 1
  • 1
  • 11
  • There is a missing dependency in your pom.xml for liquibase-maven-plugin, please edit your question with relevant section. The missing dependency is probably spring-data-jpa based on the missing class name DefaultPersistenceUnitManager. If you did not modify generated pom.xml, you should report a bug to JHipster team on github. Also, I'm not sure why you call both compile and liquibase:diff goals, have you read the doc? https://www.jhipster.tech/development/#using-a-database – Gaël Marziou Sep 28 '21 at 16:45
  • @GaëlMarziou updated command and my pom.xml has springframework dependencies mentioned by default and yes, I did not modify it manually. All spring dependencies are under the exclusion. – Mrugesh Vaghela Sep 29 '21 at 04:37
  • These are not the dependencies of your liquibase maven plugin, this looks like the dependencies of your application. What I suspect is that due to jhipster micronaut blueprint some dependencies have been removed from your app classpath and liquibase maven plugin dependencies must be updated to add missing ones, you should report it to jhipster micronaut blueprint. – Gaël Marziou Sep 29 '21 at 07:42
  • @GaëlMarziou got your point, I'll check and report. Thanks. micronaut blue print is not anyway updated since 2.x, people have suggested to upgrade with 3.X, so may be they will cover all the bugs reported. – Mrugesh Vaghela Sep 29 '21 at 12:02
  • I agree that the project is not very active despite bug bounties, in comparison jhipster quarkus blueprint is more active. – Gaël Marziou Sep 29 '21 at 14:28

0 Answers0