gpt4 book ai didi

java - 我正在为 Jhipster 全新项目运行 Maven 命令,并尝试配置数据库连接,但失败

转载 作者:行者123 更新时间:2023-11-29 12:24:29 25 4
gpt4 key购买 nike

命令:

mvn liquibase:diff -X 

jhipster 上的 mysql 设置在 mac-os 上失败

[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.3.2:diff (default-cli) on project jeces: Error setting up or running Liquibase: javax.persistence.PersistenceException: Unable to resolve persistence unit root URL: class path resource [] cannot be resolved to URL because it does not exist -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.liquibase:liquibase-maven-plugin:3.3.2:diff (default-cli) on project jeces: Error setting up or running Liquibase: javax.persistence.PersistenceException: Unable to resolve persistence unit root URL
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error setting up or running Liquibase: javax.persistence.PersistenceException: Unable to resolve persistence unit root URL
at org.liquibase.maven.plugins.AbstractLiquibaseMojo.execute(AbstractLiquibaseMojo.java:373)
at org.liquibase.maven.plugins.LiquibaseDatabaseDiff.execute(LiquibaseDatabaseDiff.java:145)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: liquibase.exception.DatabaseException: javax.persistence.PersistenceException: Unable to resolve persistence unit root URL

最佳答案

问题是 java 运行时版本(需要 java 8),并且 application_dev.xml 中缺少配置: 驱动程序:com.mysql.jdbc.Driver 默认架构:jeces 引用网址:hibernate:spring:my.app.domain?方言=my.app.utils.MySQL5InnoDBCompressedDialect 引用驱动程序:com.mysql.jdbc.Driver 详细:真实 首先下降:假 日志记录:调试

一旦我跑了:mvn spring-boot:运行mysql 正在工作

关于java - 我正在为 Jhipster 全新项目运行 Maven 命令,并尝试配置数据库连接,但失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28550315/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com