编程中国 | 业界新闻 | 技术文章 | 视频教程 | 下载频道 | 程序源码 | 个人空间 | 编程论坛  
全能 ASP / PHP / ASP.NET 主机,支持月付专业 MSSQL 数据库空间,支持月付专业 MySQL 数据库空间,支持月付学习型 ASP/PHP/ASP.NET 主机 30元/年
发新话题
打印

[求助]关于hibernate配置问题

[求助]关于hibernate配置问题

hibernate的配置是

<property name="hibernate.connection.url">jdbc:oracle:thin:@localhost:1521:orcl</property>
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.username">user</property>
<property name="hibernate.connection.password">123456</property>
<property name="dialect">org.hibernate.dialect.OracleDialect</property>
<property name="hibernate.show_sql">false</property>
<property name="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
<property name="connection.username">user</property>
<property name="connection.password">123456</property>
<property name="connection.driver_class"></property>

运行程序时,会出现下面的错误:
Exception in thread "main" org.hibernate.MappingException: Dialect does not support identity key generation
at org.hibernate.dialect.Dialect.getIdentityColumnString(Dialect.java:392)
at org.hibernate.dialect.Dialect.getIdentityColumnString(Dialect.java:403)
at org.hibernate.mapping.Table.sqlCreateString(Table.java:259)
at org.hibernate.cfg.Configuration.generateSchemaCreationScript(Configuration.java:669)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:65)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:49)
at Test.main(Test.java:20)

原因是什么?

TOP

发新话题