-->
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.  [ 14 posts ] 
Author Message
 Post subject: HQL Editor and max results
PostPosted: Sat Apr 14, 2007 3:06 am 
Beginner
Beginner

Joined: Tue Mar 13, 2007 9:46 am
Posts: 20
I have been using the HQL editor and it works great! The only problem I have is when I try to set the max results drop down to something else than blank. When running a query with e.g. the value 10 in the max results drop down, the Oracle driver returns an error.

The error is unfortunately in Norwegian, so I won't quote it here, but it says something generic about the IN and OUT parameters.

Any experiences with this?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 15, 2007 1:03 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
show the full stacktrace - i can read norwegian.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 16, 2007 1:14 am 
Beginner
Beginner

Joined: Tue Mar 13, 2007 9:46 am
Posts: 20
This is the stacktrace from the console in Eclipse:

Code:
2007-04-16 07:07:31,620 ERROR main org.hibernate.hql.PARSER - line 2:1: expecting IDENT, found 'null'
2007-04-16 07:07:31,698 WARN main org.hibernate.hql.ast.HqlParser - processEqualityExpression() : No expression to process!
2007-04-16 07:07:32,559 ERROR main org.hibernate.hql.PARSER - <AST>:1:68: unexpected AST node: .
2007-04-16 07:07:34,062 ERROR main org.hibernate.hql.PARSER - <AST>:1:68: unexpected AST node: .
2007-04-16 07:07:37,583 ERROR main org.hibernate.hql.PARSER - <AST>:1:68: unexpected AST node: .
2007-04-16 07:08:10,062 WARN main org.hibernate.util.JDBCExceptionReporter - SQL Error: 17041, SQLState: null
2007-04-16 07:08:10,062 ERROR main org.hibernate.util.JDBCExceptionReporter - Manglende IN- eller OUT-parameter i indeks:: 1


It might seem that Oracle expects some parameters that are not fed to it.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 16, 2007 2:42 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
looks like no query was even found.....could you show some more of that log ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 16, 2007 2:49 am 
Beginner
Beginner

Joined: Tue Mar 13, 2007 9:46 am
Posts: 20
More trace:

Code:
!SUBENTRY 2 org.hibernate.eclipse.console 4 150 2007-04-13 22:58:28.527
!MESSAGE java.sql.SQLException: Manglende IN- eller OUT-parameter i indeks:: 1
!STACK 0
java.sql.SQLException: Manglende IN- eller OUT-parameter i indeks:: 1
   at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
   at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
   at oracle.jdbc.driver.OracleStatement.checkBindsInAndOut(OracleStatement.java:2000)
   at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2924)
   at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:658)
   at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:584)
   at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
   at org.hibernate.loader.Loader.getResultSet(Loader.java:1724)
   at org.hibernate.loader.Loader.doQuery(Loader.java:662)
   at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
   at org.hibernate.loader.Loader.doList(Loader.java:2157)
   at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2041)
   at org.hibernate.loader.Loader.list(Loader.java:2036)
   at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:388)
   at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
   at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
   at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
   at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
   at org.hibernate.console.HQLQueryPage.getList(HQLQueryPage.java:49)
   at org.hibernate.eclipse.console.views.QueryPageViewer$ContentProviderImpl.getElements(QueryPageViewer.java:110)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 16, 2007 2:52 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
would be good with more from the error log from before those lines. should show the actual sql being executed

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 16, 2007 2:54 am 
Beginner
Beginner

Joined: Tue Mar 13, 2007 9:46 am
Posts: 20
This is the complete stacktrace from the Eclipse log. No SQL here:

Code:
Removed


Last edited by steinrr on Thu Apr 26, 2007 5:40 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 16, 2007 3:15 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
hmmm...what about the console log you posted from initially ? does it only contain those 6-7 lines ?

if yes, then please locate the hibernate-log4j.properties in plugins/org.hibernate.eclipse/ and turn up the log level to get some more ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 16, 2007 4:16 am 
Beginner
Beginner

Joined: Tue Mar 13, 2007 9:46 am
Posts: 20
Here you go:

Code:
Removed


Last edited by steinrr on Thu Apr 26, 2007 5:39 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 16, 2007 4:22 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
thanks - now i know where to look.

surprised that oracle fails on this since hsqldb and mysql works fine. Guess i'll need to investigate directly on oracle db now.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 16, 2007 4:24 am 
Beginner
Beginner

Joined: Tue Mar 13, 2007 9:46 am
Posts: 20
Hi!

Ok - thx. Is it correct to assume that no value is provided for the rownum-parameter?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 16, 2007 5:10 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
well that is how it looks like, but the logic in the code is to only start doing "select * (original query)" if we actually call the setMaxResults....so something is weird ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 26, 2007 5:41 am 
Beginner
Beginner

Joined: Tue Mar 13, 2007 9:46 am
Posts: 20
Anything new on this?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 26, 2007 6:05 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
i have not had time to look into it and now you have removed the stacktraces so i can't recall where the error was.

Could you please put it in jira so i/we won't forget it ?

_________________
Max
Don't forget to rate


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