title: NotReadablePropertyException: Invalid property 'id' of bean class [java.util.LinkedHashMap]
body: <p>I'm trying to create an abstract service in my springMVC application. My data flows* perfect through my layers, but my persistence (Abstraction), could not find a way to save/delete/update my database, these are the classes:</p>
  
  <pre><code>abstract class BaseServiceImpl&lt;T, ID extends Serializable&gt;
   implements BaseService&lt;T, ID&gt; {
  
  protected abstract BaseRepository&lt;T, ID&gt; getRepository();
  
  private BaseRepository&lt;T, ID&gt; repository;
  
  public BaseServiceImpl(BaseRepository&lt;T, ID&gt; repository){
     this.repository = repository;
  }
  
  public List&lt;T&gt; findAll(){
      return getRepository().findAll();
  }
  
  public T find(ID id){
      return getRepository().findOne(id);
  }
  
  public T save(T persisted){
      return this.repository.save(persisted);
  }
  
  public void delete(ID id){
      getRepository().delete(id);
  }
  
  public long count(){
      return getRepository().count();
  }
  
  public boolean exists(ID id){
      return getRepository().exists(id);
  }  
  }
  </code></pre>
  
  <p>//---</p>
  
  <pre><code>@Service
  public class MedicineServiceImpl
  extends BaseServiceImpl&lt;Medicine, Integer&gt; 
  implements MedicineService {
  
  @Autowired
  private MedicineRepository repository;
  
  @Autowired
  public MedicineServiceImpl(MedicineRepository repository) {
      super(repository);
  }
  
  @Override
  public BaseRepository&lt;Medicine, Integer&gt; getRepository() {
      return repository;
  }
  }
  </code></pre>
  
  <p>//--</p>
  
  <pre><code>@MappedSuperclass
  abstract class BaseDomain {
  
  @Id
  @GeneratedValue(strategy = GenerationType.AUTO)
  private Integer id;
  
  public Integer getId() {
      return id;
  }
  
  public void setId(Integer id) {
      this.id = id;
  }
  }
  </code></pre>
  
  <p>//--</p>
  
  <pre><code>@Entity
  @Table(name = "medicines")
  public class Medicine
  extends BaseDomain implements Serializable{
  
  @NotNull
  private String name;
  private String description;
  private String purpose;
  @Column(name = "active_principle")
  private String activePrinciple;
  @Column(name = "therapeutic_class")
  private String therapeuticClass;
  @Column(name = "ean_code")
  private String eanCode;
  @Column(name = "ms_code")
  private String msCode;
  @Column(name = "avisa_warning")
  private String anvisaWarning;
  @Column(name = "lab_name")
  private String labName;
  @Column(name = "lab_phone")
  private String labPhone;
  
  @NotNull
  private String contraindication;
  
  public Medicine() {
  }
  }
  </code></pre>
  
  <p>//--</p>
  
  <pre><code>@NoRepositoryBean
  public interface BaseRepository&lt;T,ID extends Serializable&gt;
  extends Repository&lt;T,ID&gt; {
  
  List&lt;T&gt; findAll();
  
  long count();
  
  void delete(ID id);
  
  T save(T s);
  
  T findOne(ID id);
  
  boolean exists(ID id);
  
  void delete(T deleted);
  
  }
  </code></pre>
  
  <p>//--</p>
  
  <pre><code>@Repository
  public interface MedicineRepository 
  extends BaseRepository&lt;Medicine,    Integer&gt;{
  
  }
  </code></pre>
  
  <p>I got 500 status error and my tocatlog shows the following message:</p>
  
  <blockquote>
    <p>SEVERE: Servlet.service() for servlet [TavalendoDispatcherServlet] in context with path [/tavalendo] threw exception [Request processing failed; nested exception is org.springframework.beans.NotReadablePropertyException: Invalid property 'id' of bean class [java.util.LinkedHashMap]: Could not find field for property during fallback access!] with root cause
    org.springframework.beans.NotReadablePropertyException: Invalid property 'id' of bean class [java.util.LinkedHashMap]: Could not find field for property during fallback access!
        at org.springframework.data.util.DirectFieldAccessFallbackBeanWrapper.getPropertyValue(DirectFieldAccessFallbackBeanWrapper.java:56)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:745)</p>
  </blockquote>
  
  <p>Does anyone can explain what happend?</p>