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

If no pages exists with a given tag, the activity stream fails

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 12.10.3, 13.0
    • Fix Version/s: None
    • Component/s: Tag
    • Labels:
      None
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      When visiting the Tags page with a tag without any page attached, the activity stream displays a stack trace

      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.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:823)
      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 more
      Caused by: org.xwiki.query.QueryException: Exception while executing query. Query statement = [select event from LegacyEvent event where (((((((((((event.type = :value_b4a3816c93415e4a5bc46ff770abe168586d31f3365c397c53d71bf5dd66633d) OR (event.type = :value_1bed5a99e59f2a8298b87d92cb3da9be3d5c43f3482661c0389c362f3bf37987)) OR (event.type = :value_5f45d7cab567f754a2c9db32a13f68e244badef7919b6304d592f04245dbd8de)) OR (event.type = :value_6197595503f01ee2a34e403fe08d2e1d9d0c14cf1cdfc2b74739895dc9a15a04)) OR (event.type = :value_fe20a14652f632ba0111c1b8a1849d6e4ab66f6e5a21c88b4424ebe96e404a7c)) OR (event.type = :value_1cd3e0f9b6229ca1af743a49af81586d21d9d20efdbe6d9ffccbdb2609cd59a3)) OR (event.type = :value_7edee78db1e3e7db6e599b252187b8e2592c17c09fd7b9614c13b3bc3bc55455)) OR (event.type = :value_5158ac980d32e367380d16bb98414d2913f77185c389c5e9601a0367071f32eb)) OR (event.type = :value_2937013f2181810606b2a799b05bda2849f3e369a20982a4138f0e0a55984ce4)) OR (event.type = :value_fa8847b0c33183273f5945508b31c3208a9e4ece58ca47233a05628d8dba3799)) OR (event.type = :value_22a0dd4eeff7a342d41f1e47997d2005653be9238d8699d720aa21528501bc29)) AND ((((event.page IN ()) AND (event.wiki = :value_0ec84bfcdb3dfe757532024954faeff73d4df988f447dc72ab2b649816f14d93)) AND ( NOT ((event.type = :value_2937013f2181810606b2a799b05bda2849f3e369a20982a4138f0e0a55984ce4) AND ( NOT (event.version LIKE concat('%', :value_f7f4791af8c2fe5825591201df09b72c2463d705c04f2f8e5ccf54f16ebaa424) ESCAPE '!'))))) AND (event.user <> :value_cc42f2c5837886c484267cc4182efb42ce6818ce257792dad5fdb74dbe7af1a5)) 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 more
      Caused by: com.xpn.xwiki.XWikiException: Error number 0 in 3: Exception while hibernate execute
      at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:826)
      at com.xpn.xwiki.store.XWikiHibernateBaseStore.executeRead(XWikiHibernateBaseStore.java:889)
      at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor.execute(HqlQueryExecutor.java:164)
      ... 15 more
      Caused by: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
      at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154)
      at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1542)
      at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor.lambda$execute$0(HqlQueryExecutor.java:167)
      at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor$$Lambda$752/0x00000000b09fdc30.doInHibernate(Unknown Source)
      at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:820)
      ... 17 more
      Caused by: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
      at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:103)
      at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
      at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113)
      at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99)
      at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:67)
      at org.hibernate.loader.Loader.getResultSet(Loader.java:2304)
      at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:2057)
      at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:2019)
      at org.hibernate.loader.Loader.doQuery(Loader.java:948)
      at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:349)
      at org.hibernate.loader.Loader.doList(Loader.java:2850)
      at org.hibernate.loader.Loader.doList(Loader.java:2832)
      at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2664)
      at org.hibernate.loader.Loader.list(Loader.java:2659)
      at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:506)
      at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:400)
      at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:219)
      at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1414)
      at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1565)
      at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1533)
      ... 20 more
      Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near ")"
        Position: 1249
      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2510)
      at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2245)
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:311)
      at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:447)
      at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:368)
      at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:159)
      at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:109)
      at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:122)
      at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:122)
      at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:57)
      ... 35 more
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mleduc Manuel Leduc
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Date of First Response: