Chinaunix

标题: hibernate tutorial 跑不起来,在此留念! [打印本页]

作者: liuboo    时间: 2010-01-14 17:55
标题: hibernate tutorial 跑不起来,在此留念!
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

作者: liuboo    时间: 2010-01-14 17:58
搞了半天搞不定,god damn FFFFFFFFFFFFFFF.拍键盘,砸桌子。

等以后弄明白,DAMNNNNNNNNNNNNNN
作者: liuboo    时间: 2010-01-14 18:00
每次学一个新东西,照着documents step-by-step,总是会有一些当时怎么也看不明白不能解决的错误。

先做个hello world的demo,对其有个手感上的认识,再来看一些doc深入。
作者: surpass_li    时间: 2010-04-26 20:10
多看看手册和文档吧
作者: gnah    时间: 2010-05-28 20:19
hibernate.cfg.xml位置不对




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2