-->
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.  [ 2 posts ] 
Author Message
 Post subject: HibernateException - not too sure what is causing it
PostPosted: Wed Jul 06, 2005 12:50 pm 
Newbie

Joined: Wed Jul 06, 2005 12:39 pm
Posts: 8
Location: UK
Hibernate version: 3.0.5

MySQL 4.x

Tomcat 5.x

I have migrated from Hiberate 2.8 following the guide on the hiberate website.

Everything has gone well apart from the HibernateException.

"Errors in named queries "auditForNavTarget""

The exception which appeared in my tomcat log was todo with the following query.

<query name="auditForNavTarget"><![CDATA[
from com.alito.model.system.AuditRecord as record where record.target.class = ? and record.target.id = ?
]]></query>

I am unsure what is causing this.

If i change the query to (note the underscores i.e. record_target_class )

<query name="auditForNavTarget"><![CDATA[
from AuditRecord as record where record_target_class = ? and record_target_id = ?
]]></query>

Now the exception has gone away and my application works....

Is this a bug? I am not too sure myself but the underscores seem to fix my problem.

could someone help me see what the problem is cheers Gareth


Top
 Profile  
 
 Post subject: Futher info
PostPosted: Wed Jul 06, 2005 1:21 pm 
Newbie

Joined: Wed Jul 06, 2005 12:39 pm
Posts: 8
Location: UK
The problem happens when spring is trying to instatiate the session factory. The version of Spring i am using is the latest version and the version of xdoclet that I use to generate the hbm files is the latest version that supports hibernate 3.0 DTD.

Just thought I would add this as further information.


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

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.