Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-19280

Error retrieving notifications for unused tag

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 14.0-rc-1, 13.10.3
    • 13.10.1
    • Notifications
    • None
    • Unknown
    • N/A
    • N/A

    Description

      From a wiki with quite a lot of events I found the following exception in the log:

      [notifications job group daemon thread - org.xwiki.rendering.async.internal.AsyncRendererJob@595953ed([notifications, display, 5ALERT__10_null_1234567, locale, de, request.wiki, subwiki, user, null, 123])] ERROR o.x.r.a.i.AsyncRendererJob     - Exception thrown during job execution
      org.xwiki.rendering.RenderingException: Error while retrieving the notification
      	at org.xwiki.notifications.notifiers.internal.DefaultAsyncNotificationRenderer.render(DefaultAsyncNotificationRenderer.java:119)
      	at org.xwiki.rendering.async.internal.AsyncRendererJob.runInternal(AsyncRendererJob.java:109)
      	at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:243)
      	at org.xwiki.job.AbstractJob.run(AbstractJob.java:220)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:829)
      Caused by: org.xwiki.notifications.NotificationException: Fail to get the list of notifications.
      	at org.xwiki.notifications.sources.internal.DefaultParametrizedNotificationManager.getEvents(DefaultParametrizedNotificationManager.java:145)
      	at org.xwiki.notifications.sources.internal.DefaultParametrizedNotificationManager.getEvents(DefaultParametrizedNotificationManager.java:111)
      	at org.xwiki.notifications.notifiers.internal.DefaultAsyncNotificationRenderer.render(DefaultAsyncNotificationRenderer.java:115)
      	... 6 common frames omitted
      Caused by: org.xwiki.query.QueryException: Exception while executing query. Query statement = [select event from LegacyEvent event where ((((((((event.type = :value_6197595503f01ee2a34e403fe08d2e1d9d0c14cf1cdfc2b74739895dc9a15a04) AND (event.wiki = :value_d3d94e6e2fdded8e1f8ee7a63989d1fcc0dbaacb198f14451563af59225f8d4f)) OR ((event.type = :value_fa8847b0c33183273f5945508b31c3208a9e4ece58ca47233a05628d8dba3799) AND (event.wiki = :value_d3d94e6e2fdded8e1f8ee7a63989d1fcc0dbaacb198f14451563af59225f8d4f))) OR ((event.type = :value_22a0dd4eeff7a342d41f1e47997d2005653be9238d8699d720aa21528501bc29) AND (event.wiki = :value_d3d94e6e2fdded8e1f8ee7a63989d1fcc0dbaacb198f14451563af59225f8d4f))) OR ((event.type = :value_fe20a14652f632ba0111c1b8a1849d6e4ab66f6e5a21c88b4424ebe96e404a7c) AND (event.wiki = :value_d3d94e6e2fdded8e1f8ee7a63989d1fcc0dbaacb198f14451563af59225f8d4f))) OR ((event.type = :value_1bed5a99e59f2a8298b87d92cb3da9be3d5c43f3482661c0389c362f3bf37987) AND (event.wiki = :value_d3d94e6e2fdded8e1f8ee7a63989d1fcc0dbaacb198f14451563af59225f8d4f))) OR ((event.type = :value_2937013f2181810606b2a799b05bda2849f3e369a20982a4138f0e0a55984ce4) AND (event.wiki = :value_d3d94e6e2fdded8e1f8ee7a63989d1fcc0dbaacb198f14451563af59225f8d4f))) AND ((((event.page IN ()) AND (event.wiki = :value_d3d94e6e2fdded8e1f8ee7a63989d1fcc0dbaacb198f14451563af59225f8d4f)) AND ( NOT ((event.type = :value_2937013f2181810606b2a799b05bda2849f3e369a20982a4138f0e0a55984ce4) AND ( NOT (event.version LIKE concat('%', :value_f7f4791af8c2fe5825591201df09b72c2463d705c04f2f8e5ccf54f16ebaa424) ESCAPE '!'))))) AND (event.user <> :value_cc42f2c5837886c484267cc4182efb42ce6818ce257792dad5fdb74dbe7af1a5))) AND (event.hidden <> true) ORDER BY event.date DESC]
      	at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor.execute(HqlQueryExecutor.java:176)
      	at org.xwiki.query.internal.DefaultQueryExecutorManager.execute(DefaultQueryExecutorManager.java:72)
      	at org.xwiki.query.internal.DefaultQuery.execute(DefaultQuery.java:306)
      	at org.xwiki.eventstream.store.internal.LegacyEventLoader.searchEvents(LegacyEventLoader.java:111)
      	at org.xwiki.eventstream.store.internal.LegacyEventStream.searchEvents(LegacyEventStream.java:75)
      	at org.xwiki.notifications.sources.internal.EventSearcher.searchStreamEvents(EventSearcher.java:135)
      	at org.xwiki.notifications.sources.internal.EventSearcher.searchEvents(EventSearcher.java:91)
      	at org.xwiki.notifications.sources.internal.DefaultParametrizedNotificationManager.getEvents(DefaultParametrizedNotificationManager.java:126)
      	... 8 common frames omitted
      [...]
      Caused by: java.sql.SQLException: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) and legacyeven0_.ase_wiki='subwiki' and (legacyeven0_.ase_type<>'update' o...' at line 1
      

      I guess/hope it is relatively easy to avoid the error, as one has to filter out all cases where a event.page IN () will be constructed as part of the query; however before I look into the issue I wonder if someone can explain why the database is queried at all. The existing events have all been migrated to the Solr store, so IMO there should be no need for this query in the first place.

      Attachments

        Issue Links

          Activity

            People

              camil7 Clemens Robbenhaar
              camil7 Clemens Robbenhaar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: