title: "java.lang.IllegalArgumentException: Parameter with that position [1] did not exist" When I use spring-data-jpa
body: <p>I am using <strong>spring-data-jpa</strong>+<strong>hibernate</strong>.
  1.I run into below exception
  ......</p>
  
  <pre><code>Caused by: java.lang.IllegalArgumentException: Parameter with that position [1] did not exist
      at org.hibernate.jpa.spi.BaseQueryImpl.findParameterRegistration(BaseQueryImpl.java:518) ~[BaseQueryImpl.class:4.3.7.Final]
      at org.hibernate.jpa.spi.BaseQueryImpl.setParameter(BaseQueryImpl.java:674) ~[BaseQueryImpl.class:4.3.7.Final]
      at org.hibernate.jpa.spi.AbstractQueryImpl.setParameter(AbstractQueryImpl.java:198) ~[AbstractQueryImpl.class:4.3.7.Final]
      at org.hibernate.jpa.spi.AbstractQueryImpl.setParameter(AbstractQueryImpl.java:49) ~[AbstractQueryImpl.class:4.3.7.Final]
      at org.springframework.data.jpa.repository.query.ParameterBinder.bind(ParameterBinder.java:165) ~[ParameterBinder.class:?]
      at org.springframework.data.jpa.repository.query.StringQueryParameterBinder.bind(StringQueryParameterBinder.java:66) ~[StringQueryParameterBinder.class:?]
  </code></pre>
  
  <p>......</p>
  
  <ol start="2">
  <li><p>I believe the exception comes from </p>
  
  <pre><code>public interface FamousExperienceDao extends PagingAndSortingRepository&lt;FamousExperience,
    Long&gt;,JpaSpecificationExecutor&lt;FamousExperience&gt;
  {
      @Query( value = 
          "select new com.tujia.community.entity.BriefInfomation(f.id,f.title,f.summary,f.thumbnail,f.author, f.issueDate, f.counter) from FamousExperience f"
          ,countQuery ="select count(f.id) from FamousExperience f")
      public Page&lt;BriefInfomation&gt; findExps(Specification&lt;FamousExperience&gt; spec, Pageable pgbl);
  }
  </code></pre></li>
  </ol>
  
  <p>because after I get rid of Specification spec from params of function findExps, it works well, I just want to add specification for the query.</p>
  
  <p>BYW, class FamousExperience extends BriefInfomation. I used "constructor expressions" feature of JPA Query and I just don't need property "content" when I try to query.</p>
  
  <pre><code>@Entity
  @Table(name = "famous_experience")
  public class FamousExperience extends BriefInfomation
      {
      private String content;
  
      /**
       * @return the content
       */
      public String getContent()
      {
          return content;
      }
  
      /**
       * @param content the content to set
       */
      public void setContent(String content)
      {
          this.content = content;
      }
  }
  </code></pre>
  
  <p>Pls help me!</p>