Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Architecture & Framework  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 Re:getHibernateTemplate().save(forum);save后数据库中出现乱码 [Re:guorui_wh]
guorui_wh





发贴: 12
积分: 0
于 2004-11-19 11:05 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
还是不行阿,反而说url出错了

2004-11-19 11:09:29,941 WARN net.sf.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: null
2004-11-19 11:09:29,956 ERROR net.sf.hibernate.util.JDBCExceptionReporter - Cannot create JDBC driver of class 'org.gjt.mm.mysql.Driver' for connect URL '
        jdbc:mysql://localhost:3306/bbs?useUnicode=true&characterEncoding=GBK
      '
2004-11-19 11:09:29,956 WARN net.sf.hibernate.cfg.SettingsFactory - Could not obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class 'org.gjt.mm.mysql.Driver' for connect URL '
        jdbc:mysql://localhost:3306/bbs?useUnicode=true&characterEncoding=GBK
      ', cause:
java.sql.SQLException: No suitable driver
  at java.sql.DriverManager.getDriver(DriverManager.java:243)
  at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743)
  at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)
  at org.springframework.orm.hibernate.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:59)
  at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)
  at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1132)
  at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:766)
  at org.springframework.orm.hibernate.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:467)
  at org.springframework.orm.hibernate.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:405)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1057)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:287)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:205)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:136)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveReference(AbstractAutowireCapableBeanFactory.java:954)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:889)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:827)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:662)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:270)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:205)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:136)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveReference(AbstractAutowireCapableBeanFactory.java:954)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:889)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:827)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:662)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:270)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:205)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:136)
  at com.bbs.service.imp.ForumServiceImpTest.setUp(ForumServiceImpTest.java:28)
  at junit.framework.TestCase.runBare(TestCase.java:125)
  at junit.framework.TestResult$1.protect(TestResult.java:106)
  at junit.framework.TestResult.runProtected(TestResult.java:124)
  at junit.framework.TestResult.run(TestResult.java:109)
  at junit.framework.TestCase.run(TestCase.java:118)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
Cannot create JDBC driver of class 'org.gjt.mm.mysql.Driver' for connect URL '
        jdbc:mysql://localhost:3306/bbs?useUnicode=true&characterEncoding=GBK
      '
java.sql.SQLException: No suitable driver
  at java.sql.DriverManager.getDriver(DriverManager.java:243)
  at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743)
  at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)
  at org.springframework.orm.hibernate.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:59)
  at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)
  at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1132)
  at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:766)
  at org.springframework.orm.hibernate.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:467)
  at org.springframework.orm.hibernate.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:405)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1057)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:287)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:205)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:136)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveReference(AbstractAutowireCapableBeanFactory.java:954)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:889)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:827)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:662)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:270)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:205)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:136)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveReference(AbstractAutowireCapableBeanFactory.java:954)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:889)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:827)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:662)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:270)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:205)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:136)
  at com.bbs.service.imp.ForumServiceImpTest.setUp(ForumServiceImpTest.java:28)
  at junit.framework.TestCase.runBare(TestCase.java:125)
  at junit.framework.TestResult$1.protect(TestResult.java:106)
  at junit.framework.TestResult.runProtected(TestResult.java:124)
  at junit.framework.TestResult.run(TestResult.java:109)
  at junit.framework.TestCase.run(TestCase.java:118)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
Cannot create JDBC driver of class 'org.gjt.mm.mysql.Driver' for connect URL '
        jdbc:mysql://localhost:3306/bbs?useUnicode=true&characterEncoding=GBK
      '
java.sql.SQLException: No suitable driver
  at java.sql.DriverManager.getDriver(DriverManager.java:243)
  at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743)
  at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)
  at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:173)
  at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:152)
  at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:128)
  at org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:93)
  at org.springframework.jdbc.support.SQLErrorCodesFactory.getErrorCodes(SQLErrorCodesFactory.java:209)
  at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.setDataSource(SQLErrorCodeSQLExceptionTranslator.java:115)
  at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.<init>(SQLErrorCodeSQLExceptionTranslator.java:96)
  at org.springframework.orm.hibernate.SessionFactoryUtils.newJdbcExceptionTranslator(SessionFactoryUtils.java:122)
  at org.springframework.orm.hibernate.HibernateAccessor.getJdbcExceptionTranslator(HibernateAccessor.java:158)
  at org.springframework.orm.hibernate.HibernateAccessor.afterPropertiesSet(HibernateAccessor.java:201)
  at org.springframework.orm.hibernate.HibernateTemplate.<init>(HibernateTemplate.java:115)
  at org.springframework.orm.hibernate.support.HibernateDaoSupport.createHibernateTemplate(HibernateDaoSupport.java:87)
  at org.springframework.orm.hibernate.support.HibernateDaoSupport.setSessionFactory(HibernateDaoSupport.java:74)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:324)
  at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:684)
  at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:588)
  at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:720)
  at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:747)
  at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:736)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:844)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:662)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:270)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:205)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:136)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveReference(AbstractAutowireCapableBeanFactory.java:954)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:889)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFa2004-11-19 11:09:31,081 WARN org.springframework.jdbc.support.SQLErrorCodesFactory - Error while getting database metadata
org.springframework.jdbc.support.MetaDataAccessException: Error while getting connection; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class 'org.gjt.mm.mysql.Driver' for connect URL '
        jdbc:mysql://localhost:3306/bbs?useUnicode=true&characterEncoding=GBK
      '
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class 'org.gjt.mm.mysql.Driver' for connect URL '
        jdbc:mysql://localhost:3306/bbs?useUnicode=true&characterEncoding=GBK
      '
org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class 'org.gjt.mm.mysql.Driver' for connect URL '
        jdbc:mysql://localhost:3306/bbs?useUnicode=true&characterEncoding=GBK
      ', cause:
java.sql.SQLException: No suitable driver
  at java.sql.DriverManager.getDriver(DriverManager.java:243)
  at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743)
  at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)
  at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:173)
  at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:152)
  at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:128)
  at org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:93)
  at org.springframework.jdbc.support.SQLErrorCodesFactory.getErrorCodes(SQLErrorCodesFactory.java:209)
  at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.setDataSource(SQLErrorCodeSQLExceptionTranslator.java:115)
  at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.<init>(SQLErrorCodeSQLExceptionTranslator.java:96)
  at org.springframework.orm.hibernate.SessionFactoryUtils.newJdbcExceptionTranslator(SessionFactoryUtils.java:122)
  at org.springframework.orm.hibernate.HibernateAccessor.getJdbcExceptionTranslator(HibernateAccessor.java:158)
  at org.springframework.orm.hibernate.HibernateAccessor.afterPropertiesSet(HibernateAccessor.java:201)
  at org.springframework.orm.hibernate.HibernateTemplate.<init>(HibernateTemplate.java:115)
  at org.springframework.orm.hibernate.support.HibernateDaoSupport.createHibernateTemplate(HibernateDaoSupport.java:87)
  at org.springframework.orm.hibernate.support.HibernateDaoSupport.setSessionFactory(HibernateDaoSupport.java:74)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:324)
  at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:684)
  at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:588)
  at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:720)
  at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:747)
  at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:736)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:844)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:662)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:270)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:205)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:136)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveReference(AbstractAutowireCapableBeanFactory.java:954)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:889)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:827)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:662)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:270)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:205)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:136)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveReference(AbstractAutowireCapableBeanFactory.java:954)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:889)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:827)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:662)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:270)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:205)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:136)
  at com.bbs.service.imp.ForumServiceImpTest.setUp(ForumServiceImpTest.java:28)
  at junit.framework.TestCase.runBare(TestCase.java:125)
  at junit.framework.TestResult$1.protect(TestResult.java:106)
  at junit.framework.TestResult.runProtected(TestResult.java:124)
  at junit.framework.TestResult.run(TestResult.java:109)
  at junit.framework.TestCase.run(TestCase.java:118)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
2004-11-19 11:09:31,347 WARN net.sf.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: null
2004-11-19 11:09:31,347 ERROR net.sf.hibernate.util.JDBCExceptionReporter - Cannot create JDBC driver of class 'org.gjt.mm.mysql.Driver' for connect URL '
        jdbc:mysql://localhost:3306/bbs?useUnicode=true&characterEncoding=GBK
      '
2004-11-19 11:09:31,347 WARN net.sf.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: null
2004-11-19 11:09:31,347 ERROR net.sf.hibernate.util.JDBCExceptionReporter - Cannot create JDBC driver of class 'org.gjt.mm.mysql.Driver' for connect URL '
        jdbc:mysql://localhost:3306/bbs?useUnicode=true&characterEncoding=GBK
      '
2004-11-19 11:09:31,347 ERROR net.sf.hibernate.util.JDBCExceptionReporter - Cannot open connection
org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class 'org.gjt.mm.mysql.Driver' for connect URL '
        jdbc:mysql://localhost:3306/bbs?useUnicode=true&characterEncoding=GBK
      ', cause:
java.sql.SQLException: No suitable driver
  at java.sql.DriverManager.getDriver(DriverManager.java:243)
  at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743)
  at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)
  at org.springframework.orm.hibernate.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:59)
  at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:278)
  at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3297)
  at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3277)
  at org.springframework.orm.hibernate.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:379)
  at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:269)
  at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:201)
  at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:49)
  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138)
  at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:152)
  at $Proxy0.doCreateForum(Unknown Source)
  at com.bbs.service.imp.ForumServiceImpTest.testDoCreateForum(ForumServiceImpTest.java:72)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:324)
  at junit.framework.TestCase.runTest(TestCase.java:154)
  at junit.framework.TestCase.runBare(TestCase.java:127)
  at junit.framework.TestResult$1.protect(TestResult.java:106)
  at junit.framework.TestResult.runProtected(TestResult.java:124)
  at junit.framework.TestResult.run(TestResult.java:109)
  at junit.framework.TestCase.run(TestCase.java:118)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)




Hibernate的优点

话题树型展开
人气 标题 作者 字数 发贴时间
10194 getHibernateTemplate().save(forum);save后数据库中出现乱码 guorui_wh 220 2004-11-18 17:46
7580 Re:getHibernateTemplate().save(forum);save后数据库中出现乱码 yakuu 73 2004-11-19 00:58
7797 Re:getHibernateTemplate().save(forum);save后数据库中出现乱码 guorui_wh 23640 2004-11-19 11:05
7869 Re:getHibernateTemplate().save(forum);save后数据库中出现乱码 guorui_wh 225 2004-11-19 11:16
8508 Re:getHibernateTemplate().save(forum);save后数据库中出现乱码 wzj616 139 2004-11-23 22:02

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923