-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Query Works outside JBoss 3.2.6, but not inside.
PostPosted: Tue Apr 12, 2005 5:53 pm 
Newbie

Joined: Tue Mar 01, 2005 4:13 pm
Posts: 7
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.