-
Bug
-
Resolution: Won't Fix
-
Major
-
3.5
-
None
In the org.ametys.web.workflow.CreateContentFunction._populateAdditionalData(Map, ModifiableContent), we have encountered a case where an exception has been raised for an unknown reason (see stack trace below).
In this case, the content node and the workflow node were created because a session.save() has already been performed. But the double reference between both node has not been set.
This leads to unexpected issue in the CMS, for example, we were not able to perform a simple content search (an error was raised when the previous content was SAX'ed).
2013-05-06 09:50:05,252 ERROR [sitemap] (http-8080-7;/plugins/core/servercomm/messages.xml) Can not dispatch request '2' : 'cms' 'init-workflow/1' '{workflow-org.ametys.cms.workflow.CreateContentFunction$contentName=Bob Article, workflow-org.ametys.cms.workflow.CreateContentFunction$contentTitle=Nouvel article, workflow-org.ametys.cms.workflow.CreateContentFunction$contentType=org.ametys.web.default.Content.article, workflow-org.ametys.web.repository.site.Site=hautegaronne, workflow-org.ametys.cms.workflow.CreateContentFunction$contentLanguage=fr, workflow-org.ametys.web.workflow.CreateContentFunction$pageId=page://a462e3c5-6bef-4ab4-b39f-7bf0bf4352cd, workflow-org.ametys.web.workflow.CreateContentFunction$zoneName=default, workflow-workflowName=content}' org.apache.cocoon.util.location.LocatedException: Can not dispatch request '2' : 'cms' 'init-workflow/1' '{workflow-org.ametys.cms.workflow.CreateContentFunction$contentName=Bob Article, workflow-org.ametys.cms.workflow.CreateContentFunction$contentTitle=Nouvel article, workflow-org.ametys.cms.workflow.CreateContentFunction$contentType=org.ametys.web.default.Content.article, workflow-org.ametys.web.repository.site.Site=hautegaronne, workflow-org.ametys.cms.workflow.CreateContentFunction$contentLanguage=fr, workflow-org.ametys.web.workflow.CreateContentFunction$pageId=page://a462e3c5-6bef-4ab4-b39f-7bf0bf4352cd, workflow-org.ametys.web.workflow.CreateContentFunction$zoneName=default, workflow-workflowName=content}' at org.ametys.runtime.plugins.core.dispatcher.DispatchGenerator._dispatching(DispatchGenerator.java:159) 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:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Unknown Source) Caused by: org.apache.excalibur.source.SourceException: Cannot get input stream for cocoon://_plugins/cms/init-workflow/1?workflow-org.ametys.cms.workflow.CreateContentFunction$contentName=Bob Article&workflow-org.ametys.cms.workflow.CreateContentFunction$contentTitle=Nouvel article&workflow-org.ametys.cms.workflow.CreateContentFunction$contentType=org.ametys.web.default.Content.article&workflow-org.ametys.web.repository.site.Site=hautegaronne&workflow-org.ametys.cms.workflow.CreateContentFunction$contentLanguage=fr&workflow-org.ametys.web.workflow.CreateContentFunction$pageId=page://a462e3c5-6bef-4ab4-b39f-7bf0bf4352cd&workflow-org.ametys.web.workflow.CreateContentFunction$zoneName=default&workflow-workflowName=content& at org.apache.cocoon.components.source.impl.SitemapSource.getInputStream(SitemapSource.java:253) at org.ametys.runtime.plugins.core.dispatcher.DispatchGenerator._dispatching(DispatchGenerator.java:132) ... 61 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.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:129) ... 61 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) ... 69 more Caused by: java.lang.Exception: Unable to perform action: '1' for for the workflow of name: 'content' at org.ametys.plugins.workflow.cocoon.AbstractWorkflowAction._processWorkflowException(AbstractWorkflowAction.java:146) at org.ametys.cms.workflow.InitializeContentWorkflowAction._processWorkflowException(InitializeContentWorkflowAction.java:110) at org.ametys.plugins.workflow.cocoon.AbstractWorkflowAction.act(AbstractWorkflowAction.java:66) 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.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) ... 79 more Caused by: com.opensymphony.workflow.WorkflowException: Page does not exists: root cause: There's no node for id page://a462e3c5-6bef-4ab4-b39f-7bf0bf4352cd at org.ametys.web.workflow.CreateContentFunction._populateAdditionalData(CreateContentFunction.java:165) at org.ametys.cms.workflow.CreateContentFunction.execute(CreateContentFunction.java:105) at sun.reflect.GeneratedMethodAccessor111.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.ametys.runtime.plugin.component.PluginsComponentManager$ComponentInvocationHandler.invoke(PluginsComponentManager.java:159) at $Proxy9.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.initialize(AbstractWorkflow.java:618) at org.ametys.plugins.workflow.Workflow.initialize(Workflow.java:159) at org.ametys.plugins.workflow.cocoon.InitializeWorkflowAction._act(InitializeWorkflowAction.java:45) at org.ametys.plugins.workflow.cocoon.AbstractWorkflowAction.act(AbstractWorkflowAction.java:58) ... 90 more Caused by: org.ametys.plugins.repository.UnknownAmetysObjectException: There's no node for id page://a462e3c5-6bef-4ab4-b39f-7bf0bf4352cd at org.ametys.plugins.repository.jcr.SimpleAmetysObjectFactory.getNode(SimpleAmetysObjectFactory.java:178) at org.ametys.plugins.repository.jcr.SimpleAmetysObjectFactory.getAmetysObjectById(SimpleAmetysObjectFactory.java:128) at org.ametys.plugins.repository.jcr.SimpleAmetysObjectFactory.getAmetysObjectById(SimpleAmetysObjectFactory.java:117) at org.ametys.plugins.repository.jcr.SimpleAmetysObjectFactory.getAmetysObjectById(SimpleAmetysObjectFactory.java:58) at org.ametys.plugins.repository.AmetysObjectResolver.resolveById(AmetysObjectResolver.java:239) at org.ametys.web.workflow.CreateContentFunction._populateAdditionalData(CreateContentFunction.java:137) ... 103 more Caused by: javax.jcr.ItemNotFoundException: a462e3c5-6bef-4ab4-b39f-7bf0bf4352cd at org.apache.jackrabbit.core.ItemManager.getItemData(ItemManager.java:384) at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:328) at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:622) at org.apache.jackrabbit.core.SessionImpl.getNodeById(SessionImpl.java:536) at org.apache.jackrabbit.core.SessionImpl.getNodeByIdentifier(SessionImpl.java:1100) at org.ametys.plugins.repository.jcr.SimpleAmetysObjectFactory.getNode(SimpleAmetysObjectFactory.java:167) ... 108 more