. The
problem is indeed caused by the distinct restriction. The good news is
that this restriction is not really needed so I opened
and removed it. The problem
should be fixed now on both 2.2 and 2.3 branches. Would be great if you
could test the latest 2.3 or 2.2 XE snapshot (
Hi Marius,
I tried to reproduce this situation with the new installation of the last
version of XE (2.2 stable) + Oracle 10g + Tomcat.
Installation and .xar import were OK – no errors.
Insertion a new link in a page – the same message –“There was an error
loading the data”.
As I understood this message concerns not AllDocs, but the tab “My Recent
Changes”, that comes as first by default while inserting link.
http://n2.nabble.com/file/n4587113/wysiwyg_insert_link_myrecentchanges.jpg
xwiki.log:
2010-02-17 14:10:30,125
[
http://localhost:8080/xwiki/resources/js/xwiki/wysiwyg/xwe/WikiService.gwtr…]
ERROR server.DefaultWikiService - Error number 3223 in 3: Exception
while searching documents with sql select distinct doc from XWikiDocument
doc where 1=1 and doc.author='XWiki.Admin' order by doc.date desc
localhost.log:
Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public
abstract java.util.List
com.xpn.xwiki.wysiwyg.client.WikiService.getRecentlyModifiedPages(int,int)'
threw an unexpected exception: java.lang.RuntimeException: Failed to
retrieve the lists of recently modified pages.
---
However Main.RecentChanges and Panels.MyRecentModifications show the pages
changed by Admin.
---
Marius Dumitru Florea wrote:
Can you try this velocity code in a new page:
{{velocity}}
$xwiki.search("select doc from XWikiDocument doc where
doc.author='XWiki.Admin'").size()
{{/velocity}}
and tell me if the same exception is thrown? And then try:
{{velocity}}
$xwiki.searchDocuments("where doc.author='XWiki.Admin'").size()
{{/velocity}}
Maybe it's a problem with the way Hibernate translates HQL to Oracle's
SQL dialect.
The both queries work fine
---
I think the problem is either in “order by” or in “distinct” (Or in the
combination of both of them…)
I executed the similar query like in xwiki.log (select distinct doc from
XWikiDocument doc where 1=1 and doc.author='XWiki.Admin' order by doc.date
desc) against the xwiki-Oracle db
select distinct doc.XWD_FULLNAME from xwikidoc doc where 1=1 and
doc.XWD_AUTHOR='XWiki.Admin' order by doc.XWD_DATE desc
and got an error ORA-01791: not a SELECTed expression, which means that
"order by"- column should be selected as well (?)
At the same time the query with order by expression but without distinct
works fine... I have only 4 Docs, created by Admin, they are all unique and
can't see any difference in the output with and without distinct...
The next query with subquery works too. - select distinct XWD_FULLNAME from
(select doc.XWD_FULLNAME, doc.XWD_DATE from xwikidoc doc where 1=1 and
doc.XWD_AUTHOR='XWiki.Admin' order by doc.XWD_DATE desc)
---
I tried also
{{velocity}}
$xwiki.search("select doc from XWikiDocument doc where
doc.author='XWiki.Admin' order by doc.date",3,0).size()
{{/velocity}}
- works OK too.
$xwiki.search("select distinct doc from XWikiDocument doc where
doc.author='XWiki.Admin' order by doc.date",2,0)
produces error “Failed to execute macro: velocity”:
org.xwiki.rendering.macro.MacroExecutionException: Failed to evaluate
Velocity Macro for content [ $xwiki.search("select distinct doc from
XWikiDocument doc where doc.author='XWiki.Admin'").size() ]
---
---
Tab “All Pages” - works fine.
---
Switch to tab “Search” – arrears the same message –“There was an error
loading the data” with the ORA-00932 error in the xwiki.log:
2010-02-17 15:36:49,453
[
http://localhost:8080/xwiki/resources/js/xwiki/wysiwyg/xwe/WikiService.gwtr…]
WARN util.JDBCExceptionReporter - SQL Error: 932, SQLState: 42000
2010-02-17 15:36:49,453
[
http://localhost:8080/xwiki/resources/js/xwiki/wysiwyg/xwe/WikiService.gwtr…]
ERROR util.JDBCExceptionReporter - ORA-00932: Inkonsistente Datentypen:
- erwartet, CLOB erhalten
2010-02-17 15:36:49,453
[
http://localhost:8080/xwiki/resources/js/xwiki/wysiwyg/xwe/WikiService.gwtr…]
ERROR server.DefaultWikiService - Error number 3223 in 3: Exception
while searching documents with sql select distinct doc from XWikiDocument as
doc where (lower(doc.title) like '%%' or lower(doc.fullName) like '%%')
Wrapped Exception: could not execute query
I have no clue why it happens, because the query:
select distinct XWD_FULLNAME from xwikidoc doc where (lower(doc.XWD_TITLE)
like '%%' or lower(doc.XWD_FULLNAME) like '%%'); works in Oracle well.
Best Regards,
Alla
http://n2.nabble.com/file/n4587113/localhost.2010-02-17.log
localhost.2010-02-17.log
http://n2.nabble.com/file/n4587113/xwiki.log xwiki.log