请教:为什么我的类映射文件不会自动生成?错误信息如下:
generate-hbm:
[echo] 运行HibernateDoclet,生成 Hibernate 类的映射文件
[hibernatedoclet] (XDocletMain.start 47 ) Running <hibernate/>
[hibernatedoclet] (XDocletMain.start 47 ) Running <hibernatecfg/>
[hibernatedoclet] Generating hibernate.cfg.xml configuration file
schemaexport:
[echo] 运行SchemaExport,利用 hbm.xml 文件生成数据表
[schemaexport] (cfg.Environment 500 ) Hibernate 3.2.0
[schemaexport] (cfg.Environment 533 ) hibernate.properties not found
[schemaexport] (cfg.Environment 667 ) Bytecode provider name : cglib
[schemaexport] (cfg.Environment 584 ) using JDK 1.4 java.sql.Timestamp handling
[schemaexport] (cfg.Configuration 1384) configuring from file: hibernate.cfg.xml
[schemaexport] (util.DTDEntityResolver 46 ) Don't use old DTDs, read the Hibernate 3.x Migration Guide!
[schemaexport] (util.XMLHelper 61 ) Error parsing XML: D:\testy\hibernate03\src\hibernate.cfg.xml(21) The content of element type "session-factory" is incomplete, it must match "(property*,mapping+,(class-cache|collection-cache|jcs-class-cache|jcs-collection-cache)*)".
BUILD FAILED
D:\testy\hibernate03\build.xml:101: Schema text failed: invalid configuration
Total time: 3 seconds
回复 更多评论