title: Error parsing SQL Mapper Configuration... Cause: java.lang.ClassNotFoundException: Cannot find class:
body: <p>Please help me to resolve this error.</p>
  
  <blockquote>
    <p>There was an unexpected error (type=Internal Server Error, status=500).</p>
    
    <h3>Error building SqlSession. ### The error may exist in mybatis/xml/Student.xml ### Cause:</h3>
    
    <p>org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper
    Configuration. Cause: org.apache.ibatis.builder.BuilderException:
    Error parsing Mapper XML. Cause:
    org.apache.ibatis.builder.BuilderException: Error resolving class.
    Cause: org.apache.ibatis.type.TypeException: Could not resolve type
    alias 'Student'. Cause: java.lang.ClassNotFoundException: Cannot find
    class: Student</p>
  </blockquote>
  
  <p>and here is my project folder structure 
  <a href="https://i.stack.imgur.com/bZmgD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bZmgD.png" alt="enter image description here"></a></p>
  
  <p>my Student class:</p>
  
  <pre class="lang-java prettyprint-override"><code>package mybatis.model;
  
  public class Student {
  private int id;
  private String name;
  private String branch;
  private int percentage;
  private int phone;
  private String email;
  
      public Student(String name, String branch, int percentage, int phone, String email) {
            super();
            this.name = name;
            this.branch = branch;
            this.percentage = percentage;
            this.phone = phone;
            this.email = email;
         }
  }
  </code></pre>
  
  <p>my controller class:</p>
  
  <pre class="lang-java prettyprint-override"><code>package mybatis.controller;
  import java.io.IOException;
  import java.io.Reader;
  
  import org.apache.ibatis.io.Resources;
  import org.apache.ibatis.session.*;
  import org.springframework.web.bind.annotation.GetMapping;
  import org.springframework.web.bind.annotation.RestController;
  import mybatis.model.Student;
  
  @RestController
  public class mybatisController {
  
      @GetMapping("/")
      public String home() throws IOException {
          Reader reader = Resources.getResourceAsReader("mybatis/xml/SqlMapConfig.xml");
          SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(reader); 
          SqlSession session = sqlSessionFactory.openSession();
  
          //Create a new student object
          Student student = new Student("Mohammad","It", 80, 984803322, "Mohammad@gmail.com" ); 
  
          //Insert student data      
          Integer result = session.insert("Student.insert", student);
          return result&gt;0 ? "inserted":"fail";
      }
  }
  </code></pre>
  
  <p>SqlMapConfig.xml</p>
  
  <p><a href="https://i.stack.imgur.com/eN7z7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eN7z7.png" alt="enter image description here"></a></p>
  
  <p>Student.xml</p>
  
  <p><a href="https://i.stack.imgur.com/Zl35n.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Zl35n.png" alt="enter image description here"></a></p>