3 Replies Latest reply on May 12, 2004 2:00 PM by cuddles

    Hibernate mapping files not found

    cuddles Newbie

      Hi,

      I am using JBoss3.2.3, Hibernate 2.1.2 and MySQL 4.0.17. I am in the process of moving my application that uses Hibernate in a non-J2EE environment into the JBoss environment. My application uses hibernate.cfg.xml to find its *.hbm.xml mapping files. It is failing when the net.sf.cfg.Configuration instance can't find the mapping files declared in hibernate.cfg.xml. My hibernate.cfg.xml is in my deploy directory along with my mapping files. I have set my classpath to the deploy directory and get the same error. I have tried using absolute paths as well.

      Where should I put my mapping files so that the Hibernate Configuration object can find them? I should mention that I set the classpath and start the JBoss server using an ant task.

      PS Long term I will use the Hibernate MBean and CMP, but for a short term deadline getting that configured, setup and implemented has taken too long and been fraught with gotchas to serve my short term needs.

      Thanks!