title: nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet ,Spring4,Hibernate4.please help me out
body: <p>1.root cause </p>
  
  <blockquote>
    <p>Apr 23, 2015 2:29:04 PM org.apache.catalina.core.StandardWrapperValve
    invoke SEVERE: Servlet.service() for servlet [appServlet] in context
    with path [/bse] threw exception [Request processing failed; nested
    exception is org.hibernate.exception.SQLGrammarException: could not
    extract ResultSet] with root cause
    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table
    'bsedb.client' doesn't exist  at
    sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
    Source)   at
    sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
    Source)   at java.lang.reflect.Constructor.newInstance(Unknown Source)
      at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)     at
    com.mysql.jdbc.Util.getInstance(Util.java:384)    at
    com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)    at
    com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232)    at
    com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164)    at
    com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2615)     at
    com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2776)  at
    com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2838)   at
    com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2082)
      at
    com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2212)
      at
    org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:82)
      at
    org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:82)
      at
    org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:80)
      at org.hibernate.loader.Loader.getResultSet(Loader.java:2065)   at
    org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1862)
      at
    org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1838)
      at org.hibernate.loader.Loader.doQuery(Loader.java:909)     at
    org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:354)
      at org.hibernate.loader.Loader.doList(Loader.java:2553)     at
    org.hibernate.loader.Loader.doList(Loader.java:2539)  at
    org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2369)    at
    org.hibernate.loader.Loader.list(Loader.java:2364)</p>
  </blockquote>
  
  <p>2.DaoImplation</p>
  
  <pre><code>@SuppressWarnings("unchecked")
  @Transactional
  @Override
  
  public List&lt;Client&gt; getClientList(String searchWord) 
  {
  
   String sql="select * from client c join clientcategory cc on c.id=cc.client_id where match(cc.clientkeyword) against(':searchKey' in boolean mode)";
  
  
       SQLQuery query = (SQLQuery) getCurrentSession().createSQLQuery(sql)
          .addEntity(Client.class)
          .setParameter("searchKey", searchWord);
  
          List result = query.list(); 
  
  
       return result;
  }
  </code></pre>
  
  <p>3.model class</p>
  
  <pre><code>@Entity
  @Table(name="BSE_CLIENT",uniqueConstraints = {
  
      @UniqueConstraint(columnNames = "ID"), 
      @UniqueConstraint(columnNames = "CLIENTEMAIL"), 
      @UniqueConstraint(columnNames = "CLIENTWEBSITE")})
  
  public class Client {
  
  @Id
  @GeneratedValue(strategy = GenerationType.AUTO)
  @Column(name="ID", unique=true, nullable=false)
  @NotNull
  private long clientId;
  
  @Column(name = "CLIENTNAME", nullable = false)
  @NotEmpty @NotNull
  private String clientName;
  
  @Temporal(TemporalType.DATE)
  @Column(name = "CLIENTREGISTRATIONDATE", nullable = false)
  @NotNull
  private Date clientRegDate;
  
  @Column(name = "CLIENTEMAIL", nullable = false)
  @NotEmpty @Email
  private String clientEmail;
  
  @Column(name = "CLIENTWEBSITE", nullable = false)
  private String clientWebsite;
  
  @Column(name = "CLIENTPROFILE", nullable = false)
  private String clientProfile;
  
  @Column(name = "CLIENTAPPROVED", nullable = false)
  @NotNull
  private Boolean clientApproved;
  
  @Temporal(TemporalType.DATE)
  @Column(name = "CLIENTAPPROVEDATE", nullable = false)
  @NotNull
  private Date clientApprovedDate;
  
  @Column(name = "CLIENTPASSWORD",nullable = false)
  @NotNull
  private String  clientPassword;
  
  @Column(name = "CLIENTACTIVATION", nullable = false)
  private String clientActivation;
  
  @Column(name = "ADDRESSLINE1", nullable = false)
  @NotNull
  private String clientAddressLine1;
  
  @Column(name = "ADDRESSLINE2", nullable = false)
  private String clientAddressLine2;
  
  @Column(name = "CLIENTCITY", nullable = false)
  @NotNull
  private String clientCity;
  
  @Column(name = "CLIENTSTATE", nullable = false)
  @NotNull
  private String clientState;
  
  @Column(name = "CLIENTCOUNRTY", nullable = false)
  @NotNull
  private String clientCountry;
  
  @Column(name = "CLIENTPINCODE", nullable = false)
  private String clientPincode;
  
  
  
  @OneToOne(mappedBy = "client")
  private ClientAccount clientAccount;
  
  @OneToMany(mappedBy="client",fetch=FetchType.EAGER)
  @Cascade({CascadeType.ALL})
  private Set&lt;ClientCategory&gt; clientCategory;
  
  @OneToMany(mappedBy="client",fetch=FetchType.EAGER)
  @Cascade({CascadeType.ALL})
  private Set&lt;ClientContact&gt; clientContact;
  
  @OneToMany(mappedBy="client")
  @Cascade({CascadeType.ALL})
  private Set&lt;ClientImage&gt; clientImage;
  
  @OneToMany(mappedBy="client")
  @Cascade({CascadeType.ALL})
  private Set&lt;ClientVideo&gt; clientVideo;
  
  @OneToOne(mappedBy="client")
  private UserClient userclient;
  
  @OneToOne(mappedBy="client")
  private CustomerClientRatings customerclientRatings;
  
  
  public Client(){}
  
  
  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 Date getClientRegDate() {
      return clientRegDate;
  }
  
  
  public void setClientRegDate(Date clientRegDate) {
      this.clientRegDate = clientRegDate;
  }
  
  
  public String getClientEmail() {
      return clientEmail;
  }
  
  
  public void setClientEmail(String clientEmail) {
      this.clientEmail = clientEmail;
  }
  
  
  public String getClientWebsite() {
      return clientWebsite;
  }
  
  
  public void setClientWebsite(String clientWebsite) {
      this.clientWebsite = clientWebsite;
  }
  
  
  public String getClientProfile() {
      return clientProfile;
  }
  
  
  public void setClientProfile(String clientProfile) {
      this.clientProfile = clientProfile;
  }
  
  
  public Boolean getClientApproved() {
      return clientApproved;
  }
  
  
  public void setClientApproved(Boolean clientApproved) {
      this.clientApproved = clientApproved;
  }
  
  
  public Date getClientApprovedDate() {
      return clientApprovedDate;
  }
  
  
  public void setClientApprovedDate(Date clientApprovedDate) {
      this.clientApprovedDate = clientApprovedDate;
  }
  
  
  public String getClientPassword() {
      return clientPassword;
  }
  
  
  public void setClientPassword(String clientPassword) {
      this.clientPassword = clientPassword;
  }
  
  
  public String getClientActivation() {
      return clientActivation;
  }
  
  
  public void setClientActivation(String clientActivation) {
      this.clientActivation = clientActivation;
  }
  
  
  public String getClientAddressLine1() {
      return clientAddressLine1;
  }
  
  
  public void setClientAddressLine1(String clientAddressLine1) {
      this.clientAddressLine1 = clientAddressLine1;
  }
  
  
  public String getClientAddressLine2() {
      return clientAddressLine2;
  }
  
  
  public void setClientAddressLine2(String clientAddressLine2) {
      this.clientAddressLine2 = clientAddressLine2;
  }
  
  
  public String getClientCity() {
      return clientCity;
  }
  
  
  public void setClientCity(String clientCity) {
      this.clientCity = clientCity;
  }
  
  
  public String getClientState() {
      return clientState;
  }
  
  
  public void setClientState(String clientState) {
      this.clientState = clientState;
  }
  
  
  public String getClientCountry() {
      return clientCountry;
  }
  
  
  public void setClientCountry(String clientCountry) {
      this.clientCountry = clientCountry;
  }
  
  
  public String getClientPincode() {
      return clientPincode;
  }
  
  
  public void setClientPincode(String clientPincode) {
      this.clientPincode = clientPincode;
  }
  
  
  public ClientAccount getClientAccount() {
      return clientAccount;
  }
  
  
  public void setClientAccount(ClientAccount clientAccount) {
      this.clientAccount = clientAccount;
  }
  
  
  public Set&lt;ClientCategory&gt; getClientCategory() {
      return clientCategory;
  }
  
  
  public void setClientCategory(Set&lt;ClientCategory&gt; clientCategory) {
      this.clientCategory = clientCategory;
  }
  
  
  public Set&lt;ClientContact&gt; getClientContact() {
      return clientContact;
  }
  
  
  public void setClientContact(Set&lt;ClientContact&gt; clientContact) {
      this.clientContact = clientContact;
  }
  
  
  public Set&lt;ClientImage&gt; getClientImage() {
      return clientImage;
  }
  
  
  public void setClientImage(Set&lt;ClientImage&gt; clientImage) {
      this.clientImage = clientImage;
  }
  
  
  public Set&lt;ClientVideo&gt; getClientVideo() {
      return clientVideo;
  }
  
  
  public void setClientVideo(Set&lt;ClientVideo&gt; clientVideo) {
      this.clientVideo = clientVideo;
  }
  
  
  public UserClient getUserclient() {
      return userclient;
  }
  
  
  public void setUserclient(UserClient userclient) {
      this.userclient = userclient;
  }
  
  
  public CustomerClientRatings getCustomerclientRatings() {
      return customerclientRatings;
  }
  
  
  public void setCustomerclientRatings(CustomerClientRatings customerclientRatings) {
      this.customerclientRatings = customerclientRatings;
  }
  
  }
  </code></pre>
  
  <p>4.</p>
  
  <p>mysql database image
  here in database also 'bsedb.client' is there.</p>
  
  <p><img src="https://i.stack.imgur.com/VzOoK.png" alt="enter image description here"></p>