title: No property type found
body: <p>I was working on a project but I got this no property type found error.
  Please check my code and try to understand what the problem is.</p>
  
  <pre><code>package com.bisoft.staj.poi;
  
  import java.io.File;
  import java.io.FileInputStream;
  import org.apache.poi.ss.usermodel.Row;
  import org.apache.poi.xssf.usermodel.XSSFSheet;
  import org.apache.poi.xssf.usermodel.XSSFWorkbook;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.boot.CommandLineRunner;
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  
  @SpringBootApplication
  public class PoiApplication implements CommandLineRunner {
  
      @Autowired
      MesafeRepository mesafeRepository;
  
      public static void main(String[] args) {
          SpringApplication.run(PoiApplication.class, args);
      }
  
      @Override
      public void run(String... strings) throws Exception {
          System.out.println("Debug");
  
          FileInputStream file = new FileInputStream(new File("C:/Users/MONSTER/Desktop/Hello.xlsx"));
          XSSFWorkbook workbook = new XSSFWorkbook(file);
          XSSFSheet sheet = workbook.getSheetAt(0);
          Row row;
          for (int i = 1; i &lt;= sheet.getLastRowNum(); i++) {
              row = (Row) sheet.getRow(i);  //sheet number
  
              String kayitNo;
              if (row.getCell(0) == null) {
                  kayitNo = "0";
              } else {
                  kayitNo = row.getCell(0).toString();
              }
  
              int cihazNo = 0;
              if (row.getCell(1) != null) {
                  cihazNo = (int) row.getCell(1).getNumericCellValue();
              }
              String plaka;
              if (row.getCell(2) == null) {
                  plaka = "null";
              } else {
                  plaka = row.getCell(2).toString();                           //exceldeki isimleri
              }
              String surucu;
              if (row.getCell(3) == null) {
                  surucu = "null";
              } else {
                  surucu = row.getCell(3).toString();
              }
              float ilkMesafeSayaci = 0;
              if (row.getCell(4) != null) {
                  ilkMesafeSayaci = (float)row.getCell(4).getNumericCellValue();
              }
              String ilkMesafeTarih;
              if (row.getCell(5) == null) {
                  ilkMesafeTarih = "null";
              } else {
                  ilkMesafeTarih = row.getCell(5).toString();
              }
              float sonMesafeSayaci = 0;
              if (row.getCell(6) != null) {
                  sonMesafeSayaci = (float)row.getCell(6).getNumericCellValue();
              }
              String sonMesafeTarih;
              if (row.getCell(7) == null) {
                  sonMesafeTarih = "null";
              } else {
                  sonMesafeTarih = row.getCell(7).toString();
              }
              float toplamMesafe = 0;
              if (row.getCell(8) != null) {
                  toplamMesafe = (float)row.getCell(8).getNumericCellValue();
              }
  
              Mesafe c = new Mesafe();
              c.setCihazNo(cihazNo);
              c.setPlaka(plaka);
              c.setSurucu(surucu);
              c.setIlkMesafeSayaci(ilkMesafeSayaci);
              c.setIlkMesafeTarih(ilkMesafeTarih);
              c.setSonMesafeSayaci(sonMesafeSayaci);
              c.setSonMesafeTarih(sonMesafeTarih);
              c.setToplamMesafe(toplamMesafe);
              mesafeRepository.save(c);
  
              System.out.println(cihazNo + " " + plaka + " " + surucu);
  
          }
  
          mesafeRepository.findByName("Berkin").forEach(System.out::println);
  
          file.close();
          System.out.println("Completed!");
      }
  }
  </code></pre>
  
  <p>Repository</p>
  
  <pre><code>/*
   * To change this license header, choose License Headers in Project Properties.
   * To change this template file, choose Tools | Templates
   * and open the template in the editor.
   */
  package com.bisoft.staj.poi;
  
  import java.io.Serializable;
  import java.util.List;
  import org.springframework.data.jpa.repository.JpaRepository;
  import org.springframework.data.repository.CrudRepository;
  
  /**
   *
   * @author MONSTER
   */
  public interface MesafeRepository extends JpaRepository&lt;Mesafe, Long&gt;{
  
      public List&lt;Mesafe&gt; findByName(String name);
  }
  </code></pre>
  
  <p>Class</p>
  
  <pre><code>/*
   * To change this license header, choose License Headers in Project Properties.
   * To change this template file, choose Tools | Templates
   * and open the template in the editor.
   */
  package com.bisoft.staj.poi;
  
  import javax.annotation.Generated;
  import javax.persistence.Entity;
  import javax.persistence.GeneratedValue;
  import javax.persistence.GenerationType;
  import javax.persistence.Id;
  import javax.persistence.SequenceGenerator;
  
  /**
   *
   * @author MONSTER
   */
  @Entity
  public class Mesafe {
  
      @Id
      @SequenceGenerator(name = "customersequence", sequenceName = "customersequence", allocationSize = 1)
      @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "customersequence")
      private Long kayitNo;
      private int cihazNo;
      private String plaka;
      private String surucu;
      private float ilkMesafeSayaci;
      private String ilkMesafeTarih;
      private float sonMesafeSayaci;
      private String SonMesafeTarih;
      private float toplamMesafe;
  
      public Long getKayitNo() {
          return kayitNo;
      }
  
      public void setKayitNo(Long kayitNo) {
          this.kayitNo = kayitNo;
      }
  
      public int getCihazNo() {
          return cihazNo;
      }
  
      public void setCihazNo(int cihazNo) {
          this.cihazNo = cihazNo;
      }
  
      public String getPlaka() {
          return plaka;
      }
  
      public void setPlaka(String plaka) {
          this.plaka = plaka;
      }
  
      public String getSurucu() {
          return surucu;
      }
  
      public void setSurucu(String surucu) {
          this.surucu = surucu;
      }
  
      public float getIlkMesafeSayaci() {
          return ilkMesafeSayaci;
      }
  
      public void setIlkMesafeSayaci(float ilkMesafeSayaci) {
          this.ilkMesafeSayaci = ilkMesafeSayaci;
      }
  
      public String getIlkMesafeTarih() {
          return ilkMesafeTarih;
      }
  
      public void setIlkMesafeTarih(String ilkMesafeTarih) {
          this.ilkMesafeTarih = ilkMesafeTarih;
      }
  
      public float getSonMesafeSayaci() {
          return sonMesafeSayaci;
      }
  
      public void setSonMesafeSayaci(float sonMesafeSayaci) {
          this.sonMesafeSayaci = sonMesafeSayaci;
      }
  
      public String getSonMesafeTarih() {
          return SonMesafeTarih;
      }
  
      public void setSonMesafeTarih(String SonMesafeTarih) {
          this.SonMesafeTarih = SonMesafeTarih;
      }
  
      public float getToplamMesafe() {
          return toplamMesafe;
      }
  
      public void setToplamMesafe(float toplamMesafe) {
          this.toplamMesafe = toplamMesafe;
      }
  
      @Override
      public String toString() {
          return "Mesafe{" + "kayitNo=" + kayitNo + ", cihazNo=" + cihazNo + ", plaka=" + plaka + ", surucu=" + surucu + ", ilkMesafeSayaci=" + ilkMesafeSayaci + ", ilkMesafeTarih=" + ilkMesafeTarih + ", sonMesafeSayaci=" + sonMesafeSayaci + ", SonMesafeTarih=" + SonMesafeTarih + ", toplamMesafe=" + toplamMesafe + '}';
      }
  }
  </code></pre>
  
  <p>Error</p>
  
  <pre><code>by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mesafeRepository': Invocation of init method failed; nested exception is org.springframework.data.mapping.PropertyReferenceException: No property name found for type Mesafe!
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1628) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      ... 18 common frames omitted
  Caused by: org.springframework.data.mapping.PropertyReferenceException: No property name found for type Mesafe!
      at org.springframework.data.mapping.PropertyPath.&lt;init&gt;(PropertyPath.java:77) ~[spring-data-commons-1.13.4.RELEASE.jar:na]
      at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:329) ~[spring-data-commons-1.13.4.RELEASE.jar:na]
      at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:309) ~[spring-data-commons-1.13.4.RELEASE.jar:na]
      at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:272) ~[spring-data-commons-1.13.4.RELEASE.jar:na]
      at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:243) ~[spring-data-commons-1.13.4.RELEASE.jar:na]
      at org.springframework.data.repository.query.parser.Part.&lt;init&gt;(Part.java:76) ~[spring-data-commons-1.13.4.RELEASE.jar:na]
      at org.springframework.data.repository.query.parser.PartTree$OrPart.&lt;init&gt;(PartTree.java:247) ~[spring-data-commons-1.13.4.RELEASE.jar:na]
      at org.springframework.data.repository.query.parser.PartTree$Predicate.buildTree(PartTree.java:398) ~[spring-data-commons-1.13.4.RELEASE.jar:na]
      at org.springframework.data.repository.query.parser.PartTree$Predicate.&lt;init&gt;(PartTree.java:378) ~[spring-data-commons-1.13.4.RELEASE.jar:na]
      at org.springframework.data.repository.query.parser.PartTree.&lt;init&gt;(PartTree.java:89) ~[spring-data-commons-1.13.4.RELEASE.jar:na]
      at org.springframework.data.jpa.repository.query.PartTreeJpaQuery.&lt;init&gt;(PartTreeJpaQuery.java:64) ~[spring-data-jpa-1.11.4.RELEASE.jar:na]
      at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$CreateQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:103) ~[spring-data-jpa-1.11.4.RELEASE.jar:na]
      at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$CreateIfNotFoundQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:214) ~[spring-data-jpa-1.11.4.RELEASE.jar:na]
      at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$AbstractQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:77) ~[spring-data-jpa-1.11.4.RELEASE.jar:na]
      at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.&lt;init&gt;(RepositoryFactorySupport.java:436) ~[spring-data-commons-1.13.4.RELEASE.jar:na]
      at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:221) ~[spring-data-commons-1.13.4.RELEASE.jar:na]
      at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.initAndReturn(RepositoryFactoryBeanSupport.java:277) ~[spring-data-commons-1.13.4.RELEASE.jar:na]
      at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:263) ~[spring-data-commons-1.13.4.RELEASE.jar:na]
      at org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean.afterPropertiesSet(JpaRepositoryFactoryBean.java:101) ~[spring-data-jpa-1.11.4.RELEASE.jar:na]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      ... 28 common frames omitted
  </code></pre>
  
  <p>my pom.xml and application.properties files are working OK so where can the problem be? Thanks...</p>