總算解決了

來源:互聯網
上載者:User
hibernate3.6 tomcat 使用新的namespace                2011-12-31 15:33:04 標籤: 檢查 hibernate recognized instead PUBLIC

tomcat 運行過程中提示:

2011-12-31 15:26:39,778 WARN [org.hibernate.util.DTDEntityResolver] - recognized obsolete hibernate namespacehttp://hibernate.sourceforge.net/. Use namespacehttp://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!

解決辦法:檢查所有***.hbm.xml檔案,看看是不是有

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

更換

<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">

即可

 

 

2. hibernate3 Duplicate class/entity mapping(異常)  代碼:
      Configuration config = new Configuration();
      sessionFactory = config.configure().buildSessionFactory();
       config.addClass(Medicine.class);

再使用多對一關聯性時候,注意可能要去掉紅色部分的代碼

3.

Exception starting filter struts2Unable to load configuration. - bean - jar:file:/E:/tomcat-7.0.11/webapps/struts/WEB-INF/lib/struts2-core-2.2.3.jar!/struts-default.xml:29:72at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:437)

歸根到底就是jar包之間的版本匹配問題。這裡出問題的是struts2-core-2.2.3.jar這個jar包。

 

4.

 

 

 

 

 

 

 

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.