最近在做一个小的web程序时,碰到了一些小问题,在经过小弟的一番努力后都一一化解了,欣喜之余就想把这些解决心得择取一二与大家共享。这些问题都比较初级,高手就不必看了,以免浪费时间,呵呵。 异常1:*.hbm.xml 配置文件中<id>元素配置异常 抛出异常描述: org.sPRingframework.orm.hibernate3.HibernateSystemException: ids for this cla ss must be manually assigned before calling save(): com.ebupt.ncsp.assist.ser vice.department.domain.Department; nested exception is org.hibernate.id.Ident ifierGenerationException: ids for this class must be manually assigned before calling save(): com.ebupt.ncsp.assist.service.department.domain.Department org.hibernate.id.IdentifierGenerationException: ids for this class must be ma nually assigned before calling save(): com.ebupt.ncsp.assist.service.departme nt.domain.Department
异常2:*.hbm.xml 配置文件中<id>元素配置异常 抛出异常描述: org.springframework.orm.hibernate3.HibernateSystemException:exception setting property value with CGLIB(set hibernate.cglib.use-reflection-optimizer=false for more info) setter of com.info.beran.com.SetComCode nested exception is org. hibernate. PropertyaccessException: setting property value with CGLIB(set hibernate.cglib.use-reflection-optimizer=false for more info)