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

Fix NPE when trying to add the social facet on a placeless document

    XMLWordPrintable

    Details

      Description

      Placeless documents can be created, using the Template Rendering addon for instance.
      Then this error could happen, when publishing a rendition

      ERROR [EventServiceImpl] Error during addSocialDocumentFacetListener sync listener execution, transaction won't be rolled back since event.markRollBack() was not called by the Listener
      java.lang.NullPointerException
      	at org.nuxeo.ecm.core.api.AbstractSession.getDocument(AbstractSession.java:1234)
      	at org.nuxeo.ecm.social.workspace.listeners.AddSocialDocumentFacetListener.handleEvent(AddSocialDocumentFacetListener.java:79)
      	at org.nuxeo.ecm.core.event.impl.EventServiceImpl.fireEvent(EventServiceImpl.java:215)
      	at org.nuxeo.ecm.core.api.AbstractSession.fireEvent(AbstractSession.java:385)
      	at org.nuxeo.ecm.core.api.AbstractSession.notifyEvent(AbstractSession.java:437)
      	at org.nuxeo.ecm.core.api.AbstractSession.createDocument(AbstractSession.java:894)
      	at org.nuxeo.ecm.platform.rendition.service.RenditionCreator.run(RenditionCreator.java:91)
      	at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:115)
      	at org.nuxeo.ecm.platform.rendition.service.RenditionServiceImpl.storeRendition(RenditionServiceImpl.java:124)
      	at org.nuxeo.ecm.platform.rendition.service.RenditionServiceImpl.getRendition(RenditionServiceImpl.java:315)
      	at org.nuxeo.ecm.platform.rendition.publisher.RenditionPublicationFactory.publishDocument(RenditionPublicationFactory.java:67)
      	at org.nuxeo.ecm.platform.publisher.api.AbstractBasePublicationTree.publish(AbstractBasePublicationTree.java:126)
      	at org.nuxeo.ecm.platform.publisher.impl.core.SectionPublicationTree.publish(SectionPublicationTree.java:123)
      	at org.nuxeo.ecm.platform.publisher.impl.service.PublisherServiceImpl.publish(PublisherServiceImpl.java:444)
      	at org.nuxeo.ecm.platform.publisher.impl.service.AbstractRemotableTree.publish(AbstractRemotableTree.java:77)
      	at org.nuxeo.ecm.platform.publisher.web.PublishActionsBean.doPublish(PublishActionsBean.java:226)
      	at org.nuxeo.ecm.platform.publisher.web.PublishActionsBean.doPublish(PublishActionsBean.java:213)
             ....
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: