Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-6268

Adding Invalid Aspects Via CMIS ATOM API Results in NullPointerException

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.1.2
    • Component/s: CMIS
    • Labels:
      None
    • Bug Priority:
      Category 2

      Description

      Unable to add any aspects to an Object via CMIS ATOM Api

      Raw HTTP Request:

      POST /alfresco/cmisatom/53de883a-53db-4aa1-a902-cb0edcbfa42c/children?id=workspace%3A%2F%2FSpacesStore%2Fd79771f9-5373-4a00-af71-4ce94efc900d HTTP/1.1
      User-Agent: PECL::HTTP/1.7.3 (PHP/5.3.9-ZS5.6.0)
      Host: localhost:8080
      Accept: /
      Authorization: Basic YWRtaW46YWRtaW4=
      Content-Type: application/atom+xml;type=entry
      Content-Length: 1226
      Expect: 100-continue

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <atom:entry xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/" xmlns:cmism="http://docs.oasis-open.org/ns/cmis/messaging/200908/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/" xmlns:alf="http://www.alfresco.org">
      <atom:title>4fb6765a9f33a-createCmisraContentDoc-example.txt</atom:title>
      <atom:summary>4fb6765a9f33a-createCmisraContentDoc-example.txt</atom:summary>
      <cmisra:object>
      <cmis:properties>
      <alf:setAspects>
      <alf:aspectsToAdd>sys:temporary</alf:aspectsToAdd>
      </alf:setAspects>
      <cmis:propertyId propertyDefinitionId="cmis:objectTypeId">
      <cmis:value>cmis:document</cmis:value>
      </cmis:propertyId>
      <cmis:propertyString propertyDefinitionId="cmis:name">
      <cmis:value>4fb6765a9f33a-createCmisraContentDoc-example.txt</cmis:value>
      </cmis:propertyString>
      </cmis:properties>
      </cmisra:object>
      <cmisra:content>
      <cmisra:mediatype>text/plain</cmisra:mediatype>
      <cmisra:base64>VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZy4=</cmisra:base64>
      </cmisra:content>
      </atom:entry>

      Raw Response:

      HTTP/1.1 100 Continue
      HTTP/1.1 500 Internal Server Error
      Cache-Control: private, max-age=0
      Server: Apache-Chemistry-OpenCMIS/0.6.0
      Content-Type: text/html
      Transfer-Encoding: chunked
      Date: Fri, 18 May 2012 16:28:06 GMT
      Connection: close

      13a1
      <html><head><title>Apache Chemistry OpenCMIS - runtime error</title><style><!--H1

      {font-size:24px;line-height:normal;font-weight:bold;background-color:#f0f0f0;color:#003366;border-bottom:1px solid #3c78b5;padding:2px;}

      BODY

      {font-family:Verdana,arial,sans-serif;color:black;font-size:14px;}

      HR

      color: Color value is invalid

      -></style></head><body><h1>HTTP Status 500 - <Unable to render embedded object: File (--exception-->runtime<) not found./exception></h1><p><Unable to render embedded object: File (--message-->null<) not found./message></p><hr noshade='noshade'/><!stacktrace-><pre>
      org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException
      at org.alfresco.opencmis.AlfrescoCmisExceptionInterceptor.invoke(AlfrescoCmisExceptionInterceptor.java:80)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      at $Proxy246.create(Unknown Source)
      at org.apache.chemistry.opencmis.server.support.CmisServiceWrapper.create(CmisServiceWrapper.java:650)
      at org.apache.chemistry.opencmis.server.impl.atompub.ObjectService.create(ObjectService.java:95)
      ...
      Caused by: java.lang.NullPointerException
      at org.alfresco.opencmis.CMISConnector.setAspectProperties(CMISConnector.java:2251)
      at org.alfresco.opencmis.CMISConnector.setProperties(CMISConnector.java:2121)
      at org.alfresco.opencmis.AlfrescoCmisServiceImpl.createDocument(AlfrescoCmisServiceImpl.java:1121)
      at org.alfresco.opencmis.AlfrescoCmisServiceImpl.create(AlfrescoCmisServiceImpl.java:1015)
      ...
      </pre><!-/stacktrace-><hr noshade='noshade'/></body></html>
      0

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                closedbugs Closed Bugs
                Reporter:
                xguzman Xander Guzman (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 days, 2 hours
                  3d 2h