Hibernate xml file issue

advilmBaime

New Member
I have set up Tapestry 5 project and all went fine, until I deployed Hibernate. I have created hibernate.xml file and \[code\]<hibernate-configuration><session-factory> <property name="dialect">org.hibernate.dialect.MySQLDialect</property> <property name="connection.driver_class">com.mysql.jdbc.Driver</property> <property name="connection.url">jdbc:mysql://localhost/project</property> <property name="connection.username">root</property> <property name="connection.password">password12</property> <property name="connection.pool_size">5</property> <!-- Print SQL to stdout. --> <property name="show_sql">true</property> <property name="format_sql">true</property> <property name="use_sql_comments">true</property> <property name="generate_statistics">true</property> <property name="hibernate.archive.autodetection">class, hbm</property> <property name="hibernate.transaction.flush_before_completion">true</property> <!-- Mapping files TODO: Classify those mappings in exact order and define the relations between them in entities some time later on.--> <mapping class="rs.project.com.entities.Fruit"/> <mapping class="rs.project.com.entities.Article"/></session-factory>\[/code\]and it's OK as far as the implementation of it is concerned. However when I deploy the app it defines me some other config, which can be seen on my trace log, and uses some other xml file, based on the mappings it shows me on the log, and it's about some completely different project I used a while ago. The thing is I can't see what's causing such a behavior, and I am really frustrated. I am using Tomcat Apache Catalina and MySQL for Hibernate. Also, I did some research and found out that persistance.xml file is being used in my project.properties which is kinda strange. \[code\] persistence.xml.dir=${conf.dir}\[/code\]Driver for connecting my app to MySQL is jdbc.mysql.driver.So my goal is to possibly define the matter that causes such behavior here with you, and to solve it.Thanks in advance for your answers.
 
Back
Top