Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 940685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:59:45+00:00 2026-05-15T21:59:45+00:00

hello i have an error when i execute a request with hibernate ERROR ast.ErrorCounter

  • 0

hello i have an error when i execute a request with hibernate

ERROR ast.ErrorCounter (ErrorCounter.java:33) – line 1:22: expecting IDENT, found ‘*’

my dao:

public List rechercheValeurTarifs() throws Exception {
        List tarifs = null;
        try{

            tarifs = getHibernateTemplate().find("SELECT  FE_TARIF_IDF.* " +
                    "FROM FE_TARIF_IDF " +
                    "WHERE FE_TARIF_IDF.D_ANNEE in (SELECT MAX (FE_EXERCICE_FISCAL.D_CEXER) FROM FE_EXERCICE_FISCAL);");

            if(tarifs == null)
            {
                tarifs = getHibernateTemplate().find("SELECT  FE_TARIF_IDF.* " +
                        "FROM FE_TARIF_IDF " +
                        "WHERE FE_TARIF_IDF.D_ANNEE in (SELECT MAX (FE_EXERCICE_FISCAL.D_CEXER-1) FROM FE_EXERCICE_FISCAL);");
            }
        } catch (Exception e){
        System.out.println(e.getStackTrace());
        }
        return tarifs;
    }

my hbm.xml file:

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="xx.xxx.xxx.persistance.bo" >
    <class name="Tarifs" table="FE_TARIF_IDF" >
            <cache usage="read-write" />
            <composite-id name="idTarif" class="IdTarif">
                <key-property name="annee" type="string" length="4" >
                    <column name="D_ANNE" />
                </key-property>
                <key-property name="zone" type="int" length="1" >
                    <column name="D_NZONE" />
                </key-property>
                <key-property name="typeLocal" type="string" length="1" >
                    <column name="D_CTYPE_LOCAL" />
                </key-property>
            </composite-id>
            <property name="tarifNormal" type="float" column="D_NTARIF_NORMAL" length="7"/>
            <property name="tarifReduit" type="float" column="D_NTARIF_REDUIT" length="7"/>
            <property name="surfaceMin" type="float" column="D_NSURFACEMIN" length="10"/>    
    </class>
</hibernate-mapping>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T21:59:46+00:00Added an answer on May 15, 2026 at 9:59 pm

    try the following in your dao:

    public List rechercheValeurTarifs() throws Exception {
        List tarifs = null;
        try{
    
            tarifs = getHibernateTemplate().find("FROM FE_TARIF_IDF " +
                    "WHERE FE_TARIF_IDF.D_ANNEE in (SELECT MAX (FE_EXERCICE_FISCAL.D_CEXER) FROM FE_EXERCICE_FISCAL);");
    
            if(tarifs == null)
            {
                tarifs = getHibernateTemplate().find("FROM FE_TARIF_IDF " +
                        "WHERE FE_TARIF_IDF.D_ANNEE in (SELECT MAX (FE_EXERCICE_FISCAL.D_CEXER-1) FROM FE_EXERCICE_FISCAL);");
            }
        } catch (Exception e){
        System.out.println(e.getStackTrace());
        }
        return tarifs;
    }
    

    You don’t need the SELECT if you don’t specify fields.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello i have error when i am forwarding page without parameter. that is happen
Hello I have an extended stored procedure that sends an error message. srv_sendmsg(pSrvProc, SRV_MSG_ERROR,
I have two arrays: $array1 = array(1=>1,10=>1,12=>0,13=>13); $array2 = array(1=>Hello,10=>Test,12=>check,13=>error); Here $array1 has keys
Hello I have like this 2 tables class User public int UserId{get;set;} { ....
Hello I have a Java application that takes an input number of operations to
hello i have to execute this command: docRules = DocumentBuilderFactory.newInstance() .newDocumentBuilder().parse( new File(IeplcDeployRules.clx)); When
Hello everyone I have error which breaks up my build for no reason, here
I try to execute simple request to MySql database via jdbcTemplate but I have
Hello i have 2 arrays and and i want to put them in a
Hello I have next function, what always return null as result, but service calling

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.