Uploaded image for project: 'Alfresco One Platform'
  1. Alfresco One Platform
  2. ACE-4552

MLText types incorrectly handled in Share and CMIS (thread taint)

    Details

      Description

      Multilingual text is displayed using the toString of the MLText type.
      For some reason, Share is no longer using the beans that intercept MLText and resolve it to String types.

      The tree node appears to be affected as it just spins and the following appears in the logs:

      FreeMarker template error:
      Expected a string or something automatically convertible to string (number, date or boolean), but this evaluated to an extended_hash (wrapper: f.t.SimpleHash):
      ==> jsonUtils.encodeJSONString(x)  [in template "org/alfresco/slingshot/documentlibrary/treenode.get.json.ftl" at line 2, column 15]
      
      The failing instruction (FTL stack trace):
      ----------
      ==> ${(t.properties.description!"")} auto...  [in template "org/alfresco/slingshot/documentlibrary/treenode.get.json.ftl" at line 23, column 26]
      ----------
      
      Java stack trace (for programmers):
      ----------
      freemarker.core.NonStringException: [... Exception message was already printed; see it above ...]
              at freemarker.core.EvalUtil.coerceModelToString(EvalUtil.java:417)
              at freemarker.core.Expression.evalAndCoerceToString(Expression.java:115)
              at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
              at freemarker.core.Environment.visit(Environment.java:265)
              at freemarker.core.MixedContent.accept(MixedContent.java:93)
              at freemarker.core.Environment.visitByHiddingParent(Environment.java:286)
              at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:193)
              at freemarker.core.Environment.visitIteratorBlock(Environment.java:509)
              at freemarker.core.IteratorBlock.accept(IteratorBlock.java:103)
      

      After having run some CMIS loading tests for a while, the following is showing up in the logs:

      03:38:09,407 ERROR [org.apache.chemistry.opencmis.server.impl.browser.CmisBrowserBindingServlet] org.alfresco.service.cmr.repository.MLText cannot be cast to java.lang.String
      org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: org.alfresco.service.cmr.repository.MLText cannot be cast to java.lang.String
              at org.alfresco.opencmis.AlfrescoCmisExceptionInterceptor.invoke(AlfrescoCmisExceptionInterceptor.java:99)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
              at com.sun.proxy.$Proxy310.getObject(Unknown Source)
              at org.apache.chemistry.opencmis.server.support.wrapper.ConformanceCmisServiceWrapper.getObject(ConformanceCmisServiceWrapper.java:914)
              at org.apache.chemistry.opencmis.server.impl.browser.ObjectService$GetObject.serve(ObjectService.java:531)
              at org.apache.chemistry.opencmis.server.shared.Dispatcher.dispatch(Dispatcher.java:91)
              at org.apache.chemistry.opencmis.server.impl.browser.CmisBrowserBindingServlet.dispatch(CmisBrowserBindingServlet.java:340)
              at org.apache.chemistry.opencmis.server.impl.browser.CmisBrowserBindingServlet.service(CmisBrowserBindingServlet.java:234)
      

      We will continue testing on the BM5 servers and see if there is any pattern developing around when it starts. However, since it's been seen in both Share and CMIS, we have to assume that the thread pool being tainted (if that is the case) is shared by the CMIS servlet and the Share service layer.

        Attachments

          Activity

            People

            • Assignee:
              closedissues Closed Issues
              Reporter:
              dhulley Derek Hulley [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 30 minutes
                4h 30m