问题不大,但如果不知道根源,也会浪费很多无辜的时间。& [" L' E# N* Y/ W7 c
* E: ^ [# \; s1 h0 ]1 L! ~
- x1 C5 F O) p ]& z# {% e: v" ]% E9 N+ k% d6 d8 r. P
异常信息:4 n2 B, O' s, g+ P( \3 \2 `# ^1 W
& ?3 a8 M/ ]" C( z$ @ / m2 x0 V: t* c: V( U5 j5 K2 T8 r( `Caused by: org.hibernate.DuplicateMappingException: duplicate import: TUser4 refers to both com.alcatel.cn.hibernate.ORMapping.onetomany.pojo.TUser4 and com.alcatel.cn.hibernate.chaper04.pojo.TUser4 (try using auto-import="false") $ ]- l' @& V. Z; {, a at org.hibernate.cfg.Mappings.addImport(Mappings.java:141), `" a5 K9 J; V8 q$ l- p) G
at org.hibernate.cfg.HbmBinder.bindPersistentClassCommonValues(HbmBinder.java:614) ! F: d& P3 g) `/ z' V1 I; V at org.hibernate.cfg.HbmBinder.bindClass(HbmBinder.java:527)7 J8 R. I" c7 S" @& V
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:271)! c5 H# p3 k) Q3 Y( {1 P- J
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:144)( V t0 N3 W2 B0 o: `( n0 o# e3 G2 F
at org.hibernate.cfg.Configuration.add(Configuration.java:424) 4 Q, q0 Z+ J" K7 l* n/ B at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:465)7 O3 z! {$ S2 R8 ^+ }3 n
at org.hibernate.cfg.Configuration.addResource(Configuration.java:520)0 {/ S$ Y, w9 _! D
... 8 more' _1 ]6 A& Y, T! P+ i