失乐园

技术之路

BlogJava 联系 聚合 管理
  19 Posts :: 44 Stories :: 40 Comments :: 0 Trackbacks
    今天出现编码出现了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包中,唉,下次这种低级错误还是少犯为妙。
posted on 2008-07-27 20:21 狄浩 阅读(185123) 评论(31)  编辑  收藏

Feedback

# re: No suitable driver found for jdbc_我的解决方法[未登录] 2010-08-01 19:30 Peter
谢谢,不胜感激!  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法 2011-05-27 05:52 路过
我的是错误1.谢谢。  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法 2011-08-10 12:39 ant
非常感谢 解决了  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法 2011-11-08 21:15 fangge
无限感激!!!  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法 2011-12-08 14:20 goodbye
@Peter
很好  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法[未登录] 2012-05-18 10:00 java学习者
多谢了,这个方法解决了我的问题  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法 2012-07-04 10:51 Tiny
用的sqlserver 把那个JDBC驱动 复制进去了 刚开始还是不好使  最后莫名其妙的 也好使了...  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法 2012-10-26 10:37 xiangchenglin
亲,这4中情况我都没错,但是还是出问题了  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法 2012-10-29 20:56
大神~~~碉堡了。成功了谢了  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法 2012-11-16 15:15 上官宁
解决了,顶  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法 2012-11-26 22:35 paper
这个说不通吧?classpath是JVM虚拟机启动的时候寻找的路径啊...严重怀疑楼主是否真正的将JAR文件添加到了classpath...  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法 2013-02-01 15:57
感谢,问题解决了  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法[未登录] 2013-05-24 15:13 alex
同感@paper
  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法 2013-08-16 11:15 TonyParker
en @alex
  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法 2013-11-08 14:58 taj
有用!  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法 2014-03-11 23:06 jsy
为什么我没有解决?  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法 2014-03-20 22:37 oy
高,我的通过了
  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法 2014-04-14 20:20 QYQ
十分感谢!  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法 2014-06-10 23:16 zzz
你教会了我做人  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法 2014-07-11 09:33 131
我的都是无意中链接多了个字母  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法 2014-10-25 21:37 dff
No suitable driver  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法 2014-11-20 15:08 12
大牛。。。。  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法 2014-12-23 11:09 grt
好  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法[未登录] 2015-02-11 10:45 dd
楼主说的对,我就是通过将mysql-connector-java-3.1.14-bin.jar的jar包加入C:\Program Files\Java\jre1.6.0_02\lib\ext文件夹下,然后就成功了  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法[未登录] 2015-02-11 10:45 dd
我就是通过将mysql-connector-java-3.1.14-bin.jar的jar包加入C:\Program Files\Java\jre1.6.0_02\lib\ext文件夹下,就成功了  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法[未登录] 2015-04-24 15:08 wang
真的可以回复哎  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法 2015-05-29 10:14 tt
@dd
好用  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法 2015-06-14 14:55 网友
厉害 ssh整合的,其他配置感觉没错,然后把他放到ext文件夹就可以了!  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法 2016-03-13 17:31 酱油
有没有截图啊我不会弄啊
  回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法 2016-04-07 15:21 网友
确实解决了 导入到java外部包中   回复  更多评论
  

# re: No suitable driver found for jdbc_我的解决方法[未登录] 2016-08-16 10:20 sa
@网友
zhen de   回复  更多评论
  


只有注册用户登录后才能发表评论。


网站导航: