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

NPE when trying to publish a document after deletion of a restored version

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.0-HF18, 7.3
    • Fix Version/s: 6.0-HF19, 7.4
    • Component/s: Core

      Description

      How to reproduce:

      • Create a File document
      • Edit File document and increment version to 1.0
      • Edit File document and increment version to 2.0
      • Restore version 1.0
      • Delete version 1.0
      • Publish document --> NPE
      Caused by: java.lang.NullPointerException
      	at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.createProxy(SQLSession.java:353)
      	at org.nuxeo.ecm.core.api.AbstractSession.createProxyInternal(AbstractSession.java:2237)
      	at org.nuxeo.ecm.core.api.AbstractSession.publishDocument(AbstractSession.java:2812)
      	at org.nuxeo.ecm.core.api.AbstractSession.publishDocument(AbstractSession.java:2735)
      	at org.nuxeo.ecm.platform.publisher.task.CoreProxyWithWorkflowFactory$DocumentPublisherUnrestricted.run(CoreProxyWithWorkflowFactory.java:441)
      	at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:113)
      	at org.nuxeo.ecm.platform.publisher.task.CoreProxyWithWorkflowFactory.publishDocument(CoreProxyWithWorkflowFactory.java:123)
      	at org.nuxeo.ecm.platform.rendition.publisher.RenditionPublicationFactory.publishDocument(RenditionPublicationFactory.java:84)
      	at org.nuxeo.ecm.platform.publisher.api.AbstractBasePublicationTree.publish(AbstractBasePublicationTree.java:126)
      	at org.nuxeo.ecm.platform.publisher.impl.core.SectionPublicationTree.publish(SectionPublicationTree.java:132)
      	at org.nuxeo.ecm.platform.publisher.impl.service.PublisherServiceImpl.publish(PublisherServiceImpl.java:459)
      	at org.nuxeo.ecm.platform.publisher.impl.service.AbstractRemotableTree.publish(AbstractRemotableTree.java:77)
      	at org.nuxeo.ecm.platform.publisher.web.PublishActionsBean.doPublish(PublishActionsBean.java:223)
      	at org.nuxeo.ecm.platform.publisher.web.PublishActionsBean.doPublish(PublishActionsBean.java:211)
      

      The correct fix is to prevent version 1.0 from being deleted at all. It should not be deleted because the live document is checked in and has this version as its base version.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 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
                4h