searchDocument automatically add suffix : "select distinct doc.web,
doc.name from XWikiDocument as doc" to the SQL query. I think you
copied a code that was used with search in place of searchDocument.
obj.className = 'XWiki.ArticleClass' and
doc.author = 'XWiki.GEVERITT'")
#set ($start = 0)
#set ($nb = 50)
#set ($collect = $xwiki.searchDocuments($sql , $nb , $start))
# $collect.size()
#foreach ($item in $collect)
#if ($xwiki.hasAccessLevel("view",
"${context.database}:${item}"))
#set($bentrydoc = $xwiki.getDocument($item))
#set($date = $xwiki.formatDate($bentrydoc.date,"MMMM dd, yyyy HH:mm"))
#<p>$bentrydoc.name $date</p>
#end
#end
I see this exception
Error number 4001 in 4: Error while parsing velocity page COE.Blog_GEVERITT
Wrapped Exception: Invocation of method 'searchDocuments' in class
com.xpn.xwiki.api.XWiki threw exception com.xpn.xwiki.XWikiException: Error
number 3223 in 3: Exception while searching documents with SQL web, doc.name
from XWiki Document as doc , from Base Object as obj where doc.full Name =
obj.name and obj.class Name = 'XWiki.Article Class' and doc.author =
'XWiki.GEVERITT'? Wrapped Exception: unexpected token: from near line 1,
column 81 web, doc.name from com.xpn.xwiki.doc.XWiki Document as doc , from
com.xpn.xwiki.objects.Base Object as obj where doc.full Name = obj.name and
obj.class Name = 'XWiki.Article Class' and doc.author = 'XWiki.GEVERITT'?
@
COE.Blog_GEVERITT4,25?
and then see this which looks like the query that was executed. What looks
odd is that doc.author has the bread crumb trail in it "User Blogs >
Blog_GEVERITT" instead of just "GEVERITT"
select distinct doc.web, doc.name from XWikiDocument as doc , from
BaseObject as obj where doc.fullName = obj.name and obj.className =
'XWiki.ArticleClass' and doc.author = 'XWiki: User Blogs > Blog_GEVERITT
>
GEVERITT'
Any idea what the problem is? Any help or suggestions on debugging it would
be appreciated. I am using XWiki 1.3.2, Oracle 10, Tomcat 5.5
Thanks
Glenn Everitt
--
View this message in context:
http://www.nabble.com/searchDocuments-exception-tp17339532p17339532.html
Sent from the XWiki- Dev mailing list archive at
Nabble.com.
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs