纯hibernate项目 如何配置druid连接池
@wenshao 你好,想跟你请教个问题:
异常信息:java.lang.NullPointerException
at com.alibaba.druid.util.JdbcUtils.getDriverClassName(JdbcUtils.java:347)
at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:469)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:783)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:779)
at com.alibaba.druid.support.hibernate.DruidConnectionProvider.getConnection(DruidConnectionProvider.java:52)
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcServicesImpl.java:242)
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:117)
at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:71)
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2277)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2273)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1742)
at com.bq.session.HibernateSessionFactory.<clinit>(HibernateSessionFactory.java:33)
at com.bq.dao.BaseHibernateDAO.getSession(BaseHibernateDAO.java:14)
at com.bq.dao.UpdateDao.<clinit>(UpdateDao.java:20)
at com.bq.main.MainAction.main(MainAction.java:52)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
0.2.6里面没有 这个包com.alibaba.druid.support.hibernate.DruidConnectionProvider
druid什么版本?url没有配置?