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

Errors in Search Date filtering facets when running XWiki on JAVA 17

    XMLWordPrintable

Details

    • Bug
    • Resolution: Solved By
    • Critical
    • 14.10.9, 15.3-rc-1
    • 12.10.10, 13.4.5, 13.10
    • Search - Solr
    • Windows 11 Pro 64 bit, Chrome 96, using a local instance XWiki 13.10 on MariaDB 10.6, Tomcat 9.0.56 and Jetty+HSQLDB instance, Java 17.0.1 build 17.0.1+12-LTS-39 from Oracle
    • Unknown

    Description

      STEPS TO REPRODUCE

      1. Start XWiki on Java 17
      2. Click on Search magnifier in top right corner, enter some text in the input field (e.g. "wiki") and press Enter
      3. Observe the XWiki console
      4. Click on Date filtering facets ('Last modification date', ' Creation date', Upload date')

      EXPECTED RESULTS

      Under every Date filtering facet are displayed selectable sub-filters ('Today', ' Last 7 days', 'Last 30 days', 'Custom date & time interval').

      ACTUAL RESULTS

      An error is displayed instead:

      Failed to execute the [velocity] macro. Cause: [class org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl cannot access class sun.util.calendar.ZoneInfo (in module java.base) because module java.base does not export sun.util.calendar to unnamed module @51b1a8f6]. Click on this message for details.

      In console, there is the following stacktrace (partial):

       2021-12-13 15:17:46,137 [http-nio-1115-exec-9 - http://localhost:1115/xwiki/bin/view/Main/Search?text=wiki&f_type=DOCUMENT&f_locale=en&f_locale=&r=1] ERROR o.a.v.rendering                - ASTMethod.execute() : exception invoking method 'getOffset' in class sun.util.calendar.ZoneInfo
      java.lang.IllegalAccessException: class org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl cannot access class sun.util.calendar.ZoneInfo (in module java.base) because module java.base does not export sun.util.calendar to unnamed module @5dbbb292
              at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:392)
              at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:674)
              at java.base/java.lang.reflect.Method.invoke(Method.java:560)
              at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:571)
              ...
              at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
              at java.base/java.lang.Thread.run(Thread.java:833)
      2021-12-13 15:17:46,154 [http-nio-1115-exec-9 - http://localhost:1115/xwiki/bin/view/Main/Search?text=wiki&f_type=DOCUMENT&f_locale=en&f_locale=&r=1] ERROR o.a.v.d.null                   - Exception in macro #displaySearchFacetValue_customDateInterval called at xwiki:Main.Search[line 116, column 1]
      2021-12-13 15:17:46,158 [http-nio-1115-exec-9 - http://localhost:1115/xwiki/bin/view/Main/Search?text=wiki&f_type=DOCUMENT&f_locale=en&f_locale=&r=1] ERROR o.a.v.d.null                   - Exception in macro #displaySearchFacetValues_date called at xwiki:Main.Search[line 4, column 23]
      2021-12-13 15:17:46,174 [http-nio-1115-exec-9 - http://localhost:1115/xwiki/bin/view/Main/Search?text=wiki&f_type=DOCUMENT&f_locale=en&f_locale=&r=1] ERROR o.a.v.rendering                - ASTMethod.execute() : exception invoking method 'getOffset' in class sun.util.calendar.ZoneInfo
      java.lang.IllegalAccessException: class org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl cannot access class sun.util.calendar.ZoneInfo (in module java.base) because module java.base does not export sun.util.calendar to unnamed module @5dbbb292
              at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:392)
              at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:674)
              at java.base/java.lang.reflect.Method.invoke(Method.java:560)
              at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:571)
              ...
              at java.base/java.lang.Thread.run(Thread.java:833)
      2021-12-13 15:17:46,190 [http-nio-1115-exec-9 - http://localhost:1115/xwiki/bin/view/Main/Search?text=wiki&f_type=DOCUMENT&f_locale=en&f_locale=&r=1] ERROR o.a.v.d.null                   - Exception in macro #displaySearchFacetValue_customDateInterval called at xwiki:Main.Search[line 116, column 1]
      2021-12-13 15:17:46,196 [http-nio-1115-exec-9 - http://localhost:1115/xwiki/bin/view/Main/Search?text=wiki&f_type=DOCUMENT&f_locale=en&f_locale=&r=1] ERROR o.a.v.d.null                   - Exception in macro #displaySearchFacetValues_date called at xwiki:Main.Search[line 4, column 23]
      2021-12-13 15:17:46,247 [http-nio-1115-exec-9 - http://localhost:1115/xwiki/bin/view/Main/Search?text=wiki&f_type=DOCUMENT&f_locale=en&f_locale=&r=1] ERROR o.a.v.rendering                - ASTMethod.execute() : exception invoking method 'getOffset' in class sun.util.calendar.ZoneInfo
      java.lang.IllegalAccessException: class org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl cannot access class sun.util.calendar.ZoneInfo (in module java.base) because module java.base does not export sun.util.calendar to unnamed module @5dbbb292
              at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:392)
              at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:674)
              at java.base/java.lang.reflect.Method.invoke(Method.java:560)
              ...
              at java.base/java.lang.Thread.run(Thread.java:833)
      2021-12-13 15:17:46,266 [http-nio-1115-exec-9 - http://localhost:1115/xwiki/bin/view/Main/Search?text=wiki&f_type=DOCUMENT&f_locale=en&f_locale=&r=1] ERROR o.a.v.d.null                   - Exception in macro #displaySearchFacetValue_customDateInterval called at xwiki:Main.Search[line 116, column 1]
      2021-12-13 15:17:46,271 [http-nio-1115-exec-9 - http://localhost:1115/xwiki/bin/view/Main/Search?text=wiki&f_type=DOCUMENT&f_locale=en&f_locale=&r=1] ERROR o.a.v.d.null                   - Exception in macro #displaySearchFacetValues_date called at xwiki:Main.Search[line 4, column 23]

      The full stacktrace from console is available here: https://up1.xwikisas.com/#ovzf3rRZcs26Q-tgjIYCBw

      The issue does not reproduce on Java 11.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              iandriuta Ilie Andriuta
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: