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) |
|