首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

亟需帮助!Caused by: java.sql.SQLException: No suitable driver found for jdbc:mysql:/

2013-03-10 
急需帮助!Caused by: java.sql.SQLException: No suitable driver found for jdbc:mysql:/初学hibernate,

急需帮助!Caused by: java.sql.SQLException: No suitable driver found for jdbc:mysql:/
初学hibernate,在连接mysql时,测试类main方法中可以运行获得数据,tomcat就报错
Caused by: java.sql.SQLException: No suitable driver found for jdbc:mysql://127.0.0.1:3306/test
求高手指点指点!!!


<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
<session-factory>

<property name="connection.driver-class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://127.0.0.1:3306/test</property>
<property name="connection.username">root</property>
<property name="connection.password">123123</property>

<property  name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="show_sql">true</property>
<property name="format_sql">true</property>
<property name="current_session_context_class">thread</property>

<mapping resource="ShoppingCart/shoppingcart.hbm.xml"></mapping>

</session-factory>
</hibernate-configuration>
[解决办法]
貌似没添加mysql  jar包

热点排行