[jboss-user] [JBoss Tools] - Hibernate Tool - how to use offline DTD

John Ng do-not-reply at jboss.com
Thu Apr 26 04:39:17 EDT 2012


John Ng [https://community.jboss.org/people/jcf] created the discussion

"Hibernate Tool - how to use offline DTD"

To view the discussion, visit: https://community.jboss.org/message/732336#732336

--------------------------------------------------------------
Hi all,

How should I setup my Eclipse (3.7) and Hibernate Tool such that it can work with offline DTD files?

I have the following line in hibernate.cfg.xml
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" " http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

I have the key "-//Hibernate/Hibernate Configuration DTD 3.0//EN" in my XML Catalog pointing to a local hibernate-configuration-3.0.dtd in a jar file (as in the image below)
"jar:file:/C:/Program Files/eclipse/plugins/org.hibernate.eclipse.libs_3.4.0.v20120307-2104-H60-Beta1/lib/hibernate/hibernate3.jar!/org/hibernate/hibernate-configuration-3.0.dtd"

However, every time when I am offline, Eclipse raise the warning when I use Hiberate Configuration View to view my project

"Could not parse configuration: C:\...\resources\hibernate.cfg.xml
    org.dom4j.DocumentException: www.hibernate.org Nested exception: www.hibernate.org
    www.hibernate.org Nested exception: www.hibernate.org"

I can revise the <!DOCTYPE> line to point to local DTD, but can I use the XML Catalog such that the correct local DTD is located when needed?

Thank you very much.
  https://community.jboss.org/servlet/JiveServlet/showImage/18500/XMLCatalog.gif  https://community.jboss.org/servlet/JiveServlet/downloadImage/18500/769-324/XMLCatalog.gif
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/732336#732336]

Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120426/0a82427a/attachment.html 


More information about the jboss-user mailing list