| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2040 人关注过本帖
标题:[求助]关于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
快速回复:[求助]关于hibernate配置问题
数据加载中...
 
   



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

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