1、错误描述
Unexpected error while running MyBatis Generator.
Cannot resolve classpath entry: mysql-connector-java-5.1.38.jar
2、错误原因
由错误提示可知,是找不到mysql-connector-java-5.1.38.jar,但是我将mysql-connector-java-5.1.38.jar跟generatorConfig.xml放在同一目录下,但是找不到
<classPathEntry location="mysql-connector-java-5.1.38.jar" />
3、解决办法
找到java连接mysql的驱动jar,利用绝对路径
<classPathEntry location="D:MyEclipse10workspaceOCPsrcmainwebappWEB-INFlibmysql-connector-java-5.1.38.jar" />