【高分】【紧急】【在线等】hibernate如何避免
重复加载配置文件,谢谢~
Java code 2008 十月 28 23:45:00,317 [INFO] org.hibernate.cfg.Environment - Hibernate 3.3.1.GA
2008 十月 28 23:45:00,332 [INFO] org.hibernate.cfg.Environment - hibernate.properties not found
2008 十月 28 23:45:00,332 [INFO] org.hibernate.cfg.Environment - Bytecode provider name : javassist
2008 十月 28 23:45:00,348 [INFO] org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
2008 十月 28 23:45:00,551 [INFO] org.hibernate.cfg.Configuration - configuring from resource: /hibernate.cfg.xml
2008 十月 28 23:45:00,551 [INFO] org.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml
2008 十月 28 23:45:00,770 [INFO] org.hibernate.cfg.Configuration - Reading mappings from resource : cn/hlgc/hibernate/AdminPower.hbm.xml
2008 十月 28 23:45:00,973 [INFO] org.hibernate.cfg.HbmBinder - Mapping class: cn.hlgc.hibernate.AdminPower -> admin_power
2008 十月 28 23:45:01,082 [INFO] org.hibernate.cfg.Configuration - Reading mappings from resource : cn/hlgc/hibernate/Airport.hbm.xml
2008 十月 28 23:45:01,129 [INFO] org.hibernate.cfg.HbmBinder - Mapping class: cn.hlgc.hibernate.Airport -> airports
2008 十月 28 23:45:01,129 [INFO] org.hibernate.cfg.Configuration - Reading mappings from resource : cn/hlgc/hibernate/Album.hbm.xml
2008 十月 28 23:45:01,160 [INFO] org.hibernate.cfg.HbmBinder - Mapping class: cn.hlgc.hibernate.Album -> albums
2008 十月 28 23:45:01,176 [INFO] org.hibernate.cfg.Configuration - Reading mappings from resource : cn/hlgc/hibernate/AlbumPhoto.hbm.xml
2008 十月 28 23:45:01,239 [INFO] org.hibernate.cfg.HbmBinder - Mapping class: cn.hlgc.hibernate.AlbumPhoto -> album_photos
2008 十月 28 23:45:01,285 [INFO] org.hibernate.cfg.Configuration - Reading mappings from resource : cn/hlgc/hibernate/AlbumUser.hbm.xml
2008 十月 28 23:45:01,317 [INFO] org.hibernate.cfg.HbmBinder - Mapping class: cn.hlgc.hibernate.AlbumUser -> album_users
2008 十月 28 23:45:01,317 [INFO] org.hibernate.cfg.Configuration - Reading mappings from resource : cn/hlgc/hibernate/Aod.hbm.xml
2008 十月 28 23:45:01,348 [INFO] org.hibernate.cfg.HbmBinder - Mapping class: cn.hlgc.hibernate.Aod -> aod
2008 十月 28 23:45:01,379 [INFO] org.hibernate.cfg.Configuration - Reading mappings from resource : cn/hlgc/hibernate/AodSort.hbm.xml
2008 十月 28 23:45:01,551 [INFO] org.hibernate.cfg.HbmBinder - Mapping class: cn.hlgc.hibernate.AodSort -> aod_sorts
2008 十月 28 23:45:01,582 [INFO] org.hibernate.cfg.Configuration - Reading mappings from resource : cn/hlgc/hibernate/Attachment.hbm.xml
2008 十月 28 23:45:01,614 [INFO] org.hibernate.cfg.HbmBinder - Mapping class: cn.hlgc.hibernate.Attachment -> attachments
2008 十月 28 23:45:01,629 [INFO] org.hibernate.cfg.Configuration - Reading mappings from resource : cn/hlgc/hibernate/Blog.hbm.xml
[color=#FF0000]============================.hbm.xml的列表还没加载完毕,hibernate.cfg.xml又重新开始加载了[/color]
2008 十月 28 23:45:01,832 [INFO] org.hibernate.cfg.Configuration - configuring from resource: /hibernate.cfg.xml
2008 十月 28 23:45:01,832 [INFO] org.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml
2008 十月 28 23:45:01,864 [INFO] org.hibernate.cfg.Configuration - configuring from resource: /hibernate.cfg.xml
2008 十月 28 23:45:01,864 [INFO] org.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml
2008 十月 28 23:45:01,895 [ERROR] org.apache.catalina.core.ContainerBase.[Catalina].[www.javafeng.cn].[/] - Session event listener threw exception
java.lang.NullPointerException
at cn.hlgc.util.HibernateUtil.beginTransaction(HibernateUtil.java:106)
at cn.hlgc.stat.OnlineListener.sessionDestroyed(OnlineListener.java:70)
at org.apache.catalina.session.StandardSession.expire(StandardSession.java:687)
at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:579)
at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:678)