-->
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.  [ 1 post ] 
Author Message
 Post subject: Hibernate exception in query db2 v10
PostPosted: Thu Dec 12, 2013 12:04 am 
Newbie

Joined: Wed Dec 11, 2013 11:46 pm
Posts: 1
Hi all,
I have written below query :
Code:
    String querySQL = "from User o";
    Query query = getSession().createQuery(querySQL);
    query.setFirstResult(0);
    query.setMaxResults(10);
    query.list();
   


My hibernate version is 3.3.2 GA.

When i connect to db2 v9.7 , the query is ok and return correct results.
But , when i changed db2 v10.1, the query is error and throw below exception :

Code:
      WARN (org.hibernate.util.JDBCExceptionReporter:100) - SQL Error: -4700, SQLState: 56038
ERROR (org.hibernate.util.JDBCExceptionReporter:101) - DB2 SQL Error: SQLCODE=-4700, SQLSTATE=56038, SQLERRMC=null, DRIVER=3.64.106
  WARN (org.hibernate.util.JDBCExceptionReporter:100) - SQL Error: -516, SQLState: 26501
ERROR (org.hibernate.util.JDBCExceptionReporter:101) - DB2 SQL Error: SQLCODE=-516, SQLSTATE=26501, SQLERRMC=null, DRIVER=3.64.106
  WARN (org.hibernate.util.JDBCExceptionReporter:100) - SQL Error: -514, SQLState: 26501
ERROR (org.hibernate.util.JDBCExceptionReporter:101) - DB2 SQL Error: SQLCODE=-514, SQLSTATE=26501, SQLERRMC=SQL_CURLH200C1, DRIVER=3.64.106
ERROR (com.dao.parameter.impl.ParameterDaoImpl:61) - dao error:
org.hibernate.exception.GenericJDBCException: could not execute query
   at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
   at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
   at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
   at org.hibernate.loader.Loader.doList(Loader.java:2235)
   at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2129)
   at org.hibernate.loader.Loader.list(Loader.java:2124)
   at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
   at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
   at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
   at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1149)
   at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
   


I don't know why can not query in db2 v10.1, is there anything i missed?

Thanks!


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

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.