Uploaded image for project: 'Offre de formation'
  1. Offre de formation
  2. ODF-3282

Catalogue par défaut supprimé

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 4.7.5, 4.8.0
    • 4.5.9, 4.6.0
    • None
    • None
    • 4.8.0 M4

      A la suppression du catalogue est défini par défaut, la notion de par défaut n'est pas remise à null. Elle n'est pas non plus recalculée car renseignée. Et si jamais on redémarre le serveur, le fait qu'il n'y ait aucun catalogue par défaut et qu'il y ait plusieurs catalogues est très mal géré.
      Il est aussi impossible de sélectionner un nouveau catalogue par défaut, car en JS, et en Java, on chercher à récupérer l'ancien catalogue par défaut avant l'opération, ça fait des étincelles.

      2022-10-10 15:53:31,343 ERROR [org.ametys.plugins.core.ui] (http-nio-8080-exec-77;/plugins/core-ui/servercomm/messages.xml) Can not dispatch request '2' : 'core-ui' 'client-call' '{role=org.ametys.odf.catalog.CatalogsManager, methodName=getDefaultCatalogName, parameters=[]}'
      org.apache.cocoon.util.location.LocatedException: Can not dispatch request '2' : 'core-ui' 'client-call' '{role=org.ametys.odf.catalog.CatalogsManager, methodName=getDefaultCatalogName, parameters=[]}'
      	at org.ametys.core.ui.dispatcher.DispatchGenerator._dispatching(DispatchGenerator.java:198)
      	at org.ametys.core.ui.dispatcher.DispatchGenerator.generate(DispatchGenerator.java:95)
      	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:581)
      	at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:301)
      	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:483)
      	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.ametys.runtime.servlet.RuntimeServlet.service(RuntimeServlet.java:580)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
      	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
      	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
      	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.base/java.lang.Thread.run(Thread.java:833)
      Caused by: org.apache.excalibur.source.SourceException: Cannot get input stream for cocoon://_plugins/core-ui/client-call?role=org.ametys.odf.catalog.CatalogsManager&methodName=getDefaultCatalogName&
      	at org.apache.cocoon.components.source.impl.SitemapSource.getInputStream(SitemapSource.java:253)
      	at org.ametys.core.ui.dispatcher.DispatchGenerator._dispatching(DispatchGenerator.java:157)
      	... 69 more
      Caused by: org.xml.sax.SAXException: Could not get sitemap source cocoon://_plugins/core-ui/client-call?role=org.ametys.odf.catalog.CatalogsManager&methodName=getDefaultCatalogName&
      org.apache.cocoon.ProcessingException: Sitemap: error when calling sub-sitemap
      	at <map:mount> - resource://org/ametys/runtime/kernel/sitemap.xmap:152: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:68)
      	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.core.ui.dispatcher.DispatchGenerator._dispatching(DispatchGenerator.java:153)
      	... 69 more
      Caused by: org.apache.cocoon.ProcessingException: Sitemap: error when calling sub-sitemap
      	at <map:mount> - resource://org/ametys/runtime/kernel/sitemap.xmap:152: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)
      	... 77 more
      Caused by: java.lang.reflect.InvocationTargetException
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
      	at org.ametys.core.ui.ExecuteClientCallsAction._executeMethod(ExecuteClientCallsAction.java:204)
      	at org.ametys.core.ui.ExecuteClientCallsAction.act(ExecuteClientCallsAction.java:182)
      	at org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:120)
      	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)
      	... 87 more
      Caused by: org.ametys.plugins.repository.UnknownAmetysObjectException: There's no node for id catalog://f2999651-bdf2-4a09-9191-834086e112fe
      	at org.ametys.plugins.repository.jcr.SimpleAmetysObjectFactory.getNode(SimpleAmetysObjectFactory.java:187)
      	at org.ametys.plugins.repository.jcr.SimpleAmetysObjectFactory.getAmetysObjectById(SimpleAmetysObjectFactory.java:137)
      	at org.ametys.plugins.repository.jcr.SimpleAmetysObjectFactory.getAmetysObjectById(SimpleAmetysObjectFactory.java:126)
      	at org.ametys.plugins.repository.jcr.SimpleAmetysObjectFactory.getAmetysObjectById(SimpleAmetysObjectFactory.java:58)
      	at org.ametys.plugins.repository.AmetysObjectResolver.resolveById(AmetysObjectResolver.java:317)
      	at org.ametys.odf.catalog.CatalogsManager.getDefaultCatalog(CatalogsManager.java:207)
      	at org.ametys.odf.catalog.CatalogsManager.getDefaultCatalogName(CatalogsManager.java:192)
      	... 104 more
      Caused by: javax.jcr.ItemNotFoundException: f2999651-bdf2-4a09-9191-834086e112fe
      	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:621)
      	at org.apache.jackrabbit.core.SessionImpl.getNodeById(SessionImpl.java:538)
      	at org.apache.jackrabbit.core.SessionImpl.getNodeByIdentifier(SessionImpl.java:1142)
      	at org.ametys.plugins.repository.jcr.SimpleAmetysObjectFactory.getNode(SimpleAmetysObjectFactory.java:176)
      	... 110 more
      Caused by: org.apache.jackrabbit.core.state.NoSuchItemStateException: f2999651-bdf2-4a09-9191-834086e112fe
      	at org.apache.jackrabbit.core.state.SharedItemStateManager.getItemState(SharedItemStateManager.java:290)
      	at org.apache.jackrabbit.core.state.LocalItemStateManager.getNodeState(LocalItemStateManager.java:110)
      	at org.apache.jackrabbit.core.state.LocalItemStateManager.getItemState(LocalItemStateManager.java:175)
      	at org.apache.jackrabbit.core.state.XAItemStateManager.getItemState(XAItemStateManager.java:260)
      	at org.apache.jackrabbit.core.state.SessionItemStateManager.getItemState(SessionItemStateManager.java:161)
      	at org.apache.jackrabbit.core.ItemManager.getItemData(ItemManager.java:382)
      	... 115 more
      Caused by: org.apache.jackrabbit.core.state.NoSuchItemStateException: f2999651-bdf2-4a09-9191-834086e112fe
      	at org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.load(AbstractBundlePersistenceManager.java:492)
      	at org.ametys.plugins.repository.provider.AmetysPersistenceManager.load(AmetysPersistenceManager.java:192)
      	at org.apache.jackrabbit.core.state.SharedItemStateManager.loadItemState(SharedItemStateManager.java:1878)
      	at org.apache.jackrabbit.core.state.SharedItemStateManager.getNonVirtualItemState(SharedItemStateManager.java:1798)
      	at org.apache.jackrabbit.core.state.SharedItemStateManager.getItemState(SharedItemStateManager.java:271)
      	... 120 more

      Il faudrait peut être interdire de supprimer un catalogue par défaut. Mais quand bien même il faut aussi savoir gérer une valeur de catalogue non définie dans le manager dédié.

            bmaurel Bérénice Maurel
            bmaurel Bérénice Maurel
            Bérénice Maurel Bérénice Maurel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: