Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Hibernate XML mapping validation using DTD from classpath
Hibernate XML mapping validation using DTD from classpath [message #1861869] Thu, 09 November 2023 06:16 Go to previous message
Sergey Starosek is currently offline Sergey StarosekFriend
Messages: 2
Registered: November 2023
Junior Member
Hi All,

Hibernate 5.5.6 (and probably other versions) supports offline validation of the mappings given that XML DTD defined as:
<!DOCTYPE hibernate-mapping
        SYSTEM "classpath://org/hibernate/hibernate-mapping-3.0.dtd">


(see DTDEntityResolver and LocalXmlResourceResolver in https://github.com/hibernate/hibernate-orm/tree/main/hibernate-core)

This works as expected in production but editing of mappings in the Eclipse is painful as the DTD cannot be found.
I've extracted DTDs from the Hibernate JAR, added them to the project and I tried to add user entries to the XML Catalog (tried both catalog and rewrite entries) but no success. Looks like classpath: prefix is not supported.

XML Editor is full of errors and there are two on the line with DTD declaration:
Multiple annotations found at this line:
	- The file cannot be validated as the XML definition "/home/star/projects/AlfaLab/src/ISYS/src/java/classpath:/org/
	 hibernate/hibernate-mapping-3.0.dtd (No such file or directory)" that is specified as describing the syntax of the file cannot be 
	 located.
	- Cannot find DTD 'classpath://org/hibernate/hibernate-mapping-3.0.dtd'.


I'm using Eclipse Version: 2023-09 (4.29.0) and WTP 3.31 (Eclipse XML Editors and Tools Version: 3.31.0.v202308200343).

Any ideas how to solve this problem? I'd prefer to keep current DTD declaration and do some changes to Eclipse configuration instead of using PUBLIC DTD and replacing it during packaging.

Thanks.

 
Read Message
Read Message
Read Message
Previous Topic:org.apache.cxf.cxf-core and jetty plugins giving issue missing constraint import package java.awt
Goto Forum:
  


Current Time: Sat Nov 11 08:11:04 GMT 2023

Powered by FUDForum. Page generated in 0.01907 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top