日期:2014-05-20  浏览次数:20848 次

关于hibernate问题
2011-8-4 16:12:16 com.createam.slee.db.common.Initiator initHibernate
信息: Start init hibernate.
AbandonedObjectPool is used (org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool@ab436d)
  LogAbandoned: false
  RemoveAbandoned: true
  RemoveAbandonedTimeout: 60
org.hibernate.HibernateException: database product name cannot be null
at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:57)
at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:39)
at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:374)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:110)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004)
at com.createam.slee.db.common.Initiator.initHibernate(Initiator.java:80)
at com.createam.slee.db.common.Initiator.init(Initiator.java:33)
at com.huawei.component.egroup.util.EGroupInit.init(EGroupInit.java:51)
at com.huawei.mcentrex.framework.core.listener.MCContextListener.contextInitialized(MCContextListener.java:50)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
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:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2011-8-4 16:12:17 com.createam.slee.db.common.Initiator initHibernate
警告: Hibernate sessionfactory init fail.
2011-8-4 16:12:17 com.createam.slee.db.common.Initiator initHibernate
信息: End init hibernate.

这里报这个错误
说是在hibernate初始化的时候有问题
请指教一下这个是怎么回事

------解决方案--------------------
楼主都知道原因了,代码中确实也没有调用config方法,那加上就行了,还希望知道些什么呢?