File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Hibernate - the headder for *.hbm.xml file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate - the headder for *.hbm.xml file" Watch "Hibernate - the headder for *.hbm.xml file" New topic
Author

Hibernate - the headder for *.hbm.xml file

Witold Marshal
Ranch Hand

Joined: Feb 05, 2012
Posts: 48
What is the headder for mapping files for new release od Hibernate (version 4.x)?
I have found something like this:


But location : http://www.hibernate.org/xsd/hibernate-mapping
is not working (not such page found).
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10101
    
164

Witold Marshal wrote:


But location : http://www.hibernate.org/xsd/hibernate-mapping
is not working (not such page found).


It's important to understand that the xmlns attribute value is just a logical namespace and it need not be the location where the xsd is published. Usually the schemaLocation attribute maps the logical namespace to a location, most of the times it's a URL. However, in this case the xsd is packaged within the hibernate jars and is not published anywhere. If you are trying to setup your IDE for auto-completion and other such features for hibernate configuration files, then you'll have to setup the IDE to point to the xsd contained in the hibernate jar.

[My Blog] [JavaRanch Journal]
Witold Marshal
Ranch Hand

Joined: Feb 05, 2012
Posts: 48
I want to get that xsd file to read the schema elements and than maybe customize my Eclipse for prompting xml elements.
Do you know the location o this xsd file? Which jar contains it?
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10101
    
164

Witold Marshal wrote:
Do you know the location o this xsd file? Which jar contains it?


It should be in the hibernate-core*.jar somewhere under a folder named schema inside it. I don't have ready access to hibernate jars right now to confirm. But you can probably do a quick check in your project dependencies.
Witold Marshal
Ranch Hand

Joined: Feb 05, 2012
Posts: 48
Thanks a lof. You were right, I have found it. : )
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate - the headder for *.hbm.xml file