Hibernate error, possibly with DTD declaration

前端 未结 2 950
名媛妹妹
名媛妹妹 2020-12-06 19:32

Our project use\'s Hibernate\'s programmatic Configuration to set up our SessionFactory and such. I just migrated us from version 3 to version 4 of Hibernate. N

2条回答
  •  星月不相逢
    2020-12-06 19:47

    I also migrate from hibernate 3 to 4 ,

    For hibernate.cfg.xml file i use following DTD

    For mapping file i use follwing DTD:

    PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

    If i change dtd it gives exception because hibernate 4 use xsd instead of dtd. Hibrenate Jira of migrating dtd to xsd

    So you have to use xsd file instead of dtd.

    Hibernate hbm example

提交回复
热议问题