最近在做一個小的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)