免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3005 | 回复: 4
打印 上一主题 下一主题

hibernate tutorial 跑不起来,在此留念! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-01-14 17:55 |只看该作者 |倒序浏览
Hibernate Getting start: https://www.hibernate.org/152.html

tutorial:http://docs.jboss.org/hibernate/ ... /html/tutorial.html


执行到1.1.7. Loading and storing objects 时,挂了。

D:\maven\hf>mvn exec:java -Dexec.mainClass="org.hibernate.tutorial.EventManager" -Dexec.args="store"
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'exec'.
[INFO] ------------------------------------------------------------------------
[INFO] Building First Hibernate Tutorial
[INFO]    task-segment: [exec:java]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing exec:java
[INFO] No goals needed for project - skipping
[INFO] [exec:java {execution: default-cli}]
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Initial SessionFactory creation failed.org.hibernate.HibernateException: /hibernate.cfg.xml not found
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An exception occured while executing the Java class. null

/hibernate.cfg.xml not found
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Thu Jan 14 16:24:45 CST 2010
[INFO] Final Memory: 5M/9M
[INFO] ------------------------------------------------------------------------
D:\maven\hf>

herr.JPG (89.3 KB, 下载次数: 46)

herr.JPG

论坛徽章:
0
2 [报告]
发表于 2010-01-14 17:58 |只看该作者
搞了半天搞不定,god damn FFFFFFFFFFFFFFF.拍键盘,砸桌子。

等以后弄明白,DAMNNNNNNNNNNNNNN

论坛徽章:
0
3 [报告]
发表于 2010-01-14 18:00 |只看该作者
每次学一个新东西,照着documents step-by-step,总是会有一些当时怎么也看不明白不能解决的错误。

先做个hello world的demo,对其有个手感上的认识,再来看一些doc深入。

论坛徽章:
0
4 [报告]
发表于 2010-04-26 20:10 |只看该作者
多看看手册和文档吧

论坛徽章:
4
CU十二周年纪念徽章
日期:2013-10-24 15:41:34狮子座
日期:2014-02-10 17:22:57技术图书徽章
日期:2014-02-18 08:44:12技术图书徽章
日期:2014-04-29 14:15:42
5 [报告]
发表于 2010-05-28 20:19 |只看该作者
hibernate.cfg.xml位置不对
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP