Uploaded image for project: 'User Directory'
  1. User Directory
  2. UD-58

Cannot create a virtual page hierarchy if one value is missing for the classification metadata

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Labels:
      None

      Description

      I set the root page with a classification metadata for which some content do not have a corresponding value, and then I got the following stacktrace when trying to display the virtual pages in the sitemap tool.
      If I refresh the sitemap tool, I cannot get any page

      Relevant stacktrace:

      Caused by: org.ametys.plugins.repository.metadata.UnknownMetadataException: javax.jcr.PathNotFoundException: ametys:firstname
      	at org.ametys.plugins.repository.metadata.jcr.JCRCompositeMetadata._getString(JCRCompositeMetadata.java:373)
      	at org.ametys.plugins.repository.metadata.jcr.JCRCompositeMetadata.getString(JCRCompositeMetadata.java:338)
      	at org.ametys.plugins.userdirectory.UserDirectoryPageHandler._getClassificationMetadata(UserDirectoryPageHandler.java:446)
      	at org.ametys.plugins.userdirectory.UserDirectoryPageHandler.getTransformedClassificationMetadataValue(UserDirectoryPageHandler.java:282)
      	at org.ametys.plugins.userdirectory.UserDirectoryPageHandler.lambda$_initializeCaches$2(UserDirectoryPageHandler.java:335)
      	at org.ametys.plugins.userdirectory.UserDirectoryPageHandler$$Lambda$139/1079941432.apply(Unknown Source)
      	at java.util.stream.Collectors.lambda$toMap$164(Collectors.java:1321)
      	at java.util.stream.Collectors$$Lambda$40/328931831.accept(Unknown Source)
      	at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
      	at java.util.Iterator.forEachRemaining(Iterator.java:116)
      	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502)
      	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
      	at org.ametys.plugins.userdirectory.UserDirectoryPageHandler._initializeCaches(UserDirectoryPageHandler.java:333)
      	at org.ametys.plugins.userdirectory.UserDirectoryPageHandler.getTransitionalPagesName(UserDirectoryPageHandler.java:299)
      	at org.ametys.plugins.userdirectory.page.VirtualUserDirectoryPageFactory.getChildren(VirtualUserDirectoryPageFactory.java:100)
      	at org.ametys.plugins.repository.AmetysObjectResolver.resolveVirtualChildren(AmetysObjectResolver.java:554)
      	at org.ametys.plugins.repository.jcr.TraversableAmetysObjectHelper.getChildren(TraversableAmetysObjectHelper.java:226)
      	at org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObjectFactory.getChildren(DefaultTraversableAmetysObjectFactory.java:63)
      	at org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObject.getChildren(DefaultTraversableAmetysObject.java:74)
      	at org.ametys.web.repository.page.jcr.DefaultPage.getChildrenPages(DefaultPage.java:555)
      	at org.ametys.web.repository.page.jcr.DefaultPage.getChildrenPages(DefaultPage.java:548)
      	at org.ametys.web.cocoon.SitemapAction.pagescontainer2json(SitemapAction.java:166)
      	at org.ametys.web.cocoon.SitemapAction.act(SitemapAction.java:89)
      	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)
      	... 95 more
      Caused by: javax.jcr.PathNotFoundException: ametys:firstname
      	at org.apache.jackrabbit.core.NodeImpl$11.perform(NodeImpl.java:2265)
      	at org.apache.jackrabbit.core.NodeImpl$11.perform(NodeImpl.java:2252)
      	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.getProperty(NodeImpl.java:2252)
      	at org.ametys.plugins.repository.metadata.jcr.JCRCompositeMetadata._getString(JCRCompositeMetadata.java:351)
      	... 132 more
      

        Attachments

          Activity

            People

            • Assignee:
              sprieul Simon Prieul
              Reporter:
              trizzi Thibaut Rizzi (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: