第三步,纠错 应为
CREATE TABLE CUSTOMER (
user_id CHAR(32) NOT NULL PRIMARY KEY,
username VARCHAR(16) NOT NULL, );
CREATE TABLE CUSTOMER (
user_id CHAR(32) NOT NULL PRIMARY KEY,
username VARCHAR(16) NOT NULL, );
hibernate2.jar
cglib-full-2.0.2.jar
commons-collections-2.1.1.jar
commons-logging-1.0.4.jar
dom4j-1.4.jar
ehcache-0.9.jar
log4j-1.2.8.jar
odmg-3.0.jar你有没有确认这么几个包没有正确导入?
包应该都导入了,要不然第5步不能成功阿,是么??我没用IDE工具
hibernate中文主站:http://www.hibernate.org.cn
主站入门:http://www.hibernate.org.cn/48.html
hibernate中文论坛:http://forum.hibernate.org.cn/
就是在
new Configuration().configure("c:/xxx/xxx/xxx/....xml").buildSessionFactory();
SessionFactory sessionFactory = new Configuration()
.configure(new File(hibernate.cfg.xml)).buildSessionFactory();
就ok了,这是什么原因呢?????
用new Configuration().configure("c:/xxx/xxx/xxx/....xml").buildSessionFactory();
还是找不到
用
SessionFactory sessionFactory = new Configuration()
.configure(new File(“hibernate.cfg.xml”)).buildSessionFactory();
又说找不到Cat.hbm.xml
真搞不懂到底这些文件应该放在哪里?