首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Exception >

hibernate的net.sf.hibernate.MappingException: could not instantiate id

2014-01-26 
net.sf.hibernate.MappingException: could not instantiate id generator?xml version1.0 encodingu

net.sf.hibernate.MappingException: could not instantiate id generator

  <?xml version="1.0" encoding="utf-8"?>
  <!DOCTYPE hibernate-mapping PUBLIC
  "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
  "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
  <hibernate-mapping>
  <class name="jb_hibernate.Message" table="Message">
  <id name="id" column="MESSAGE_ID">
  <generator class="sequence">
    <param name="sequence">MESSAGE_SEQ</param>
  </generator>
  </id>
  <property name="text" type="string">
  <column name="TEXT" length="100" not-null="true"/>
  </property>
  <many-to-one name="nextMessage" cascade="all" column="NEXT_MESSAGE_ID"/>
  </class>
  </hibernate-mapping>
 
  有什么问题呀?

------解决方法--------------------------------------------------------
数据库中有没有MESSAGE_SEQ了啊?

        

热点排行