Results 1 to 3 of 3

Thread: How to use a custom parser for Hibernate configuration?

  1. #1
    Join Date
    Jun 2005
    Posts
    2

    Default 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. #2
    Join Date
    Sep 2004
    Posts
    1,086

    Default

    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.

  3. #3
    Join Date
    Jun 2005
    Posts
    2

    Default

    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.

Similar Threads

  1. Dynamic Property Configuration
    By fenrick in forum Container
    Replies: 3
    Last Post: May 12th, 2006, 02:38 AM
  2. How to use Spring with custom configuration file
    By dmajumdar in forum Container
    Replies: 1
    Last Post: May 7th, 2006, 11:34 AM
  3. sax-based parser for xml bean definition
    By eu in forum Container
    Replies: 3
    Last Post: Sep 30th, 2005, 02:27 AM
  4. Replies: 0
    Last Post: Jun 21st, 2005, 06:17 AM
  5. Replies: 5
    Last Post: Aug 27th, 2004, 07:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •