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.  [ 1 post ] 
Author Message
 Post subject: Element type "hibernate-configuration" is not declared
PostPosted: Thu Jul 10, 2014 4:42 pm 

Joined: Thu Jul 10, 2014 11:05 am
Posts: 1
here is the what I have in maven dependencies:

here is what I have in hibernate.cfg.xml:
<?xml version="1.0" encoding="utf-8"?>

xsi:schemaLocation="http://www.hibernate.org/xsd/hibernate-configuration hibernate-configuration-4.0.xsd"

<!-- hibernate dialect -->
<property name="hibernate.dialect">org.hibernate.dialect.DB2Dialect</property>

<!-- JDBC connection -->
<property name="hibernate.connection.driver_class">com.ibm.db2.jcc.DB2Driver</property>
<property name="hibernate.connection.url">jdbc:db2://somedb.test.company.net:1111/schema</property>
<property name="hibernate.connection.username">id</property>
<property name="hibernate.connection.password">pw</property>

<!-- SQL rendering properties -->
<property name="hibernate.format_sql">true</property>
<property name="hibernate.use_sql_comments">true</property>

<!-- List of XML mapping files, one file per module -->
<mapping resource="class1.xml" />


here is what I have in class1.xml:
<?xml version="1.0" encoding="utf-8"?>
<hibernate-mapping xmlns="http://www.hibernate.org/xsd/hibernate-mapping"
xsi:schemaLocation="http://www.hibernate.org/xsd/hibernate-mapping hibernate-mapping-4.0.xsd"
<class name="JobOutput" table="JOB_OUTPUT">
<meta attribute="class-description">
This class contains a job output detail.
<property name="jobId" column="JOB_REQUEST_ID" type="string"/>
<property name="query" column="QUERY_VALUE" type="string"/>
<property name="docId" column="DOCID" type="string"/>

errors I am getting:
Caused by: org.hibernate.MappingException: invalid configuration
... 1 more
Caused by: org.xml.sax.SAXParseException: Element type "hibernate-configuration" is not declared.

my questions:
1) am I using the right header for hibernate 4.3 in hibernate.cfg.xml?
http://www.hibernate.org/xsd/hibernate-configuration in browser is giving me error "Looks like you have found a broken link!"
2) if the header is close to be "right", where can I view this "hibernate-configuration-4.0.xsd" and "hibernate-mapping-4.0.xsd"?

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

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.