Fixed
Details
Details
Assignee
Koen Aers
Koen AersReporter
Amit Pradhan
Amit PradhanBug Testcase Reminder (view)
Bug reports should generally be accompanied by a test case!
Bug Testcase Reminder (edit)
Bug reports should generally be accompanied by a test case!
Participants
Amit Pradhan
Koen Aers
Components
Fix versions
Affects versions
Priority
Created December 31, 2007 at 2:51 AM
Updated December 3, 2024 at 4:21 PM
Resolved May 13, 2016 at 2:29 PM
[Reference - Hibernate Tools forum - Title - Eclipse,Hibernate Plugin, External DTD, Hibernate XML Editor] - Initial posting below:
The below external reference to globals DTD (per pg. 137 in Java Persistence w/ Hibernate book) works when I run hbm2ddl as an ant task. I added the HibernateTool plugin into Eclipse (3.3.1.1). In the Hibernate tools perspective, I've created a console configuration & specified under "options" the entity resolver: "org.hibernate.util.DTDEntityResolver". No errors so far.
When I open the Role.hbm.xml file (Java Perspective) using "Open with.." "Hibernate 3.0 XML Editor" the external dtd references are not resolved in the Hibernate 3.0 XML Editor window.
Dir. struct. is - src/com/t0/{Role.java, Role.hbm.xml, IRglobals.dtd}
Class struct. is - classes/com/t0/{Role.class, Role.hbm.xml, IRglobals.dtd}
------------------- My globals dtd is IRglobals.dtd:
<!ENTITY SeqS10000I1C20
'<param name="parameters">start with 10000 increment by 1 cache 20</param>'
>
------------------------
My Role.hbm.xml is:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"
[
<!ENTITY % IRGlobals SYSTEM "classpath://com/t0/IRGlobals.dtd"> %IRGlobals;
]>
<hibernate-mapping package="com.t0">
<class name="Role">
<id name="roleId" type="long">
<generator class="sequence">
<param name="sequence">ir_role_seq</param>
&SeqS10000I1C20;
</generator>
</id>
<property name="name" type="string" length="10" unique="true" not-null="true" ></property>
</class>
</hibernate-mapping>
------------------------
If I replace the external reference to the DTD w/ an inline reference to the entity, then the Hibernate 3.0 XML editor resolves it. Since I have several hbm files & several global refs in my project, I'd prefer to just reference the IRglobals.dtd in all my hbm files.
Any suggestions on how to get the references from an external global dtd file resolved in the Hibernate 3.0 XML editor would be appreciated.
amit