Question : Invalid sql error in Hibernate

 My Named query -->            <sql-query name="validateAccount">
                                                     FROM  Acct a WHERE  a.acct_Nbr= :acctnum
                                                </sql-query>

Output
FROM
    Acct a
WHERE
    a.acct_Nbr= ?
2203 [main] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 900, SQLState: 42000
2203 [main] ERROR org.hibernate.util.JDBCExceptionReporter - ORA-00900: invalid SQL statement

Answer : Invalid sql error in Hibernate

I changed <sql-query...> to <query...> for it to be HQL, not SQL query.
Random Solutions  
 
programming4us programming4us