Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-5873

Error when restoring a previous version of a content with attachments

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.4.7, 3.5.5, 3.7
    • None
    • None
    • 3.6

    Description

      How to reproduce

      • Edit a content that has multiple versions
      • Click on history
      • Click on a previous version
      • Click on restore

      Actual behavior

      • An error occured
      Date:			Tue Dec 09 15:14:36 CET 2014 (1418134476416)
      Thread:		http-apr-8080-exec-18
      Message #:	1912
      Level:		ERROR
      NDC:			
      Category:	sitemap
      Message:		Can not dispatch request '2' : 'cms' '/do-action/6' '{contentId=defaultWebContent://3231fa29-da1d-4316-982d-e66b3c4c9e05, contentVersion=1.75}'
      Location:	org.ametys.runtime.util.SLF4JLogger.error(SLF4JLogger.java:64)
      Thrown:
      org.apache.cocoon.util.location.LocatedException: Can not dispatch request '2' : 'cms' '/do-action/6' '{contentId=defaultWebContent://3231fa29-da1d-4316-982d-e66b3c4c9e05, contentVersion=1.75}'
      	at org.ametys.runtime.plugins.core.dispatcher.DispatchGenerator._dispatching(DispatchGenerator.java:165)
      	at org.ametys.runtime.plugins.core.dispatcher.DispatchGenerator.generate(DispatchGenerator.java:84)
      	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:579)
      	at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:280)
      	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:481)
      	at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:144)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
      	at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
      	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:236)
      	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:178)
      	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254)
      	at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
      	at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
      	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:236)
      	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:178)
      	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254)
      	at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
      	at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
      	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:236)
      	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:178)
      	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254)
      	at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
      	at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
      	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:236)
      	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:178)
      	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254)
      	at org.apache.cocoon.Cocoon.process(Cocoon.java:699)
      	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1159)
      	at org.ametys.runtime.servlet.RuntimeServlet._doService(RuntimeServlet.java:135)
      	at org.ametys.runtime.servlet.RuntimeServlet.service(RuntimeServlet.java:92)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
      	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: org.apache.excalibur.source.SourceException: Cannot get input stream for cocoon://_plugins/cms/do-action/6?contentId=defaultWebContent://3231fa29-da1d-4316-982d-e66b3c4c9e05&contentVersion=1.75&
      	at org.apache.cocoon.components.source.impl.SitemapSource.getInputStream(SitemapSource.java:253)
      	at org.ametys.runtime.plugins.core.dispatcher.DispatchGenerator._dispatching(DispatchGenerator.java:138)
      	... 64 more
      Caused by: org.xml.sax.SAXException: Could not get sitemap source cocoon://_plugins/cms/do-action/6?contentId=defaultWebContent://3231fa29-da1d-4316-982d-e66b3c4c9e05&contentVersion=1.75&
      org.apache.cocoon.ProcessingException: Sitemap: error when calling sub-sitemap
      	at <map:mount> - resource://org/ametys/runtime/kernel/sitemap.xmap:144:82
      	at org.apache.cocoon.components.source.impl.SitemapSource.init(SitemapSource.java:380)
      	at org.apache.cocoon.components.source.impl.SitemapSource.<init>(SitemapSource.java:215)
      	at org.apache.cocoon.components.source.impl.SitemapSourceFactory.getSource(SitemapSourceFactory.java:65)
      	at org.apache.excalibur.source.impl.SourceResolverImpl.resolveURI(SourceResolverImpl.java:208)
      	at org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:558)
      	at org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:558)
      	at org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:558)
      	at org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:558)
      	at org.ametys.runtime.plugins.core.dispatcher.DispatchGenerator._dispatching(DispatchGenerator.java:135)
      	... 64 more
      Caused by: org.apache.cocoon.ProcessingException: Sitemap: error when calling sub-sitemap
      	at <map:mount> - resource://org/ametys/runtime/kernel/sitemap.xmap:144:82
      	at org.apache.cocoon.ProcessingException.throwLocated(ProcessingException.java:113)
      	at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:122)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
      	at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
      	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:236)
      	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.buildPipeline(ConcreteTreeProcessor.java:194)
      	at org.apache.cocoon.components.treeprocessor.TreeProcessor.buildPipeline(TreeProcessor.java:267)
      	at org.apache.cocoon.components.source.impl.SitemapSource.init(SitemapSource.java:333)
      	... 72 more
      Caused by: org.ametys.plugins.repository.AmetysRepositoryException: Unable to restore from revision: 1.75
      	at org.ametys.plugins.repository.jcr.DefaultAmetysObject.restoreFromRevision(DefaultAmetysObject.java:204)
      	at org.ametys.cms.workflow.RestoreRevisionFunction.execute(RestoreRevisionFunction.java:84)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.ametys.runtime.plugin.component.PluginsComponentManager$ComponentInvocationHandler.invoke(PluginsComponentManager.java:159)
      	at com.sun.proxy.$Proxy37.execute(Unknown Source)
      	at com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:869)
      	at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1042)
      	at org.ametys.plugins.workflow.Workflow.transitionWorkflow(Workflow.java:496)
      	at com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:567)
      	at org.ametys.plugins.workflow.Workflow.doAction(Workflow.java:253)
      	at org.ametys.plugins.workflow.cocoon.WorkflowAction._act(WorkflowAction.java:45)
      	at org.ametys.cms.workflow.ContentWorkflowAction._act(ContentWorkflowAction.java:74)
      	at org.ametys.plugins.workflow.cocoon.AbstractWorkflowAction.act(AbstractWorkflowAction.java:58)
      	at org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:125)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
      	at org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:139)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
      	at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
      	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:236)
      	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.buildPipeline(ConcreteTreeProcessor.java:194)
      	at org.apache.cocoon.components.treeprocessor.TreeProcessor.buildPipeline(TreeProcessor.java:267)
      	at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:111)
      	... 82 more
      Caused by: javax.jcr.nodetype.ConstraintViolationException: Unable to perform operation. Node is protected.
      	at org.apache.jackrabbit.core.ItemValidator.checkCondition(ItemValidator.java:276)
      	at org.apache.jackrabbit.core.ItemValidator.checkModify(ItemValidator.java:248)
      	at org.apache.jackrabbit.core.PropertyImpl.checkSetValue(PropertyImpl.java:278)
      	at org.apache.jackrabbit.core.PropertyImpl.setValue(PropertyImpl.java:780)
      	at org.apache.jackrabbit.core.NodeImpl$7.perform(NodeImpl.java:2109)
      	at org.apache.jackrabbit.core.NodeImpl$7.perform(NodeImpl.java:2099)
      	at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216)
      	at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91)
      	at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:2099)
      	at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:1848)
      	at org.ametys.plugins.repository.jcr.DefaultAmetysObject.copyNode(DefaultAmetysObject.java:299)
      	at org.ametys.plugins.repository.jcr.DefaultAmetysObject.copyNode(DefaultAmetysObject.java:311)
      	at org.ametys.plugins.repository.jcr.DefaultAmetysObject.restoreFromNode(DefaultAmetysObject.java:264)
      	at org.ametys.plugins.repository.jcr.DefaultAmetysObject.restoreFromRevision(DefaultAmetysObject.java:200)
      	... 110 more
      

      Attachments

        Activity

          People

            ngavalda Nicolas Gavalda (Inactive)
            fravetier Frederic Ravetier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: