• org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml


    org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
        at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1542)
        at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfiguration.java:1035)
        at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfiguration.java:64)
        at org.hibernate.cfg.Configuration.configure(Configuration.java:1476)
        at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfiguration.java:1017)
        at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfiguration.java:64)
        at org.hibernate.cfg.Configuration.configure(Configuration.java:1462)
        at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfiguration.java:1011)
        at hibernateTest.UserService.main(UserService.java:12)
    Caused by: org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection timed out: connect
        at org.dom4j.io.SAXReader.read(SAXReader.java:484)
        at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1532)
        ... 8 more

    注意xml的dtd是否配置正确:

    我原来的dtd是这样写的:

    http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd

    可能无法加载了,改成下面一个配置就可以了:

    http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd

  • 相关阅读:
    [cf582E]Boolean Function
    [atAGC029F]Construction of a tree
    [atAGC020E]Encoding Subsets
    [gym102769L]Lost Temple
    [atAGC034E]Complete Compress
    [cf566E]Restoring Map
    [atAGC023F]01 on Tree
    [gym102822I]Invaluable Assets
    [gym102900H]Rice Arrangement
    [Offer收割]编程练习赛32
  • 原文地址:https://www.cnblogs.com/toSeeMyDream/p/4525993.html
Copyright © 2020-2023  润新知