org.hibernate.HibernateException: Errors in named queries: FileVersionStatusByMeterid
<p>I am getting exception <code>java.lang.Exception: Named query not known: FileVersionStatusByMeterid; nested exception is org.hibernate.MappingException: Named query not known: FileVersionStatusByMeterid</code></p>

<p>My config file is:</p>

<pre><code> &lt;bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"&gt;
    &lt;property name="configLocation"&gt;
        &lt;value&gt;classpath:hibernate.cfg.xml&lt;/value&gt;
    &lt;/property&gt;
    &lt;property name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration"/&gt;
    &lt;property name="dataSource" ref="poolDataSource"/&gt;
    &lt;property name="hibernateProperties"&gt;
        &lt;props&gt;
            &lt;prop key="hibernate.dialect"&gt;org.hibernate.dialect.SQLServerDialect&lt;/prop&gt;
            &lt;prop key="hibernate.show_sql"&gt;true&lt;/prop&gt;                
            &lt;prop key="hibernate.cache.use_query_cache"&gt;false&lt;/prop&gt;
            &lt;prop key="hibernate.cache.use_second_level_cache"&gt;false&lt;/prop&gt;
            &lt;prop key="hibernate.generate_statistics"&gt;true&lt;/prop&gt;
        &lt;/props&gt;
    &lt;/property&gt;
&lt;/bean&gt;
</code></pre>

<p>and my properties class has defenetions for named queries</p>

<pre><code> public static final String FileVersionStatusByMeterid_Name = "FileVersionStatusByMeterid";
public static final String FileVersionStatusByMeterid_Query = "from ACSRateFileVersionStatus where MeterID =:meterID and FileType= :fileType";
</code></pre>

<p>and my bean class is</p>

<pre><code>import com.duncansolutions.databus.external.constant.NamedQueryStatements;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

@Entity
@Table(name = "ACS_Rate_File_Version_Status")
@NamedQueries({
@NamedQuery(name = NamedQueryStatements.FileVersionStatusByMeterid_Name,  query  =NamedQueryStatements.FileVersionStatusByMeterid_Query)})
public class ACSRateFileVersionStatus implements java.io.Serializable {
</code></pre>

<p>Can any one tell me where am I going wrong here to avoid the exception?</p>
