この会話は、活動がないためロックされています。新しい投稿を作成してください。
この会話は、活動がないためロックされています。新しい投稿を作成してください。
Hello all
Any help appreciated. The below query runs without issue on 6.1, but throws javax.jcr.query.InvalidQueryException: java.text.ParseException on 6.3.
The cause could not be missing content could it?
Has there been a breaking change in the query builder implementation?
(/jcr:root/content/suninternational//element(*, cq:Page)[(jcr:content/@cq:template = '/apps/suninternational/templates/specialOffersPage') and ((jcr:content/@startDate >= xs:dateTime('2017-10-05T00:00:00.000+02:00')))] | /jcr:root/content/suninternational//element(*, cq:Page)[(jcr:content/@cq:template = '/apps/suninternational/templates/specialOffersPage') and ((jcr:content/@startDate < xs:dateTime('2017-10-05T00:00:00.000+02:00')) and (jcr:content/@endDate >= xs:dateTime('2017-10-05T00:00:00.000+02:00')))] | /jcr:root/content/suninternational//element(*, cq:Page)[(jcr:content/@cq:template = '/apps/suninternational/templates/eventPage') and ((jcr:content/@startDate >= xs:dateTime('2017-10-05T00:00:00.000+02:00')))] | /jcr:root/content/suninternational//element(*, cq:Page)[(jcr:content/@cq:template = '/apps/suninternational/templates/eventPage') and ((jcr:content/@startDate < xs:dateTime('2017-10-05T00:00:00.000+02:00')) and (jcr:content/@endDate >= xs:dateTime('2017-10-05T00:00:00.000+02:00')))] | /jcr:root/content/suninternational//element(*, cq:Page)[(jcr:content/@cq:template = '/apps/suninternational/templates/promotionPage') and ((jcr:content/@startDate >= xs:dateTime('2017-10-05T00:00:00.000+02:00')))] | /jcr:root/content/suninternational//element(*, cq:Page)[(jcr:content/@cq:template = '/apps/suninternational/templates/promotionPage') and ((jcr:content/@startDate < xs:dateTime('2017-10-05T00:00:00.000+02:00')) and (jcr:content/@endDate >= xs:dateTime('2017-10-05T00:00:00.000+02:00')))]) order by jcr:content/@startDate converted to SQL-2 Query: select [jcr:path], [jcr:score], * from [cq:Page] as a where [jcr:content/cq:template] = '/apps/suninternational/templates/specialOffersPage' and [jcr:content/startDate] >= cast('2017-10-05T00:00:00.000+02:00' as date) and isdescendantnode(a, '/content/suninternational') /* xpath: /jcr:root/content/suninternational//element(*, cq:Page)[(jcr:content/@cq:template = '/apps/suninternational/templates/specialOffersPage') and ((jcr:content/@startDate >= xs:dateTime('2017-10-05T00:00:00.000+02:00')))] order by jcr:content/@startDate */ union select [jcr:path], [jcr:score], * from [cq:Page] as a where [jcr:content/cq:template] = '/apps/suninternational/templates/specialOffersPage' and [jcr:content/startDate] < cast('2017-10-05T00:00:00.000+02:00' as date) and [jcr:content/endDate] >= cast('2017-10-05T00:00:00.000+02:00' as date) and isdescendantnode(a, '/content/suninternational') /* xpath: /jcr:root/content/suninternational//element(*, cq:Page)[(jcr:content/@cq:template = '/apps/suninternational/templates/specialOffersPage') and ((jcr:content/@startDate < xs:dateTime('2017-10-05T00:00:00.000+02:00')) and (jcr:content/@endDate >= xs:dateTime('2017-10-05T00:00:00.000+02:00')))] order by jcr:content/@startDate */ order by [jcr:content/startDate] union(*)select [jcr:path], [jcr:score], * from [cq:Page] as a where [jcr:content/cq:template] = '/apps/suninternational/templates/eventPage' and [jcr:content/startDate] >= cast('2017-10-05T00:00:00.000+02:00' as date) and isdescendantnode(a, '/content/suninternational') /* xpath: /jcr:root/content/suninternational//element(*, cq:Page)[(jcr:content/@cq:template = '/apps/suninternational/templates/eventPage') and ((jcr:content/@startDate >= xs:dateTime('2017-10-05T00:00:00.000+02:00')))] order by jcr:content/@startDate */ order by [jcr:content/startDate] union select [jcr:path], [jcr:score], * from [cq:Page] as a where [jcr:content/cq:template] = '/apps/suninternational/templates/eventPage' and [jcr:content/startDate] < cast('2017-10-05T00:00:00.000+02:00' as date) and [jcr:content/endDate] >= cast('2017-10-05T00:00:00.000+02:00' as date) and isdescendantnode(a, '/content/suninternational') /* xpath: /jcr:root/content/suninternational//element(*, cq:Page)[(jcr:content/@cq:template = '/apps/suninternational/templates/eventPage') and ((jcr:content/@startDate < xs:dateTime('2017-10-05T00:00:00.000+02:00')) and (jcr:content/@endDate >= xs:dateTime('2017-10-05T00:00:00.000+02:00')))] order by jcr:content/@startDate */ order by [jcr:content/startDate] union select [jcr:path], [jcr:score], * from [cq:Page] as a where [jcr:content/cq:template] = '/apps/suninternational/templates/promotionPage' and [jcr:content/startDate] >= cast('2017-10-05T00:00:00.000+02:00' as date) and isdescendantnode(a, '/content/suninternational') /* xpath: /jcr:root/content/suninternational//element(*, cq:Page)[(jcr:content/@cq:template = '/apps/suninternational/templates/promotionPage') and ((jcr:content/@startDate >= xs:dateTime('2017-10-05T00:00:00.000+02:00')))] order by jcr:content/@startDate */ order by [jcr:content/startDate] union select [jcr:path], [jcr:score], * from [cq:Page] as a where [jcr:content/cq:template] = '/apps/suninternational/templates/promotionPage' and [jcr:content/startDate] < cast('2017-10-05T00:00:00.000+02:00' as date) and [jcr:content/endDate] >= cast('2017-10-05T00:00:00.000+02:00' as date) and isdescendantnode(a, '/content/suninternational') /* xpath: /jcr:root/content/suninternational//element(*, cq:Page)[(jcr:content/@cq:template = '/apps/suninternational/templates/promotionPage') and ((jcr:content/@startDate < xs:dateTime('2017-10-05T00:00:00.000+02:00')) and (jcr:content/@endDate >= xs:dateTime('2017-10-05T00:00:00.000+02:00')))] order by jcr:content/@startDate */ order by [jcr:content/startDate]
Thanks
解決済! 解決策の投稿を見る。
Hi all
Installing the Cumulative Fix Pack 6.3.0.2 resolved this issues. Without changing the query the problem was resolved.
Thanks
The docs state that XPath is still valid - Query Builder API
Try shortening the xpath query and see if a basic one works.
表示
返信
いいね!の合計
I think issue is query is simply too long
表示
返信
いいね!の合計
Agree with scott. Can you first make sure if xpath query (more simple one) is working in 6.3 . Once that is sure, just do a trial and error by splitting your query into smaller ones and try one after the other (These are all for debugging and concluding that xpath is working and will fetch the results for your content).
Once the above is made sure working, as scott mentioned check if the very long query is causing a prob or not ?
表示
返信
いいね!の合計
Some of the syntaxes could have been changed. I would recommend to break this query to smaller chunks and execute them to identify which is the syntax that has broken in the newer version.
Once we identify that, then we should be able to see how to handle the same in 6.3
表示
返信
いいね!の合計
Hi all
Installing the Cumulative Fix Pack 6.3.0.2 resolved this issues. Without changing the query the problem was resolved.
Thanks