title: Hibernate.config.xml file error
body: <p>I am very new to Hibernate ,<a href="http://www.javatpoint.com/example-to-create-hibernate-application-in-eclipse-ide" rel="nofollow">http://www.javatpoint.com/example-to-create-hibernate-application-in-eclipse-ide</a><br>
   I followed this link to create a Hibernate application,but i am getting th e following error: 
  11:31:31,707  INFO [main] Environment:584 - using JDK 1.4 java.sql.Timestamp handling
  11:31:31,738  INFO [main] Configuration:1423 - configuring from resource: hibernate.cfg.xml
  11:31:31,738  INFO [main] Configuration:1400 - Configuration resource: hibernate.cfg.xml</p>
  
  <p>11:31:33,501  INFO [main] Configuration:553 - Reading mappings from resource : employee.hbm.xml
  Exception in thread "main" org.hibernate.MappingNotFoundException: resource: employee.hbm.xml not found
      at org.hibernate.cfg.Configuration.addResource(Configuration.java:563)
      at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1584)
      at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1552)
      at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1531)
      at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1505)
      at org.hibernate.cfg.Configuration.configure(Configuration.java:1425)
      at pack.storedata.main(storedata.java:13)</p>
  
  <p>hibernate.cfg.xml:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"&gt; 
  &lt;hibernate-configuration&gt;
     &lt;session-factory&gt;
  
     &lt;property name="hibernate.dialect"&gt;
        org.hibernate.dialect.MySQLDialect
     &lt;/property&gt;
     &lt;property name="hibernate.connection.driver_class"&gt;
        com.mysql.jdbc.Driver
     &lt;/property&gt;
  
     &lt;!-- Assume test is the database name --&gt;
     &lt;property name="hibernate.connection.url"&gt;
        jdbc:mysql://localhost:3306/test
     &lt;/property&gt;
     &lt;property name="hibernate.connection.username"&gt;
      root
     &lt;/property&gt;
     &lt;property name="hibernate.connection.password"&gt;
        root
     &lt;/property&gt;
     &lt;!-- List of XML mapping files --&gt;
     &lt;mapping resource="employee.hbm.xml" /&gt;
  &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt; 
  </code></pre>
  
  <p>employee.hbm.xml:</p>
  
  <pre><code>&lt;?xml version='1.0'?&gt;  
  &lt;!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"&gt; 
  &lt;hibernate-mapping&gt;
    &lt;class name="pack.employee" table="emp1000"&gt;  
      &lt;id name="id"&gt;  
       &lt;generator class="assigned"&gt;&lt;/generator&gt;  
      &lt;/id&gt;  
  
      &lt;property name="firstName"&gt;&lt;/property&gt;  
      &lt;property name="lastName"&gt;&lt;/property&gt;  
  
    &lt;/class&gt;  
  
   &lt;/hibernate-mapping&gt;
  </code></pre>
  
  <p>storedata.java:</p>
  
  <pre><code>package pack;
  
  import org.hibernate.Session;  
  import org.hibernate.SessionFactory;  
  import org.hibernate.Transaction;  
  import org.hibernate.cfg.Configuration;  
  
  public class storedata {  
  public static void main(String[] args) {  
  
      //creating configuration object  
      Configuration cfg=new Configuration();  
      cfg.configure("hibernate.cfg.xml");//populates the data of the configuration file  
  
      //creating seession factory object  
      SessionFactory factory=cfg.buildSessionFactory();  
  
      //creating session object  
      Session session=factory.openSession();  
  
      //creating transaction object  
      Transaction t=session.beginTransaction();  
  
      employee e1=new employee();  
      e1.setId(115);  
      e1.setFirstName("sonoo");  
      e1.setLastName("jaiswal");  
  
      session.persist(e1);//persisting the object  
  
      t.commit();//transaction is committed  
      session.close();  
  
      System.out.println("successfully saved");  
  
  }  
  } 
  </code></pre>
  
  <p>employee.java:</p>
  
  <pre><code>package pack;
  
  
  public class employee {  
  private int id;  
  private String firstName,lastName;  
  
  public int getId() {  
    return id;  
  }  
  public void setId(int id) {  
    this.id = id;  
  }  
  public String getFirstName() {  
    return firstName;  
  }  
  public void setFirstName(String firstName) {  
    this.firstName = firstName;  
  }  
  public String getLastName() {  
    return lastName;  
  }  
  public void setLastName(String lastName) {  
    this.lastName = lastName;  
  }  
  
  
  }  
  </code></pre>
  
  <p>Project Structure:</p>
  
  <pre><code>Hibernate
   -&gt;src
     -&gt;pack
       -&gt;employee.java
       -&gt;storedata.java
     -&gt; employee.hbm.xml
     -&gt; hibernate.cfg.xml
  </code></pre>