[已解决]IDEA:SpringBoot: [ERROR]Failed to execute goal org.mybatis.generator:

博主新拉项目连接自己数据库时出错,经排查发现是数据库版本不匹配,项目使用的是5.xx.xx版本,而博主的是8.xx.xx版本,提醒大家注意。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

今天新拉的项目,连自己的数据库发生以下错误,弄了小半天,发现是数据库的版本不对,项目的数据库使用的是5.xx.xx版本,我的是8.xx.xx版本,一时没注意,弄了个麻烦,特此注意。

 [ERROR]Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2
 :generate (default-cli) on project vdam: Could not create connection to database server. -> [Help 1]
"C:\Program Files\Java\jdk-17\bin\java.exe" -Dmaven.multiModuleProjectDirectory=C:\javaproject\train -Djansi.passthrough=true "-Dmaven.home=C:/Program Files/JetBrains/IntelliJ IDEA 2025.1.1.1/plugins/maven/lib/maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA 2025.1.1.1\plugins\maven\lib\maven3\bin\m2.conf" "-Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA 2025.1.1.1\plugins\maven\lib\maven-event-listener.jar" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2025.1.1.1\lib\idea_rt.jar=62947" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA 2025.1.1.1\plugins\maven\lib\maven3\boot\plexus-classworlds-2.8.0.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2025.1.1.1\plugins\maven\lib\maven3\boot\plexus-classworlds.license" org.codehaus.classworlds.Launcher -Didea.version=2025.1.1.1 -s C:\Maven\apache-maven-3.8.8\conf\settings.xml -Dmaven.repo.local=C:\Maven\apache-maven-3.8.8\mvn org.mybatis.generator:mybatis-generator-maven-plugin:1.4.0:generate [INFO] Scanning for projects... [INFO] [INFO] --------------------------< org.jw:generator >-------------------------- [INFO] Building generator 0.0.1-SNAPSHOT [INFO] from pom.xml [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- mybatis-generator:1.4.0:generate (default-cli) @ generator --- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.393 s [INFO] Finished at: 2025-08-02T11:36:15+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.4.0:generate (default-cli) on project generator: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.4.0:generate failed: Cannot instantiate object of type null: NullPointerException -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException Process finished with exit code 1
最新发布
08-03
运行generator代码生成器的时候出现了下方提示:"C:\Program Files\Java\jdk-21.0.3\bin\java.exe" -Dmaven.multiModuleProjectDirectory=D:\Idea\IdeaProjects\train\generator -Djansi.passthrough=true "-Dmaven.home=D:\Idea\IntelliJ IDEA 2024.3.1.1\plugins\maven\lib\maven3" "-Dclassworlds.conf=D:\Idea\IntelliJ IDEA 2024.3.1.1\plugins\maven\lib\maven3\bin\m2.conf" "-Dmaven.ext.class.path=D:\Idea\IntelliJ IDEA 2024.3.1.1\plugins\maven\lib\maven-event-listener.jar" "-javaagent:D:\Idea\IntelliJ IDEA 2024.3.1.1\lib\idea_rt.jar=56501:D:\Idea\IntelliJ IDEA 2024.3.1.1\bin" -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -classpath "D:\Idea\IntelliJ IDEA 2024.3.1.1\plugins\maven\lib\maven3\boot\plexus-classworlds-2.8.0.jar;D:\Idea\IntelliJ IDEA 2024.3.1.1\plugins\maven\lib\maven3\boot\plexus-classworlds.license" org.codehaus.classworlds.Launcher -Didea.version=2024.3.1.1 org.mybatis.generator:mybatis-generator-maven-plugin:1.4.0:generate [INFO] Scanning for projects... [INFO] [INFO] -------------------------< com.jjk:generator >-------------------------- [INFO] Building generator 0.0.1-SNAPSHOT [INFO] from pom.xml [INFO] --------------------------------[ jar ]--------------------------------- [WARNING] The POM for com.jjk:train-member:jar:0.0.1-SNAPSHOT is missing, no dependency information available [WARNING] The POM for com.jjk:train-business:jar:0.0.1-SNAPSHOT is missing, no dependency information available [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.420 s [INFO] Finished at: 2025-03-28T14:17:57+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project generator: Could not resolve dependencies for project com.jjk:generator:jar:0.0.1-SNAPSHOT [ERROR] dependency: com.jjk:train-member:jar:0.0.1-SNAPSHOT (compile) [ERROR] Could not find artifact
03-29
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值