32 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.5.3-Final
32 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
47 [main] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
47 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
172 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaExport - Error creating schema
org.hibernate.HibernateException: The dialect was not set. Set the property hibernate.dialect.
at org.hibernate.dialect.Dialect.instantiateDialect(Dialect.java:289)
at org.hibernate.dialect.Dialect.getDialect(Dialect.java:267)
at org.hibernate.dialect.Dialect.getDialect(Dialect.java:282)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:121)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:91)
at org.hibernate.tool.hbm2ddl.SchemaExport.main(SchemaExport.java:474)
org.hibernate.HibernateException: The dialect was not set. Set the property hibernate.dialect.
at org.hibernate.dialect.Dialect.instantiateDialect(Dialect.java:289)
at org.hibernate.dialect.Dialect.getDialect(Dialect.java:267)
at org.hibernate.dialect.Dialect.getDialect(Dialect.java:282)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:121)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:91)
at org.hibernate.tool.hbm2ddl.SchemaExport.main(SchemaExport.java:474)
以上是报错信息, 自上午import 了一个同事的项目后,就有了这环境问题,无论运行什么(亲手试了helloworld也不行。。。),控制台都会直接报这个错。。。有经验的朋友可以发表一下高见。。。
------解决方案--------------------
你查查配置文件 应该是配置文件的问题
------解决方案--------------------
hibernate.properties not found
org.hibernate.HibernateException: The dialect was not set. Set the property hibernate.dialect.
你使用了hbm2ddl配置,也就是通过实体类hbm.xml文件生成数据库表的功能,但没有配置hibernate.dialect,所以创建数据库表失败,我用的Oracle10g,在hibernate.properties中配置如下:
hibernate.dialect=org.hibernate.dialect.Oracle10gDialect