Eclipse (3.3.1) - Hibernate Tools plugin - structured hbm.xml editor does not resolve
external entity references kept in an external DTD file that is referenced in the hbm.xml
file
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: HBX-1028
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HBX-1028
Project: Hibernate Tools
Issue Type: Bug
Components: eclipse, visualizations
Affects Versions: 3.2.0.GA
Environment: Windows XP Pro, Eclipse 3.3.1, Hibernate Tools plugin w/ all
prerequisite plugins (WTP, JBoss stable update & Europa sites) installed
Reporter: Amit Pradhan
Attachments: HibernateScreenshot.doc
[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
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira