Can't parse hibernate.cfg.xml while offline

前端 未结 13 1774
死守一世寂寞
死守一世寂寞 2020-11-29 08:13

Whenever I\'m disconnected from the internet, I get the following exception:

org.hibernate.HibernateException: Could not parse configuration: com/mashlife/re         


        
13条回答
  •  余生分开走
    2020-11-29 09:07

    In your mapping files, you must have the exactly SAME doctype as found in the mapping DTD's.

    Then and only then you'll see that the dtd's found in hibernate3.jar can be found through the classpath, and running behind a firewall, stand-alone, etc. will be no problem at all. No local dtd's in your projects to solve this issue, no code to intercept. :-)

    
    

    The same is of course applicable for the configuration file.

提交回复
热议问题