黑马程序员技术交流社区

标题: 1.不会解决的Hibernate问题 [打印本页]

作者: 史晓霞    时间: 2011-11-12 11:04
标题: 1.不会解决的Hibernate问题
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
java.lang.ClassCastException: com.hibernate.bean.Student
    at org.hibernate.type.EntityType.toLoggableString(EntityType.java:496)
    at org.hibernate.pretty.Printer.toString(Printer.java:76)
    at org.hibernate.pretty.Printer.toString(Printer.java:113)
    at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:120)
    at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:49)
    at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1028)
    at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:366)
    at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:137)
    at com.hibernate.bean.BaseDao.saveObj(BaseDao.java:21)
    at com.hibernate.bean.Test.main(Test.java:21)




欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) 黑马程序员IT技术论坛 X3.2