HibernateSessionFactory不能初始化

lu476036355 2012-01-30 03:07:17
stdout:[2012-01-30 14:43:56] INFO Environment:479 - Hibernate 3.1.3
stdout:[2012-01-30 14:43:56] INFO Environment:509 - hibernate.properties not found
stdout:[2012-01-30 14:43:56] INFO Environment:525 - using CGLIB reflection optimizer
stdout:[2012-01-30 14:43:56] INFO Environment:555 - using JDK 1.4 java.sql.Timestamp handling
stdout:[2012-01-30 14:43:56] INFO Configuration:1308 - configuring from resource: /hibernate.cfg.xml
stdout:[2012-01-30 14:43:56] INFO Configuration:1285 - Configuration resource: /hibernate.cfg.xml
stdout:[2012-01-30 14:43:56] INFO Configuration:469 - Reading mappings from resource: com/pay/po/TabOrderlist.hbm.xml
stdout:[2012-01-30 14:43:56] INFO HbmBinder:309 - Mapping class: com.pay.po.TabOrderlist -> tab_orderlist
stdout:[2012-01-30 14:43:56] INFO Configuration:469 - Reading mappings from resource: com/pay/po/TabUser.hbm.xml
stdout:[2012-01-30 14:43:56] INFO HbmBinder:309 - Mapping class: com.pay.po.TabUser -> tab_user
stdout:[2012-01-30 14:43:56] INFO Configuration:469 - Reading mappings from resource: com/pay/po/TabAlog.hbm.xml
stdout:[2012-01-30 14:43:56] INFO HbmBinder:309 - Mapping class: com.pay.po.TabAlog -> tab_alog
stdout:[2012-01-30 14:43:56] INFO Configuration:469 - Reading mappings from resource: com/pay/po/TabPaylist.hbm.xml
stdout:[2012-01-30 14:43:56] INFO HbmBinder:309 - Mapping class: com.pay.po.TabPaylist -> tab_paylist
stdout:[2012-01-30 14:43:56] INFO Configuration:469 - Reading mappings from resource: com/pay/po/TabPaydayrule.hbm.xml
stdout:[2012-01-30 14:43:56] INFO HbmBinder:309 - Mapping class: com.pay.po.TabPaydayrule -> tab_paydayrule
stdout:[2012-01-30 14:43:56] INFO Configuration:469 - Reading mappings from resource: com/pay/po/TabPaymonthrule.hbm.xml
stdout:[2012-01-30 14:43:56] INFO HbmBinder:309 - Mapping class: com.pay.po.TabPaymonthrule -> tab_paymonthrule
stdout:[2012-01-30 14:43:56] INFO Configuration:469 - Reading mappings from resource: com/pay/po/TabAuser.hbm.xml
stdout:[2012-01-30 14:43:56] INFO HbmBinder:309 - Mapping class: com.pay.po.TabAuser -> tab_auser
stdout:[2012-01-30 14:43:56] INFO Configuration:469 - Reading mappings from resource: com/pay/po/TabLog.hbm.xml
stdout:[2012-01-30 14:43:56] INFO HbmBinder:309 - Mapping class: com.pay.po.TabLog -> tab_log
stdout:[2012-01-30 14:43:56] INFO Configuration:469 - Reading mappings from resource: com/pay/po/TabArole.hbm.xml
stdout:[2012-01-30 14:43:56] INFO HbmBinder:309 - Mapping class: com.pay.po.TabArole -> tab_arole
stdout:[2012-01-30 14:43:56] INFO Configuration:469 - Reading mappings from resource: com/pay/po/TabAoperation.hbm.xml
stdout:[2012-01-30 14:43:56] INFO HbmBinder:309 - Mapping class: com.pay.po.TabAoperation -> tab_aoperation
stdout:[2012-01-30 14:43:56] INFO Configuration:469 - Reading mappings from resource: com/pay/po/TabDnauser.hbm.xml
stdout:[2012-01-30 14:43:57] INFO HbmBinder:309 - Mapping class: com.pay.po.TabDnauser -> tab_dnauser
stdout:[2012-01-30 14:43:57] INFO Configuration:469 - Reading mappings from resource: com/pay/po/TabPhonearea.hbm.xml
stdout:[2012-01-30 14:43:57] INFO HbmBinder:309 - Mapping class: com.pay.po.TabPhonearea -> tab_phonearea
stdout:[2012-01-30 14:43:57] INFO Configuration:469 - Reading mappings from resource: com/pay/po/TabCardbin.hbm.xml
stdout:[2012-01-30 14:43:57] INFO HbmBinder:309 - Mapping class: com.pay.po.TabCardbin -> tab_cardbin
stdout:[2012-01-30 14:43:57] INFO Configuration:469 - Reading mappings from resource: com/pay/po/TabLimituser.hbm.xml
stdout:[2012-01-30 14:43:57] INFO HbmBinder:309 - Mapping class: com.pay.po.TabLimituser -> tab_limituser
stdout:[2012-01-30 14:43:57] INFO Configuration:469 - Reading mappings from resource: com/pay/po/TabBanklist.hbm.xml
stdout:[2012-01-30 14:43:57] INFO HbmBinder:309 - Mapping class: com.pay.po.TabBanklist -> tab_banklist
stdout:[2012-01-30 14:43:57] INFO Configuration:1419 - Configured SessionFactory: null
stdout:[2012-01-30 14:43:57] INFO HbmBinder:2349 - Mapping collection: com.pay.po.TabAuser.tabAoperations -> tab_aoperation
stdout:[2012-01-30 14:43:57] INFO HbmBinder:2349 - Mapping collection: com.pay.po.TabArole.tabAoperations -> tab_aoperation
stdout:[2012-01-30 14:43:57] INFO C3P0ConnectionProvider:50 - C3P0 using driver: org.gjt.mm.mysql.Driver at URL: jdbc:mysql://localhost:3306/pay?characterEncoding=utf-8
stdout:[2012-01-30 14:43:57] INFO C3P0ConnectionProvider:51 - Connection properties: {user=root, password=****}
stdout:[2012-01-30 14:43:57] INFO C3P0ConnectionProvider:54 - autocommit mode: false
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class com.pay.db.HibernateSessionFactory
at com.pay.dao.BaseHibernateDAO.closeSession(BaseHibernateDAO.java:19)
at com.pay.dao.TabOrderlistDAO.findByProperty(TabOrderlistDAO.java:275)
at com.pay.dao.TabOrderlistDAO.findByCallphone(TabOrderlistDAO.java:313)
at com.pay.service.OrderListService.loadOrderList(OrderListService.java:688)
at com.pay.service.OrderListService.getLastPayByPhone(OrderListService.java:729)
at test.main(test.java:46)


用的是c3p0连接池 HibernateSessionFactory看着没啥问题 请教了 还需要什么代码说一声在线等 谢谢大xia
...全文
303 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
lu476036355 2012-01-31
  • 打赏
  • 举报
回复
大xia都躲起来了吗?
lu476036355 2012-01-31
  • 打赏
  • 举报
回复
我网上找了半天也没弄懂,跪求答案!谢谢
lu476036355 2012-01-30
  • 打赏
  • 举报
回复
Hibernate配置文件我看过的是没问题的,为什么不能初始化HibernateSessionFactory 有可能是哪些原因造成的 请大家帮帮忙,谢谢

67,515

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧