Results 1 to 1 of 1
Thread: Hibernate config problem
- 01-31-2011, 10:28 PM #1
Member
- Join Date
- Jan 2011
- Posts
- 1
- Rep Power
- 0
Hibernate config problem
Hi Guys, first post so please be kind :)
I am new to Hibernate, but not java or J2EE. maybe you guys can see some thing wrong with the hibernate.cfg.xml for the simple app I am developing. Using netbeans to run I get this exception...
validated the hibernate.cfg.xml file and everything is okay...perhaps you can see the error in the fileSEVERE: Error parsing XML: hibernate.cfg.xml(16) The content of elements must consist of well-formed character data or markup.
Exception in thread "main" org.hibernate.HibernateException: Could not parse configuration: hibernate.cfg.xml
at org.hibernate.cfg.Configuration.doConfigure(Config uration.java:1494)
at org.hibernate.cfg.Configuration.configure(Configur ation.java:1428)
at sample.PopulateMessages.main(PopulateMessages.java :21)
Caused by: org.dom4j.DocumentException: Error on line 16 of document : The content of elements must consist of well-formed character data or markup. Nested exception: The content of elements must consist of well-formed character data or markup.
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
at org.hibernate.cfg.Configuration.doConfigure(Config uration.java:1484)
Error relates to line 16 which is<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.url">
com.mysql.jdbc.Driver
</property>
<property name="hibernate.connection.driver_class">
jdbc:mysql://localhost:3306/hibexample
</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">xxxxxx</property>
<property name="hibernate.connection.pool_size">0</property>
<property name="hibernate.dialect">
org.hibernate.dialect.MySQLDialect
</property>
<property name="hibernate.show_sql">false</property>
<!-- "Import" the mapping resources here -->
<mapping class="hibtest.Message" />
</session-factory>
</hibernate-configuration>
<property name="hibernate.connection.pool_size">0</property>
Similar Threads
-
problem in hibernate
By jperson in forum JDBCReplies: 1Last Post: 01-11-2011, 10:10 AM -
crieteriaSearch problem (hibernate)
By asshwy in forum JDBCReplies: 3Last Post: 05-07-2010, 11:21 AM -
JSF 2.0 faces.config.xml problem
By manimca1984@gmail.com in forum JavaServer Faces (JSF)Replies: 0Last Post: 02-10-2010, 07:58 AM -
problem in hibernate need help!
By jrgahan in forum Advanced JavaReplies: 0Last Post: 05-22-2008, 09:00 AM -
problem with hibernate and oracle 8i
By javadev in forum JDBCReplies: 4Last Post: 08-09-2007, 02:21 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks