-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
liquibase-maven-plugin fails whith liquibase:diff in fresh generated jhipster 7.9.2 project #19518
Comments
I made some tests like upgrading liquibase to 4.15.0, forcing version on dependency to liquibase-test-harness 1.0.6, nothing helped. I then ran maven with -X option and got the error that seems to indicate that the problem is in Liquibase.
|
It looks to me like a DB2 license issue.
… On Aug 27, 2022, at 15:36, Gaël Marziou ***@***.***> wrote:
I made some tests like upgrading liquibase to 4.15.0, forcing version on dependency to liquibase-test-harness 1.0.6, nothing helped.
I then ran maven with -X option and got the error that seems to indicate that the problem is in Liquibase.
[INFO] --- liquibase-maven-plugin:4.12.0:diff (default-cli) @ jhipster-test ---
[DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for releases.java.net (http://maven.java.net/content/repositories/releases/).
[DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for shapshots.java.net (http://maven.java.net/content/repositories/snapshots/).
[DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for jvnet-nexus-staging (http://maven.java.net/content/repositories/staging/).
[DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for netbeans (http://bits.netbeans.org/nexus/content/groups/netbeans).
[WARNING] The POM for org.liquibase:liquibase-test-harness:jar:1.0.5 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.liquibase:liquibase-test-harness:1.0.5
[ERROR] 'dependencies.dependency.systemPath' for com.ibm.db2:db2-z-licence:jar must specify an absolute path but is ${project.basedir}/src/main/resources/drivers/db2/db2jcc_license_cisuz.jar @
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.262 s
[INFO] Finished at: 2022-08-27T23:31:53+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] version can neither be null, empty nor blank
java.lang.IllegalArgumentException: version can neither be null, empty nor blank
at org.apache.commons.lang3.Validate.notBlank (Validate.java:454)
at org.apache.maven.artifact.ArtifactUtils.notBlank (ArtifactUtils.java:107)
at org.apache.maven.artifact.ArtifactUtils.key (ArtifactUtils.java:97)
at org.apache.maven.ReactorReader.findArtifact (ReactorReader.java:101)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:306)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:229)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact (DefaultArtifactResolver.java:207)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom (DefaultArtifactDescriptorReader.java:240)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor (DefaultArtifactDescriptorReader.java:171)
at org.eclipse.aether.internal.impl.collect.DefaultDependencyCollector.resolveCachedArtifactDescriptor (DefaultDependencyCollector.java:538)
at org.eclipse.aether.internal.impl.collect.DefaultDependencyCollector.getArtifactDescriptorResult (DefaultDependencyCollector.java:523)
at org.eclipse.aether.internal.impl.collect.DefaultDependencyCollector.processDependency (DefaultDependencyCollector.java:410)
at org.eclipse.aether.internal.impl.collect.DefaultDependencyCollector.processDependency (DefaultDependencyCollector.java:362)
at org.eclipse.aether.internal.impl.collect.DefaultDependencyCollector.process (DefaultDependencyCollector.java:349)
at org.eclipse.aether.internal.impl.collect.DefaultDependencyCollector.collectDependencies (DefaultDependencyCollector.java:254)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies (DefaultRepositorySystem.java:284)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolveInternal (DefaultPluginDependenciesResolver.java:218)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve (DefaultPluginDependenciesResolver.java:165)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.createPluginRealm (DefaultMavenPluginManager.java:404)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupPluginRealm (DefaultMavenPluginManager.java:374)
at org.apache.maven.plugin.DefaultBuildPluginManager.getPluginRealm (DefaultBuildPluginManager.java:234)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:105)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:53)
at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:152)
at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:76)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
|
Profile (dev or prod) may be required. Cannot test in the moment. |
So I tried to run with dev profile: no change, expected as dev is the default profile. For prod profile, I had to start postgresql using:
And then
[INFO] Scanning for projects... [INFO] [INFO] -------------------< de.bitc.jhipster:jhipster-test >------------------- [INFO] Building Jhipster Test 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- liquibase-maven-plugin:4.12.0:diff (default-cli) @ jhipster-test --- [WARNING] The POM for org.liquibase:liquibase-test-harness:jar:1.0.5 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [ERROR] The liquibase-maven-plugin now manages logging via the standard maven logging config, not the 'logging' configuration. Use the -e, -X or -q flags or see https://maven.apache.org/maven-logging.html [INFO] ------------------------------------------------------------------------ [INFO] Loading artifacts into URLClassLoader [INFO] ------------------------------------------------------------------------ [INFO] #################################################### ## _ _ _ _ ## ## | | (_) (_) | ## ## | | _ __ _ _ _ _| |__ __ _ ___ ___ ## ## | | | |/ _` | | | | | '_ \ / _` / __|/ _ \ ## ## | |___| | (_| | |_| | | |_) | (_| \__ \ __/ ## ## \_____/_|\__, |\__,_|_|_.__/ \__,_|___/\___| ## ## | | ## ## |_| ## ## ## ## Get documentation at docs.liquibase.com ## ## Get certified courses at learn.liquibase.com ## ## Free schema change activity reports at ## ## https://hub.liquibase.com ## ## ## #################################################### Starting Liquibase at 09:22:31 (version 4.12.0 #3073 built at 2022-06-17 05:59+0000) [INFO] Settings ---------------------------- [INFO] driver: org.postgresql.Driver [INFO] url: jdbc:postgresql://localhost:5432/jhipsterTest [INFO] username: ***** [INFO] password: ***** [INFO] use empty password: false [INFO] properties file: null [INFO] properties file will override? false [INFO] clear checksums? false [INFO] changeLogDirectory: null [INFO] changeLogFile: D:\projets\jhipster-projects\issues\jhipster-test/src/main/resources/config/liquibase/master.xml [INFO] context(s): !test [INFO] label(s): null [INFO] referenceDriver: null [INFO] referenceUrl: hibernate:spring:de.bitc.jhipster.domain?dialect=tech.jhipster.domain.util.FixedPostgreSQL10Dialect&hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy&hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy [INFO] referenceUsername: ***** [INFO] referencePassword: ***** [INFO] referenceDefaultSchema: null [INFO] diffChangeLogFile: D:\projets\jhipster-projects\issues\jhipster-test/src/main/resources/config/liquibase/changelog/20220828072229_changelog.xml [INFO] ------------------------------------------------------------------------ [INFO] Set default schema name to public [INFO] Executing on Database: jdbc:postgresql://localhost:5432/jhipsterTest [INFO] Loading artifacts into URLClassLoader |
I used no profile (default, is dev) and the H2 database. |
Seeing the same problem. Fresh install using a monolith with Jhipster 7.9.2. |
Hello, |
OK.. I upgraded Liquibase version to 4.17.2 and the first error message disapeared :
(I went here to get a better version available for spring boot 2.7.3 : https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies/2.7.3) Now I still have the second message :
I someone can help with this one.. Thanks |
Hurray ! As the error message specifies that the "version can neither be null, empty nor blank", I added the version in the pom and it works 👍
Now I have an other problem : The H2 database must be running. And If running by "./mvnw" in a terminal, appears another problem : [ERROR] liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: Connection could not be created to jdbc:h2:file:C:\blabla\IdeaProjects\esbportal\target/h2d So I'm near the solution.. |
Did you manage to find the solution? |
Hi ! yes but I don't remember how..
Thank you 😊
Le lun. 24 avr. 2023 à 22:46, Will Mear ***@***.***> a écrit :
… Did you manage to find the solution?
—
Reply to this email directly, view it on GitHub
<#19518 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADMV63SSMPRN4VOAJGWBPDDXC3RCFANCNFSM57MMCSOA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hi guys, I solved the issue by adding the version of h2 under the plugin dependencies as follows
enjoy :) |
Additionally, removing '.Final' from the version is required for proper operation.
|
@hide212131 can you create a PR fixing the version? |
@mshima Yes, I plan to create a PR, after addressing the Gradle issue first 😅. |
Although I had run my project afteradding |
When I run in a fresh installed jhipster 7.9.2 project:
it fails.
Motivation for or Use Case
I used the liquibase diff feature often in older versions without problems. It generate automatic the liquibase xml files.
Reproduce the error
Generate an new project or check out my test project and run
./mvnw liquibase:diff compile
Related issues
Suggest a Fix
JHipster Version(s)
JHipster configuration, a
.yo-rc.json
file generated in the root folder.yo-rc.json file
JDL for the Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryJDL entity definitions
Environment and Tools
openjdk version "11.0.15" 2022-04-19
OpenJDK Runtime Environment 11.0.15_p10-r1 (build 11.0.15+10)
OpenJDK 64-Bit Server VM 11.0.15_p10-r1 (build 11.0.15+10, mixed mode, sharing)
git version 2.35.1
node: v18.6.0
npm: 8.13.2
Docker version 20.10.12, build e91ed5707e
docker-compose version 1.29.2, build unknown
No change to package.json was detected. No package manager install will be executed.
Congratulations, JHipster execution is complete!
Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryBrowsers and Operating System
The text was updated successfully, but these errors were encountered: