Announcement Announcement Module
Collapse
No announcement yet.
How to use a custom parser for Hibernate configuration? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to use a custom parser for Hibernate configuration?

    I have a application that uses Spring and Hibernate. I sometimes
    do developement disconnected from any network which results
    in a validation exception within Hibernates Configure.

    Others have had the same problem and a solution has been posted
    to the Hibernate fourms:
    http://forum.hibernate.org/viewtopic...xml+validation

    How do I implement this solution when Spring is also being used?

    Searching the Spring code, I cannot find any place that would even
    call Configuration.configure(Document doc); is this correct?

    Thanks

  • #2
    Quote from the thread you linked to

    After some research, I've realized that Hibernate uses a custom DTD entity resolver that gets the DTD's from hibernate3.jar.
    On my case, all was a big confusion, because I've decided to test it shutting down the ethernet interface. But I went too deep, because localhost itself couldn't be resolved. When I just plugged out the network cable, everything worked.
    But, the question is, for that custom DTD work, you must use the exact doctype declaration suggested by hibernate. If you use, for example, a SYSTEM doctype, it won't work.

    Comment


    • #3
      I found my problem. Hibernate (3 at least) does include the dtd's and
      uses a custom entity resolver. However I was using Hibernate Doclet
      to generate my mapping files and had the mapping files generated
      against the 2.0 dtd's, which did not match the jar.

      Fixing that allowed access with just loopback configured.

      Comment

      Working...
      X