-->
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.  [ 4 posts ] 
Author Message
 Post subject: Error parsing XML: /hibernate.cfg.xml(14) Attribute "value"
PostPosted: Tue Aug 25, 2009 1:41 pm 
Newbie

Joined: Sun Aug 23, 2009 2:43 am
Posts: 9
I am facing following issue for my hibernate.cfg.xml





12:15:42,466 ERROR XMLHelper:61 - Error parsing XML: /hibernate.cfg.xml(14) Attribute "value" must be declared for element type "property".
12:15:42,466 ERROR XMLHelper:61 - Error parsing XML: /hibernate.cfg.xml(15) Attribute "value" must be declared for element type "property".
12:15:42,466 ERROR XMLHelper:61 - Error parsing XML: /hibernate.cfg.xml(16) Attribute "value" must be declared for element type "property".
12:15:42,466 ERROR XMLHelper:61 - Error parsing XML: /hibernate.cfg.xml(19) Attribute "value" must be declared for element type "property".
12:15:42,466 ERROR XMLHelper:61 - Error parsing XML: /hibernate.cfg.xml(21) Attribute "value" must be declared for element type "property".
12:15:42,466 ERROR XMLHelper:61 - Error parsing XML: /hibernate.cfg.xml(23) Attribute "value" must be declared for element type "property".
12:15:42,481 ERROR XMLHelper:61 - Error parsing XML: /hibernate.cfg.xml(25) Attribute "value" must be declared for element type "property".
12:15:42,481 ERROR XMLHelper:61 - Error parsing XML: /hibernate.cfg.xml(27) Attribute "value" must be declared for element type "property".
12:15:42,481 ERROR XMLHelper:61 - Error parsing XML: /hibernate.cfg.xml(29) Attribute "value" must be declared for element type "property".
Exception in thread "main" java.lang.ExceptionInInitializerError
at persistence.HibernateUtil.<clinit>(HibernateUtil.java:12)
at hello.HelloWorld.main(HelloWorld.java:15)
Caused by: org.hibernate.MappingException: invalid configuration
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1347)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1288)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1274)
at persistence.HibernateUtil.<clinit>(HibernateUtil.java:10)
... 1 more
Caused by: org.xml.sax.SAXParseException: Attribute "value" must be declared for element type "property".
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValidate(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java:465)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1344)
... 4 more






Here is my hibernate.cfg.xml
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">


<hibernate-configuration>




<session-factory>
<!-- Scan for annotated classes and Hibernate mapping XML files -->

<property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/>
<property name="hibernate.connection.url" value="jdbc:hsqldb:hsql://localhost"/>
<property name="hibernate.connection.username" value="sa"/>

<property name="hibernate.c3p0.min_size"
value="5"/>
<property name="hibernate.c3p0.max_size"
value="20"/>
<property name="hibernate.c3p0.timeout"
value="300"/>
<property name="hibernate.c3p0.max_statements"
value="50"/>
<property name="hibernate.c3p0.idle_test_period"
value="3000"/>

<property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>

</session-factory>
</hibernate-configuration>



Any help is hightly appreciated


Top
 Profile  
 
 Post subject: Re: Error parsing XML: /hibernate.cfg.xml(14) Attribute "value"
PostPosted: Tue Aug 25, 2009 1:53 pm 
Newbie

Joined: Sun Aug 23, 2009 2:43 am
Posts: 9
i fixed this issue ,
Thanks


Top
 Profile  
 
 Post subject: Re: Error parsing XML: /hibernate.cfg.xml(14) Attribute "value"
PostPosted: Thu Jun 03, 2010 4:08 am 
Newbie

Joined: Thu Jun 03, 2010 4:05 am
Posts: 2
Can you please share the solution to this problem?
I'm facing a similar problem.


Top
 Profile  
 
 Post subject: Re: Error parsing XML: /hibernate.cfg.xml(14) Attribute "value"
PostPosted: Thu Jun 10, 2010 5:07 am 
Newbie

Joined: Thu Jun 03, 2010 4:05 am
Posts: 2
I solved this problem.
Instead of
Code:
<property name="propertyName" value="propertyValue"/>


I used
Code:
<property name="propertyName">propertyValue</property>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.