Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-31867

Fix ClassCastException on WOPI checkDownloadBlob

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Not A Bug
    • Affects Version/s: 2021.37
    • Fix Version/s: None
    • Component/s: WOPI
    • Backlog priority:
      1,000
    • Sprint:
      nxplatform #87
    • Story Points:
      1

      Description

      After upgrading to 2021.37 it gives different error. WOPI icons are not visible to anyone except Admins.

      We get below error in logs while page load. User has blob download permission & can see blob but not WOPI icon.

      2023-05-10T09:15:49,682 WARN [AbstractJsonEnricher] The following error occured with enricher: wopi
      java.lang.ClassCastException: Cannot cast java.util.ImmutableCollections$MapN to java.util.HashMap
      at java.lang.Class.cast(Class.java:3605) ~[?:?]
      at jdk.nashorn.internal.scripts.Script$Recompilation$494$^eval_.run(<eval>:27) ~[?:?]
      at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:655) ~[jdk.scripting.nashorn:?]
      at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513) ~[jdk.scripting.nashorn:?]
      at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:527) ~[jdk.scripting.nashorn:?]
      at jdk.nashorn.api.scripting.ScriptObjectMirror.callMember(ScriptObjectMirror.java:202) ~[jdk.scripting.nashorn:?]
      at jdk.nashorn.api.scripting.NashornScriptEngine.invokeImpl(NashornScriptEngine.java:393) ~[jdk.scripting.nashorn:?]
      at jdk.nashorn.api.scripting.NashornScriptEngine.invokeFunction(NashornScriptEngine.java:197) ~[jdk.scripting.nashorn:?]
      at org.nuxeo.ecm.core.io.download.DownloadServiceImpl.checkPermission(DownloadServiceImpl.java:905) ~[nuxeo-core-io-2021.30.14.jar:?]
      at org.nuxeo.wopi.WOPIServiceImpl.checkDownloadBlob(WOPIServiceImpl.java:304) ~[nuxeo-wopi-2021.37.4.jar:?]
      at org.nuxeo.wopi.WOPIJsonEnricher.write(WOPIJsonEnricher.java:102) ~[nuxeo-wopi-2021.37.4.jar:?]
      at org.nuxeo.wopi.WOPIJsonEnricher.write(WOPIJsonEnricher.java:77) ~[nuxeo-wopi-2021.37.4.jar:?]
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: