[CONJ-317] Maria db j-connector 1.4.5 version throws SQL Exception ( Mysql Version 5.5) Created: 2016-06-27  Updated: 2017-06-15  Resolved: 2017-06-15

Status: Closed
Project: MariaDB Connector/J
Component/s: Other
Affects Version/s: None
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Anshul Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None


 Description   

If I don't set the setMaxResult on query then I get the following exception. Works fine with 1.3.7 version
my code is

TypedQuery<Account> query = em.createNamedQuery("select * from account").setFirstResult(start);
 
if(length > 0)
{
query.setMaxResult(lenght);
}

So if I don't pass length I get this exception. But if I set the length to 5000000000. It works fine.

Exception is

Caused by: org.hibernate.exception.GenericJDBCException: could not execute query
	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47)
	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109)
	at org.hibernate.loader.Loader.doList(Loader.java:2614)
	at org.hibernate.loader.Loader.doList(Loader.java:2594)
	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2423)
	at org.hibernate.loader.Loader.list(Loader.java:2418)
	at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:501)
	at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:371)
	at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:216)
	at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1326)
	at org.hibernate.internal.QueryImpl.list(QueryImpl.java:87)
	at org.hibernate.jpa.internal.QueryImpl.list(QueryImpl.java:606)
	at org.hibernate.jpa.internal.QueryImpl.getResultList(QueryImpl.java:483)
	... 132 more
Caused by: java.sql.SQLException: Invalid operation for result set type TYPE_FORWARD_ONLY
	at org.mariadb.jdbc.internal.queryresults.resultset.MariaSelectResultSet.absolute(MariaSelectResultSet.java:680)
	at org.jboss.jca.adapters.jdbc.WrappedResultSet.absolute(WrappedResultSet.java:163)
	at org.hibernate.loader.Loader.advance(Loader.java:1825)
	at org.hibernate.loader.Loader.getResultSet(Loader.java:2120)
	at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1899)
	at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1875)
	at org.hibernate.loader.Loader.doQuery(Loader.java:919)
	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:336)
	at org.hibernate.loader.Loader.doList(Loader.java:2611)
	... 142 more



 Comments   
Comment by Dipti Joshi (Inactive) [ 2016-06-27 ]

anshulm Are you running these queries against MariaDB ColumnStore ?

Comment by Anshul [ 2016-06-27 ]

Mysql V 5.5

Comment by Dipti Joshi (Inactive) [ 2016-06-28 ]

Ok, then this is not right project - You need to open this against CONJ project. I will move it for now.

Comment by Diego Dupin [ 2016-08-23 ]

_sorry for late answer. _

I've tried to reproduced this without any success.

So can you indicate the following informations :

  • hibernate version
  • driver version
  • configured hibernate dialect
  • can you confirm you use fetch size ( hint like @QueryHint(name="org.hibernate.fetchSize", value="10")
  • any other information you found usefull
Comment by Diego Dupin [ 2017-06-15 ]

closing since no answer

Generated at Thu Feb 08 03:14:47 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.