请稍等 ...
×

采纳答案成功!

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

mybatis-generator 生成失败


D:\Java\jdk-9.0.4\bin\java -Dmaven.multiModuleProjectDirectory=D:\Code\Java\Spring\mmall "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA 2017.3.4\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA 2017.3.4\plugins\maven\lib\maven3\bin\m2.conf" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2017.3.4\lib\idea_rt.jar=9876:C:\Program Files\JetBrains\IntelliJ IDEA 2017.3.4\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA 2017.3.4\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version=2017.3.5 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.imooc:mmall: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) @ mmall ---

[INFO] Connecting to the Database

Sat Mar 17 23:46:35 CST 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

[INFO] Introspecting table mmall_shipping

log4j:WARN No appenders could be found for logger (org.mybatis.generator.internal.db.DatabaseIntrospector).

log4j:WARN Please initialize the log4j system properly.

log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

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

[INFO] BUILD FAILURE

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

[INFO] Total time: 0.937 s

[INFO] Finished at: 2018-03-17T23:46:35+08:00

[INFO] Final Memory: 11M/39M

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

[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project mmall: Column name pattern can not be NULL or empty. -> [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


正在回答

1回答

同学~将你pom里面的plugn换成我这个试试哦

 <plugin>

                <groupId>org.mybatis.generator</groupId>

                <artifactId>mybatis-generator-maven-plugin</artifactId>

                <version>1.3.5</version>

                <configuration>

                    <configurationFile>src/main/resources/generatorConfig.xml</configurationFile>

                    <overwrite>false</overwrite>

                    <verbose>true</verbose>

                </configuration>

                <dependencies>

                    <dependency>

                        <groupId>mysql</groupId>

                        <artifactId>mysql-connector-java</artifactId>

                        <version>5.1.41</version>

                    </dependency>

                </dependencies>

            </plugin>


1 回复 有任何疑惑可以回复我~
  • 提问者 慕桂英1068294 #1
    我之前是使用mysql-connector-java-6.0.6.jar;
    后来把老师的mysql-connector-java-5.1.6-bin.jar  复制过来就能用了;
    回复 有任何疑惑可以回复我~ 2018-03-18 00:03:02
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信