-->
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.  [ 4 posts ] 
Author Message
 Post subject: SQLException for invalid column name
PostPosted: Wed Mar 22, 2006 11:15 am 
Beginner
Beginner

Joined: Mon Apr 18, 2005 10:25 am
Posts: 38
Location: Maryland
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
3.1.1

Mapping documents:

Code between sessionFactory.openSession() and session.close():
hibernateUtil.getSessionFactory().getCurrentSession();

Full stack trace of any exception that occurs:
could not execute query [select this_.analystID as anlystID1_1_, this_.userFirstName as userFirs2_1_1, this_.pwdCreationDate as pwdCreat6_1_1_, this_.roleID as roldID1_1_, this.loginAttempts as loginAtt8_1_1_, rolse2_.roleID as roldID32_0_,roles2_.description as descript2_32_0_, roles2_.userRole as userRole32_0_ from analyst this_left outer join roles roles2_ on this_.roleID=roles2_.roleID where this_.sid=?]
java.sql.SQLException:[DataDirect][Sybase JDBC Driver]Invalid column name: roleID32_0_
at com.ddtek.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.ddtek.jdbc.base.BaseExceptions.getException(Unknown Source)
at org.hibernate.type.LongType.get(LongType.java:28)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:113)
etc.

Name and version of the database you are using:
Sybase ASE 12.5.2

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:
error



The db has not changed just our hibernate implementation and driver. We moved to the data direct driver for full container support for Jboss. Why is it having an issue translating the hql (it seems)? Any input here?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 22, 2006 11:26 am 
Newbie

Joined: Tue Mar 21, 2006 1:42 pm
Posts: 14
Out of curiousity, does the same exception occur when using the ClassQueryTranslatorFactory?

_________________
Mike Ringrose


Top
 Profile  
 
 Post subject: QueryTranslatorFactory
PostPosted: Wed Mar 22, 2006 11:31 am 
Beginner
Beginner

Joined: Mon Apr 18, 2005 10:25 am
Posts: 38
Location: Maryland
I don't know as I have not used that class. Can you explain where that would be implemented and I will try it?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 22, 2006 11:35 am 
Newbie

Joined: Tue Mar 21, 2006 1:42 pm
Posts: 14
In your hibernate configuration file, specify the property below:

Code:
<property name="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>

_________________
Mike Ringrose


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.