fuse not able to map my *.hbm.xml files
shirshananda Nov 12, 2014 6:25 AMHi,
i am trying to create a camel project which uses hibernate 4 for DAO queries.
I have kept the hibernate.cfg.xml file in etc folder where i have given the mapping for my *.hbm.xml files
<?xml version='1.0' encoding='utf-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <property name="dialect">org.hibernate.dialect.Oracle10gDialect</property> <property name="connection.driver_class">oracle.jdbc.OracleDriver</property> <property name="connection.url">jdbc:oracle:thin:@localhost:1521:TPFDB</property> <property name="connection.username">USER_HB</property> <property name="connection.password">USER_HB</property> <property name="hibernate.connection.autocommit">true</property> <property name="hibernate.show_sql">true</property> <property name="hibernate.format_sql">true</property> <property name="hibernate.generate_statistics">true</property> <property name="hibernate.jdbc.batch_size">100</property> <property name="hibernate.connection.characterEncoding">utf8</property> <property name="hbm2ddl.auto">update</property> <property name="current_session_context_class">thread</property> <mapping jar = "C:/Users/Softwares/jboss-fuse-6.1.0.redhat-379/deploy/entities-0.0.1.jar" resource="Movies.hbm.xml" /> <mapping jar = "C:/Users/Softwares/jboss-fuse-6.1.0.redhat-379/deploy/entities-0.0.1.jar" resource="Series.hbm.xml" /> </session-factory> </hibernate-configuration>
and the error i am getting is
Caused by: org.hibernate.MappingNotFoundException: resource: C:/jboss-fuse-6.1.0.redhat-379/deploy/entities-0.0.1.jar/Movies.hbm.xml not found at org.hibernate.cfg.Configuration.addResource(Configuration.java:767)[69:org.hibernate.core:4.3.6.Final] at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:2255)[69:org.hibernate.core:4.3.6.Final] at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:2227)[69:org.hibernate.core:4.3.6.Final] at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2207)[69:org.hibernate.core:4.3.6.Final] at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2160)[69:org.hibernate.core:4.3.6.Final] at org.hibernate.cfg.Configuration.configure(Configuration.java:2133)[69:org.hibernate.core:4.3.6.Final] at com.my.utilities.SessionFactoryUtil.initSessionFactory(SessionFactoryUtil.java:44)[265:utility:0.0.1]
any one can tell me why it is not able to map to my hbm.xml file?