These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: Eclipse,Hibernate Plugin, External DTD, Hibernate XML Editor
PostPosted: Sat Dec 29, 2007 4:38 pm 
Newbie

Joined: Sat Dec 29, 2007 4:06 pm
Posts: 4
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 reference to an external global dtd file in the Hibernate 3.0 XML editor would be appreciated.
amit


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 30, 2007 3:43 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
there are no Hibernate 3.0 XML Editor in hibernate tools, we just enhance the standard Eclipse WTP XML editor so not sure what you are actually using.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 30, 2007 4:41 pm 
Newbie

Joined: Sat Dec 29, 2007 4:06 pm
Posts: 4
I installed the WTP plugin (& others from JBoss stable update & Europa sites) as prereqs for the Hibernate Tool plugin.

In Eclipse's Package Explorer window, I right-click on "Role.hbm.xml", select "Open with..." and choose from (Faces Config. Editor, Hibernate 3.0 XML Editor, Text Editor, XML Editor, System Editor, In-Place editor, Default Editor, Other ...). I have a screen shot, but don't know how to attach to this msg or to send it.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 30, 2007 5:52 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
aaah sorry - you mean the structured hbm.xml editor...

You want it to edit multiple files at the same time I reckon ?

Not sure if that is feasbile.

please report it in JBIDE jira with relevant files/screenshots.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 30, 2007 7:13 pm 
Newbie

Joined: Sat Dec 29, 2007 4:06 pm
Posts: 4
Editing multiple files would be nice too..., however, for now, I would just like for it to resolve external entity references which are all included in an external globals.dtd, and that dtd is referenced in the hbm.xml.

[Just FYI, in the Hibernate perspsective, for my console configuration (where I have specified the entity resolver "org.hibernate.util.DTDEntityResolver" as described above), when I open the mapping diagram for the node, the external entities are resolved as expected.]

Can the structured hbm.xml editor in the Java perspective resolve external entity references which are all included in a single external globals.dtd ?

If not, what's the link to the JBIDE/jira (? sorry I'm a newbie) so I can post screenshots, etc.. Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 30, 2007 7:42 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
google is your friend..http://www.google.com/search?client=ope ... 8&oe=utf-8

or just http://jira.jboss.com/jira/browse/JBIDE

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 30, 2007 8:54 pm 
Newbie

Joined: Sat Dec 29, 2007 4:06 pm
Posts: 4
I've posted it as a bug. Thanks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.