1

I am having trouble getting my changelog to be compiled, due to Liquibase not being able to load the correct Serializer. Anyone know what the issue could be? Here is my config:

<groupId>org.liquibase</groupId>
     <artifactId>liquibase-maven-plugin</artifactId>
     <version>${liquibase.version}</version>
     <configuration>
         <changeLogFile>${project.basedir}/src/main/resources/config/liquibase/master.xml</changeLogFile>
         <diffChangeLogFile>${project.basedir}/src/main/resources/config/liquibase/changelog/${maven.build.timestamp}_changelog.xml</diffChangeLogFile>
         <driver>org.h2.Driver</driver>
         <url>jdbc:h2:file:${project.build.directory}/h2db/db/my_project</url>
         <defaultSchemaName></defaultSchemaName>
         <username>my_project</username>
         <password></password>
         <referenceUrl>hibernate:spring:com.my.comp?dialect=org.hibernate.dialect.H2Dialect&amp;hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy&amp;hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy</referenceUrl>
         <verbose>true</verbose>
         <logging>debug</logging>
         <contexts>!test</contexts>
         <diffExcludeObjects>oauth_access_token, oauth_approvals, oauth_client_details, oauth_client_token, oauth_code, oauth_refresh_token</diffExcludeObjects>
     </configuration>

Error Message:

[INFO] Cannot load service: liquibase.serializer.ChangeLogSerializer: Provider liquibase.serializer.core.xml.XMLChangeLogSerializer could not be instantiated [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 16.947 s [INFO] Finished at: 2021-09-25T11:57:46+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:4.3.5:diff (default-cli) on project notionmeet: [ERROR] Error setting up or running Liquibase: [ERROR] liquibase.command.CommandExecutionException: java.lang.RuntimeException: No serializers associated with the filename or extension '/home/projects/project/src/main/resources/config/liquibase/changelog/20210925095729_changelog.xml'

Borzi
  • 537
  • 1
  • 5
  • 21
  • What is your JHipster version? Did you modify the generated pom.xml? – Gaël Marziou Sep 27 '21 at 08:28
  • Yes I did! I added Lambok. Version is 7.2.0. – Borzi Sep 29 '21 at 07:17
  • Lombok cannot have an impact on liquibase maven plugin, so you should be able to reproduce on a freshly generated project and open an issue on JHipster's github project and provide output of `jhipster info`. Why do you use liquibase:diff, it should not be required since JHipster 7 and incremental changelogs unless you make manual changes to your database? – Gaël Marziou Sep 29 '21 at 07:34
  • Yeah I made manual changes - in the docs it said that this is what you should do after. – Borzi Sep 29 '21 at 07:39
  • Personally, I do small changes at a time, so it's easier and faster to create a small changelog manually for me rather than using liquibase:diff. – Gaël Marziou Sep 29 '21 at 07:44
  • The `Provider liquibase.serializer.core.xml.XMLChangeLogSerializer could not be instantiated` message is letting us know it had a problem loading the logic to save files as XML, but it's not doing a good job of saying WHY. Can you increase your log level to FINE and see if it gives more info on why that class can't be instantiated? Maybe a missing dependency or something? – Nathan Voxland Sep 30 '21 at 21:46

0 Answers0