-->
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.  [ 5 posts ] 
Author Message
 Post subject: Stuck with following error...
PostPosted: Sat Nov 29, 2003 5:18 pm 
Newbie

Joined: Thu Oct 23, 2003 11:08 am
Posts: 10
Hello,

I upgraded my HypersonicSQL 1.7.1 to 1.7.2_Alpha_T because
this version allows the usage of BIGINT identity columns.

However...I can run inserts and selects with my little app but
doing one query I get following exception.

I have no idea what is going wrong...some issue with the 'dialect'?
Can someone interpret Error: -16 or SQLState: 37000, respectively?

Thanks for any kind of help or suggestion!
mac


    22:02:30,733 WARN net.sf.hibernate.util.JDBCExceptionReporter:38 - SQL Error: -16, SQLState: 37000
    22:02:30,733 ERROR net.sf.hibernate.util.JDBCExceptionReporter:46 - Wrong data type: TOP m in statement [select top ? messager0_.messageId as messageId, messager0_.tstamp as tstamp, messager0_.destinationId as destinat3_, messager0_.languageId as languageId, messager0_.projectStatusId as projectS5_, messager0_.reviewerId as reviewerId, messager0_.reviewerStatusId as reviewer7_, messager0_.sourceURI as sourceURI, messager0_.text as text from t_Message messager0_ where (destinationId in(? , ? , ? , ? , ?))and(languageId in(? , ? , ? , ?))and(reviewerStatusId=0 ) order by tstamp asc]
    22:02:30,733 ERROR net.sf.hibernate.util.JDBCExceptionReporter:38 - Could not execute query
    java.sql.SQLException: Wrong data type: TOP m in statement [select top ? messager0_.messageId as messageId, messager0_.tstamp as tstamp, messager0_.destinationId as destinat3_, messager0_.languageId as languageId, messager0_.projectStatusId as projectS5_, messager0_.reviewerId as reviewerId, messager0_.reviewerStatusId as reviewer7_, messager0_.sourceURI as sourceURI, messager0_.text as text from t_Message messager0_ where (destinationId in(? , ? , ? , ? , ?))and(languageId in(? , ? , ? , ?))and(reviewerStatusId=0 ) order by tstamp asc]


Top
 Profile  
 
 Post subject: Error due to setMaxResults...
PostPosted: Sat Nov 29, 2003 6:18 pm 
Newbie

Joined: Thu Oct 23, 2003 11:08 am
Posts: 10
Hi, myself again...

Taking a closer look, I found the bug, I think.

As stated in the log, the TOP value is not set! Although I have
specified in the code setMaxResults, it seems, that Hibernate
does not put the value into the SQL statement!
(By the way, If i omit the setMaxResults, it works ;-) )


Can somebody confirm me that this is really a Hibernate bug
or am I missing here something?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 29, 2003 9:36 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
All is working just fine for me with 2.1rc1 and the version of HSQL that is in our CVS.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 29, 2003 10:03 pm 
Newbie

Joined: Thu Oct 23, 2003 11:08 am
Posts: 10
Weird....I now migrated back to 2.1beta4 and there its running!
(at least for me ;-) )

If I look to the CVS marks, this was also the version from where
on some changes were made related to SELECT TOP.

However, I have not looked into the source. Maybe tomorrow...


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 29, 2003 10:18 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Try the version of HSQL from our CVS. IIRC, there are bugs in the latest HSQL release.


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