title: Cannot create TypedQuery for query with more than one return using requested result type
body: <p>I am getting error "Cannot create TypedQuery for query with more than one return using requested result type"
  I tried with all columns value returning. That time the application hangs. I need to get list of Client, in arraylist. Please help, I am new to JPA.</p>
  
  <pre><code>@Override
      public ArrayList&lt;Client&gt; findAllClients() {
          EntityManager entity = this.emf.createEntityManager();
          List&lt;Client&gt; clients = entity.createQuery("select clientID,clientName from Client", Client.class).getResultList();
          return (ArrayList&lt;Client&gt;) clients;
      }
  </code></pre>
  
  <p>Client class is </p>
  
  <pre><code>package com.springmaven.models;
  
  import java.util.Date;
  import java.util.HashSet;
  import java.util.Set;
  
  
  import javax.persistence.CascadeType;
  import javax.persistence.Column;
  import javax.persistence.Entity;
  import javax.persistence.FetchType;
  import javax.persistence.GeneratedValue;
  import javax.persistence.GenerationType;
  import javax.persistence.Id;
  import javax.persistence.OneToMany;
  import javax.persistence.Table;
  
  @Entity
  @Table(name="tblclient")
  public class Client {
      @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name="ntClientID")
      private Long clientId;
  
      @Column(name="vcClientName")
      private String clientName;
  
      @Column(name="vcLocation")
      private String location;
  
      @Column(name="ofstTimeZone")
      private Date timeZone;
  
      @Column(name="vcCommunicationMode")
      private String communicationMode;
  
      @Column(name="vcContact")
      private String contact;
  
      @OneToMany(targetEntity=Project.class,mappedBy="client",
              cascade=CascadeType.ALL,fetch=FetchType.EAGER)
      private Set&lt;Project&gt; projects = new HashSet&lt;Project&gt;();
  
      public Set&lt;Project&gt; getProjects() {
          return projects;
      }
  
      public void setProjects(Set&lt;Project&gt; projects) {
          this.projects = projects;
      }
  
      public Long getClientId() {
          return clientId;
      }
  
      public void setClientId(Long clientId) {
          this.clientId = clientId;
      }
  
      public String getClientName() {
          return clientName;
      }
  
      public void setClientName(String clientName) {
          this.clientName = clientName;
      }
  
      public String getLocation() {
          return location;
      }
  
      public void setLocation(String location) {
          this.location = location;
      }
  
      public Date getTimeZone() {
          return timeZone;
      }
  
      public void setTimeZone(Date timeZone) {
          this.timeZone = timeZone;
      }
  
      public String getCommunicationMode() {
          return communicationMode;
      }
  
      public void setCommunicationMode(String communicationMode) {
          this.communicationMode = communicationMode;
      }
  
      public String getContact() {
          return contact;
      }
  
      public void setContact(String contact) {
          this.contact = contact;
      }
  
      public Client(){
  
      }
  }
  </code></pre>