标题:[求助]关于hibernate配置问题
只看楼主
linpei23
Rank: 1
等 级:新手上路
帖 子:50
专家分:0
注 册:2006-5-31
 问题点数:0 回复次数:1 
[求助]关于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)

原因是什么?

搜索更多相关主题的帖子: hibernate 
2007-03-13 11:54
lc1234
Rank: 2
等 级:论坛游民
帖 子:23
专家分:27
注 册:2009-7-5
得分:0 
<property name="dialect">org.hibernate.dialect.OracleDialect</property>
好像是这行有问题,你再仔细看看
2010-06-10 21:25



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-123970-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.235410 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved