-->
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.  [ 2 posts ] 
Author Message
 Post subject: please take a look at this hibernate.cfg.xml, anything wrong
PostPosted: Mon Sep 10, 2007 2:25 am 
Newbie

Joined: Wed Sep 05, 2007 9:26 am
Posts: 16
Hi,

I'm trying to use Hibernate annotation in a Tapestry 5's program, but it keep displaying error:

The content of element type "session-factory" must match "(property*,mapping*,(class-cache|collection-cache)*,event*,listener*)"

I have seen class-cache, collection-cache in documentations, but neven seen event, listner got mentioned, and in hibernate tutorials, without class-cache, collection-cache program will not show above error message, why?

here is my hibernate.cfg.xml, please help me make it complete to avoid that error, thanks!

<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>

<session-factory>

<!-- Database connection settings -->
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://localhost/animal</property>
<property name="connection.username">root</property>
<property name="connection.password"></property>

<!-- JDBC connection pool (use the built-in) -->
<property name="connection.pool_size">1</property>

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

<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class">thread</property>

<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>

<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>

<!-- Drop and re-create the database schema on startup -->
<property name="hbm2ddl.auto">create</property> -

<mapping class="org.bfe.hbm.entities.Fruit" />


</session-factory>

</hibernate-configuration>


Top
 Profile  
 
 Post subject: Have a look at this
PostPosted: Wed Sep 19, 2007 9:32 pm 
Newbie

Joined: Tue Sep 18, 2007 11:13 am
Posts: 8
Not an answer to your Q but i believe u can solve my problem as u too are using mysql.
please have a look at
http://forum.hibernate.org/viewtopic.ph ... highlight=
thanks.


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