-->
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.  [ 12 posts ] 
Author Message
 Post subject: Bug introduced in 2.1.2 ?
PostPosted: Mon Feb 09, 2004 4:00 am 
Senior
Senior

Joined: Tue Oct 21, 2003 8:15 am
Posts: 186
I just installed 2.1.2 and ran my junit tests. One test failed:

"SybSQLException: Select expression results in more than one column having same name. Column name 'name17_' is specified more than once"

Ideas?


Top
 Profile  
 
 Post subject: URGENT
PostPosted: Mon Feb 09, 2004 7:29 am 
Senior
Senior

Joined: Tue Oct 21, 2003 8:15 am
Posts: 186
Setting max fetch depth to 0 helped, but then the performance dropped to zero :-(

This is a serious bug!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 09, 2004 2:40 pm 
Senior
Senior

Joined: Tue Oct 21, 2003 8:15 am
Posts: 186
Can anyone confirm whether or not this is a 2.1.2 bug? I'm evaluating whether or not to go back to beta 6 (but then my boss will kill me as running betas in production is a no-no at our shop)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 09, 2004 5:34 pm 
Pro
Pro

Joined: Mon Sep 08, 2003 4:30 pm
Posts: 203
nickvajberg wrote:
Can anyone confirm whether or not this is a 2.1.2 bug? I'm evaluating whether or not to go back to beta 6 (but then my boss will kill me as running betas in production is a no-no at our shop)


I can confirm that I _don't_ have any problems after migrating to 2.1.2

And using 200+ tables.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 09, 2004 6:11 pm 
Senior
Senior

Joined: Tue Oct 21, 2003 8:15 am
Posts: 186
Not quite what I asked for dia100, now was it?

Anyone from the Hibernate team? I have to use max fetch size = 0 to make my app work = no good.

Please help.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 09, 2004 6:30 pm 
Pro
Pro

Joined: Mon Sep 08, 2003 4:30 pm
Posts: 203
nickvajberg wrote:
Not quite what I asked for dia100, now was it?

Anyone from the Hibernate team? I have to use max fetch size = 0 to make my app work = no good.

Please help.


OK, so I also played with fetch size parameter and it still works :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 09, 2004 6:43 pm 
Expert
Expert

Joined: Thu Jan 08, 2004 6:17 pm
Posts: 278
Nick, if you want quicker attention, you should include:

- the Hibernate debug logging before the error (including the generated SQL)
- the Hibernate code you were executing at the time (your complete test case?!)
- any applicable mapping files
- the Hibernate configuration

Otherwise you are not really giving much information to debug with.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 10, 2004 3:45 am 
Senior
Senior

Joined: Tue Oct 21, 2003 8:15 am
Posts: 186
I've been trying to reproduce the error on a smaller system, without success.

My app is to big to post here...

I think the core hibernate team should be able to spot the reason pretty quick.

This worked in beta 6, not in 2.1.2.


Top
 Profile  
 
 Post subject: Bug confirmation
PostPosted: Thu Mar 04, 2004 12:47 pm 
Newbie

Joined: Thu Mar 04, 2004 12:17 pm
Posts: 1
I can confirm this problem;

The mapping

<class name="GroupMembers" table="GroupMembers">
<composite-id>
<key-property name="keyGroupID" column="groupID" type="int"/>
<key-property name="keyMID" column="MID" type="int"/>
</composite-id>
<property name="linkType" column="linkType" type="string"/>
<!-- a few more properties -->
<property name="comments" column="comments" type="string"/>
<many-to-one name="Groups" class="Groups" column="groupID" insert="false" update="false"/>
<many-to-one name="MedicalRecord" class="MedicalRecord" column="MID" insert="false" update="false"/>
</class>

The generated SQL

HQL: from GroupMembers

SQL: select groupmembe0_.groupID as groupID, groupmembe0_.MID as MID, groupmembe0_.linkType as linkType, groupmembe0_.reviewSts as reviewSts, groupmembe0_.masterFlag as masterFlag, groupmembe0_.adtFlag as adtFlag, groupmembe0_.userName as userName, roupmembe0_.lastUpdate as lastUpdate, groupmembe0_.comments as comments, groupmembe0_.groupID as groupID, groupmembe0_.MID as MID from GroupMembers groupmembe0_

net.sf.hibernate.SQL (BatcherImpl.java:237) : - select groupmembe0_.groupID as groupID, groupmembe0_.MID as MID,
groupmembe0_.linkType as linkType, groupmembe0_.reviewSts as reviewSts,groupmembe0_.masterFlag as masterFlag, groupmembe0_.adtFlag as adtFlag, groupmembe0_.userName as userName, groupmembe0_.lastUpdate as lastUpdate, groupmembe0_.comments as comments, groupmembe0_.groupID as groupID, groupmembe0_.MID as MID from GroupMembers groupmembe0_

The Exception.
net.sf.hibernate.impl.BatcherImpl (BatcherImpl.java:241) : - preparing statement
net.sf.hibernate.util.JDBCExceptionReporter (JDBCExceptionReporter.java:36) : - SQL Exception com.sybase.jdbc2.jdbc.SybSQLException: Select expression results in more than one column having same name. Column name 'groupID' is specified
more than once
at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2708) ......


I have also tried changing the
<key-property name="somethingElse" to avoid this column name collision, but the SQL generator doesn't seem to reflect the name changes. It is determined to keep using the column="groupID" instead of name="keyGroupID"
So the the generated SQL is of the format
"select column as column"
instead of "select column as name"

This is also causing the SQL to incorrect for the <many-to-one>


I hope that help, I need a fix for this; For the time being I've removed the <many-to-one> relations.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 04, 2004 3:04 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
There is an existing issue in JIRA referring to this Sybase-only problem


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 01, 2004 9:26 am 
Newbie

Joined: Wed Sep 01, 2004 9:04 am
Posts: 18
Location: Enschede, Netherlands
Hi,

we have just started a developing a new front-end on an existing Sybase database. At the moment, we're running into the same problem as described above. Is there any indication when the bug described above will be solved?

Thanx in advance!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 01, 2004 9:11 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
fixed in CVS


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