求救!db.driverLocation路径问题!

来源:5-10 mybatis三剑客之mybatis-generator生成数据对象和时间戳优化

睡鼠Zzz

2018-01-22

我已经从源码的tools里面将bin.jar拷贝了出来,并且将driverlocation指向了相应位置,却仍然无法generate


报错:

objc[4579]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.

[INFO] Scanning for projects...

[WARNING] 

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

[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 264, 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 mastermall Maven Webapp 1.0-SNAPSHOT

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

[INFO] 

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

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

[INFO] BUILD FAILURE

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

[INFO] Total time: 1.728s

[INFO] Finished at: Mon Jan 22 01:52:25 EST 2018

[INFO] Final Memory: 6M/64M

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

[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project mastermall: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate failed: Cannot resolve classpath entry: ${db.driverLocation} -> [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

配置文件:

db.driverLocation= /Library/developer/mysql-connector-java-5.1.6-bin.jar
db.driverClassName=com.mysql.jdbc.Driver
db.url=jdbc:mysql://localhost:3306/mastermall?characterEncoding=utf-8
db.username=mastermall
db.password=mastermall

写回答

3回答

睡鼠Zzz

提问者

2018-01-23

没事了,我的等号不小心打成日文格式的了。

1
1
Geely
解决了就好..这个日文格式好神奇。。辛苦同学,最近单位特别忙,刚下班。回复晚了。海涵呀。
2018-01-25
共1条回复

从哪里跌倒还是在爬起来

2018-04-06

如果有同学在这里出现问题的话,用log打印出来日志(打log方法:https://blog.csdn.net/sunny243788557/article/details/45166397)

,然后如果错误中有//img.mukewang.com/szimg/5ac721750001683311980319.jpg,请返回datasource,把数据库的ip地址db.url改为 本地(127.0.0.1 或者localhost)。

0
0

星辰Iron

2018-01-22

你好同学,改成绝对路径再试试,类似于下面这种形式

db.driverLocation=E:/imooc/mysql-connector-java-5.1.6-bin.jar


0
4
睡鼠Zzz
或者总不能是我的idea版本的问题吧。。。不支持插件?我用的2017最新版
2018-01-22
共4条回复

从0开始 独立完成企业级Java电商网站服务端开发

前后端分离,数据库接口设计,架构设计,功能开发,上线运维

9476 学习 · 8804 问题

查看课程