mybatis测试的时候报错No suitable driver found for jdbc。。。解决办法
2016-11-01 10:13
651 查看
原文链接:http://www.blogjava.net/w2gavin/articles/217864.html
今天出现编码出现了No suitable driver found for jdbc,又是找遍了网上的资料,基本上都说是三个问题:
一是:连接URL格式出现了问题(Connection conn=DriverManager.getConnection(“jdbc:mysql://localhost:3306/XX”,”root”,”XXXX”)
二是:驱动字符串出错(com.mysql.jdbc.Driver)
三是Classpath中没有加入合适的mysql_jdbc驱动
经过我的仔细检查,这三种错误我都没有犯,为什么呢?
尝试着将mysql-connector-java-3.1.14-bin.jar的jar包加入C:\Program Files\Java\jre1.6.0_02\lib\ext文件夹下,问题解决了!!
原来是不仅仅要求将驱动加入classpath中,而且需要将该jar包加入到java运行环境的外部jar包中,唉,下次这种低级错误还是少犯为妙。
今天出现编码出现了No suitable driver found for jdbc,又是找遍了网上的资料,基本上都说是三个问题:
一是:连接URL格式出现了问题(Connection conn=DriverManager.getConnection(“jdbc:mysql://localhost:3306/XX”,”root”,”XXXX”)
二是:驱动字符串出错(com.mysql.jdbc.Driver)
三是Classpath中没有加入合适的mysql_jdbc驱动
经过我的仔细检查,这三种错误我都没有犯,为什么呢?
尝试着将mysql-connector-java-3.1.14-bin.jar的jar包加入C:\Program Files\Java\jre1.6.0_02\lib\ext文件夹下,问题解决了!!
原来是不仅仅要求将驱动加入classpath中,而且需要将该jar包加入到java运行环境的外部jar包中,唉,下次这种低级错误还是少犯为妙。
相关文章推荐
- jdbc连接sql server2008 No suitable driver found for jdbc:sqlserver的解决办法
- JAVA No suitable driver found for jdbc:microsoft:sqlserver://localhost:1433/xxxxxx 解决办法
- 关于No suitable driver found for com.mysql.jdbc.Driver问题的解决办法
- java.sql.SQLException: No suitable driver found for jdbc:mysql:/localhost/XXX?还是没有解决
- 使用ntpdate更新linux时间的时候出现 no server suitable for synchronization found解决办法
- No Suitable Driver Found For Jdbc的解决方法
- android studio下解决 java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/
- java连接mysql :No Suitable Driver Found For Jdbc 解决方法
- No suitable driver found for jdbc_我的解决方法
- Tomcat 部署 时 java.sql.SQLException: No suitable driver found for jdbc:sqlserver 我是怎么解决的
- java连接mysql :No Suitable Driver Found For Jdbc 解决方法
- No suitable driver found for jdbc解决方法
- No Suitable Driver Found For Jdbc_我的解决方法
- 关于解决"No suitable driver found for jdbc:mysql:/localhost:3306"问题的步骤
- No Suitable Driver Found For Jdbc_我的解决方法
- No Suitable Driver Found For Jdbc错误解决
- 关于解决No suitable driver found for jdbc:oracle:thin:@//localhost:1521/orcl的问题
- No Suitable Driver Found For Jdbc_解决方法
- No suitable driver found for jdbc解决方法
- JMeter添加测试数据是发生错误 no suitable driver found for JDBC