Hibernate: ORA-02289: sequence does not exist.

错误描述如下:
org.hibernate.exception.SQLGrammarException: could not get next sequence value

Caused by: java.sql.SQLException: ORA-02289: sequence does not exist


将数据库表和对应的javabean映射xml文件作如下修改:

<id name="id" column="CID">
   <generator class="native" />
</id>

应该改成:

<id name="id" column="CID">
    <generator class="sequence">  
        <param name="sequence">SEQ_hibernate</param>  
    </generator>
<id>

你可能感兴趣的:(Hibernate: ORA-02289: sequence does not exist.)