大侠请指教那里有错啊
Exception in thread "main" org.hibernate.HibernateException: JDBC Driver class not found: com.mysql.jdbc.river
at org.hibernate.connection.DriverManagerConnectionProvider.configure(DriverManagerConnectionProvider.java:89)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:137)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:79)
at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:425)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:89)
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2119)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2115)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1339)
at com.bjsxt.hibernate.TestStudent.main(TestStudent.java:14)
Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.river
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:192)
at org.hibernate.connection.DriverManagerConnectionProvider.configure(DriverManagerConnectionProvider.java:84)
... 8 more
hibernate不是自带有mysql连接吗?
------解决方案--------------------
Exception in thread "main" org.hibernate.HibernateException: JDBC Driver class not found: com.mysql.jdbc.river
没有导入MYSQL的JAR文件 啊.
把它导入就可以了啊.
谁说的hibernate自带了???
------解决方案--------------------
没带jar包
------解决方案--------------------
com.mysql.jdbc.river
兄弟太粗心了。
------解决方案--------------------
如果还出错,则是mysql的jdbc驱动没导入
------解决方案--------------------
3楼很细心
------解决方案--------------------
com.mysql.jdbc.river
jar包导入没有
------解决方案--------------------