-
May 27th, 2012, 02:13 PM
#1
Exception in List (+5th page)
Hi all,
I'm starting a new project in Grails 2.0.3 and my application's list behavior is a quite rare...
From the first to the fifth page the list method works perfectly, but if I click another page (6th for example) I get the following Exception:
ERROR errors.GrailsExceptionResolver - IllegalArgumentException occurred when processing request: [GET] /GESCW/articulo/list - parameters:
max: 10
offset: 50
Stacktrace follows:
Message: null
Line | Method
->> 53 | <init> in grails.orm.PagedResultList
.....
I was debugging my project and this happens in the "this.list=crit.list()" call in the PagedResultList method.
My code is:
Controller (in the list method):
def results = articuloService.listInstance(params)
articuloService:
def listInstance(params){
params.max = Math.min(params.max ? params.int('max') : 10, 100)
def results = Articulo.createCriteria().list(
max: params.max,
offset: params.offset,
sort: params.sort,
order: params.order){}
return results
}
My Database Server is MySql 5.
Thank you very much and sorry for my poor English.
Regards!!
***Edit***
Same result when I try to order by some fields (some not working, others only ASC order, ...)
************ EDIT 2 (FIXED) ***********
I got this Exception because I declared the properties in the domain class as "float" and "int", I've changed it to "Float" and "Integer", in the database there were some rows with Null value in a float column: http://jira.grails.org/browse/GRAILS-646
Thanks anyway and I hope this can help other people who has the same problem!
Last edited by joseluis87; May 27th, 2012 at 05:07 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules