[Building Sakai] SQL error using SiteService method

Lovemore Nalube lovemore.nalube at uct.ac.za
Wed Jul 14 04:01:45 PDT 2010


Hi
 
I am using the siteservice method to search for sakai sites by title, however I get the following SQL error in the log;
 
2010-07-14 12:38:58,771 WARN TP-Processor10 org.sakaiproject.db.impl.BasicSqlService - Sql.dbRead: sql: select SAKAI_SITE.SITE_ID,SAKAI_SITE.TITLE,SAKAI_SITE.TYPE,SAKAI_SITE.SHORT_DESC,SAKAI_SITE.DESCRIPTION,SAKAI_SITE.ICON_URL,SAKAI_SITE.INFO_URL,SAKAI_SITE.SKIN,SAKAI_SITE.PUBLISHED,SAKAI_SITE.JOINABLE,SAKAI_SITE.PUBVIEW,SAKAI_SITE.JOIN_ROLE,SAKAI_SITE.IS_SPECIAL,SAKAI_SITE.IS_USER,SAKAI_SITE.CREATEDBY,SAKAI_SITE.MODIFIEDBY,SAKAI_SITE.CREATEDON,SAKAI_SITE.MODIFIEDON,SAKAI_SITE.CUSTOM_PAGE_ORDERED from SAKAI_SITE where UPPER(SAKAI_SITE.TITLE) like UPPER(?) order by SAKAI_SITE.TITLE,SAKAI_SITE.TITLE limit 101 offset -1 %Learning-Working%
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1' at line 1 
 
 
My code is as follows:
 
Search search = new Search();
search.addRestriction( new Restriction("search", searchString));
search.addOrder(new Order(order));
search.setStart(startResult);
search.setLimit(maxResults);
List<?> searchResults = siteService.getSites(SiteService.SelectionType.ANY, null, searchString, null, SiteService.SortType.NONE, new PagingPosition(startResult, maxResults)); 
 
If I use EntityBroker to do the search I do not get this error, but EntityBroker will call the same method successfully at some point.
 
Any ideas?
 
Thanks
 
 
--
Lovemore Nalube
OLE Developer (Vula)
University of Cape Town
http://www.cet.uct.ac.za/LovemoreN



 

###
UNIVERSITY OF CAPE TOWN 

This e-mail is subject to the UCT ICT policies and e-mail disclaimer published on our website at http://www.uct.ac.za/about/policies/emaildisclaimer/ or obtainable from +27 21 650 4500. This e-mail is intended only for the person(s) to whom it is addressed. If the e-mail has reached you in error, please notify the author. If you are not the intended recipient of the e-mail you may not use, disclose, copy, redirect or print the content. If this e-mail is not related to the business of UCT it is sent by the sender in the sender's individual capacity.

###
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20100714/f0dad932/attachment.html 


More information about the sakai-dev mailing list