The Hibernate code is deployed as a SAR.
The code works fine outside the JBoss container. But, I get a hibernate
QueryException when the code executes from within the JBoss
container.
JDK-1.4.2_03
JBoss 3.2.6
Hibernate Version : 2.1.8
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Query qry = session.createQuery("select menuItems from MyMenuItem as menuItems where menuItems.menuCategory=:menuCategory"); qry.setString("menuCategory","metalicPaint"); qry.list();
Full stack trace of any exception that occurs: net.sf.hibernate.QueryException: unexpected token: as [select menuItems from MyMenuItem as menuItems where menuItems.menuCategory=:menuCategory]
Name and version of the database you are using: MySQL 4.1.8
The generated SQL (show_sql=true): show_sql=true
Debug level Hibernate log excerpt: 2005-04-12 15:43:32,438 DEBUG [net.sf.hibernate.engine.QueryParameters] named parameters: {menuCategory=metalicPaint}
Thanks in advance.
|