2007-01-12
有多少异常可以重来
今天报了一个org.hibernate.DuplicateMappingException: Duplicate collection role mapping xx.Account.cards,从来没见过的错误,有些怕怕了。不过看起来是重复映射了,应该是哪里粗心大意的问题,但是代码基本没什么改变啊,把那个cards 删除后 干脆就报 Duplicate class mapping Acount,晕倒。
于是乎只好找google老师解决问题,看到:
http://forum.hibernate.org/viewtopic.php?t=969123&sid=8797b20ef23e47745a5d196473194e27
says:
my problem was a change of package.
Specifically, i compile the project with the class in a a.b.c package. then i moved the class to the c.d.e package, but eclipse didn't clean the previous .class file generated.
i clean the project and all works fine now
俺也跟着clean一把,问题同样解决
缘由是我把project名改了一个...
用ant脚本重建数据库后竟然又报错了,终于发现真正的原因了,原来不是clean的问题,还以为是eclipse的问题呢,原来是自己把ant编译的class和eclipse编译的class放在了不同目录,但是都是eclipse的classpath,于是乎加载了两次。。
于是乎只好找google老师解决问题,看到:
http://forum.hibernate.org/viewtopic.php?t=969123&sid=8797b20ef23e47745a5d196473194e27
says:
my problem was a change of package.
Specifically, i compile the project with the class in a a.b.c package. then i moved the class to the c.d.e package, but eclipse didn't clean the previous .class file generated.
i clean the project and all works fine now
俺也跟着clean一把,问题同样解决
缘由是我把project名改了一个...
用ant脚本重建数据库后竟然又报错了,终于发现真正的原因了,原来不是clean的问题,还以为是eclipse的问题呢,原来是自己把ant编译的class和eclipse编译的class放在了不同目录,但是都是eclipse的classpath,于是乎加载了两次。。
- 17:08
- 浏览 (1281)
- 评论 (3)
- 分类: Programming
- 相关推荐
评论
javamanlcy007
2008-07-26
我今天也遇到这个问题,才搜到这个帖子~
还没有解决,等恢复哦
还没有解决,等恢复哦
iceworld4143
2008-06-27
这个错误解决了,又抱了别的错误~
iceworld4143
2008-06-27
解释不太懂,我也遇到这个问题了,可是我没用ant。
等回复。
发表评论
- 浏览: 382631 次
- 性别:

- 来自: 上海

- 详细资料
搜索本博客
我的相册
Gmail
共 8 张
共 8 张
最新评论
-
java encoding参考
Good ,thanks.
-- by zuowei -
有多少异常可以重来
我今天也遇到这个问题,才搜到这个帖子~ 还没有解决,等恢复哦
-- by javamanlcy007 -
有多少异常可以重来
这个错误解决了,又抱了别的错误~
-- by iceworld4143 -
有多少异常可以重来
解释不太懂,我也遇到这个问题了,可是我没用ant。 等回复。
-- by iceworld4143 -
考试不及格
证券从业资格考试
-- by eyejava






评论排行榜