请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

mybatis- generator出错

D:\jdk1.8.0_112\bin\java -Dmaven.home=D:\apache-maven-3.0.5 -Dclassworlds.conf=D:\apache-maven-3.0.5\bin\m2.conf -Didea.launcher.port=7533 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 15.0.6\bin" -Dfile.encoding=UTF-8 -classpath "D:\apache-maven-3.0.5\boot\plexus-classworlds-2.4.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 15.0.6\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=15.0.6 -s D:\apache-maven-3.0.5\conf\settings.xml -Dmaven.repo.local=D:\apache-maven-3.3.3\Repository org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate

[INFO] Scanning for projects...

[WARNING] 

[WARNING] Some problems were encountered while building the effective model for com:myall:war:1.0-SNAPSHOT

[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 265, column 15

[WARNING] 

[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.

[WARNING] 

[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.

[WARNING] 

[INFO]                                                                         

[INFO] ------------------------------------------------------------------------

[INFO] Building mmall Maven Webapp 1.0-SNAPSHOT

[INFO] ------------------------------------------------------------------------

[INFO] 

[INFO] --- mybatis-generator-maven-plugin:1.3.2:generate (default-cli) @ myall ---

[INFO] Connecting to the Database

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 0.712s

[INFO] Finished at: Tue Jan 09 15:17:10 CST 2018

[INFO] Final Memory: 7M/121M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project myall: Communications link failure

[ERROR] 

[ERROR] Last packet sent to the server was 0 ms ago.

[ERROR] -> [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/MojoExecutionException


Process finished with exit code 1

我的db.url用的是localhost:3306

正在回答

1回答

[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project myall: Communications link failure

通信连接错误,是否跟MySQL正确关联了呢?检查数据库连接配置,看看IP、端口等等配置是否正确。

0 回复 有任何疑惑可以回复我~
  • 提问者 Drunk320 #1
    端口号,ip什么的都是正确的,能再说说还有什么需要检查的吗
    回复 有任何疑惑可以回复我~ 2018-01-10 14:44:55
  • 提问者 Drunk320 #2
    已经好了,我把db.url的localhost改成127.0.0.1就正常运行了。感觉太玄学了,被这个问题卡了快两天了,好气啊
    回复 有任何疑惑可以回复我~ 2018-01-11 00:37:03
  • 好的,能解决就好ℰ⋆‿⋆ℰ
    回复 有任何疑惑可以回复我~ 2018-01-11 06:40:35
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信