Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-53974

Cast exception when expanding metadata.labels in content API

    XMLWordPrintable

Details

    Description

      /rest/api/content/contentId throws cast exception when expanding the metadata.labels

      @4000000056a038e7333039a4 2016-01-21 02:48:13,856 INFO [http-bio-1999-exec-129] [confluence.rpc.auth.TokenAuthenticationInvocationHandler] invokeAuthenticatedMethod Executing remote API method [ getPage ] as user [ sheiva ]
      @4000000056a038e8237439ac 2016-01-21 02:48:14,591 ERROR [http-bio-1999-exec-170] [rest.api.model.ExceptionConverter] convertServiceException No status code found for exception, converting to internal server error :
      @4000000056a038e82374417c  -- url: /wiki/rest/api/content/12878012 | traceId: 3fa60b890a86d925 | userName: volker
      @4000000056a038e82374417c java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to java.util.List
      @4000000056a038e823744564 	at com.atlassian.confluence.content.apisupport.ContentCreator.setLabelsMetadataOnEntity(ContentCreator.java:219)
      @4000000056a038e82374705c 	at com.atlassian.confluence.content.apisupport.ContentCreator.setCommonMetadata(ContentCreator.java:296)
      @4000000056a038e82374705c 	at com.atlassian.confluence.api.impl.service.content.typebinding.PageContentTypeApiSupport.update(PageContentTypeApiSupport.java:154)
      @4000000056a038e823747444 	at com.atlassian.confluence.api.impl.service.content.typebinding.PageContentTypeApiSupport.update(PageContentTypeApiSupport.java:42)
      @4000000056a038e823747c14 	at com.atlassian.confluence.api.impl.service.content.ContentServiceImpl.updateUsingApiSupport(ContentServiceImpl.java:108)
      @4000000056a038e823747c14 	at com.atlassian.confluence.api.impl.service.content.ContentServiceImpl.update(ContentServiceImpl.java:145)
      @4000000056a038e823748bb4 	at sun.reflect.GeneratedMethodAccessor1997.invoke(Unknown Source)
      @4000000056a038e823748bb4 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      @4000000056a038e823748f9c 	at java.lang.reflect.Method.invoke(Method.java:497)
      @4000000056a038e823748f9c 	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
      @4000000056a038e82374976c 	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      @4000000056a038e82374976c 	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      @4000000056a038e823749b54 	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      @4000000056a038e823749f3c 	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      @4000000056a038e82374a324 	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      @4000000056a038e82374a324 	at com.sun.proxy.$Proxy143.update(Unknown Source)
      @4000000056a038e82374a70c 	at sun.reflect.GeneratedMethodAccessor1997.invoke(Unknown Source)
      @4000000056a038e82374aedc 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      @4000000056a038e82374b2c4 	at java.lang.reflect.Method.invoke(Method.java:497)
      @4000000056a038e82374b2c4 	at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
      ...
      

      Workaround:
      Do not expand the metadata labels

      Attachments

        Issue Links

          Activity

            People

              rading Ran
              rading Ran
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: