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

Advanced search: Long with very high value is not supported

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 4.4.9, 4.5.0
    • 4.5.0
    • None
    • None
    • 4.5 RC1

      Steps to reproduce

      1. Open an advanced search.
      2. Search on a long attribute with a very long value (more than the max integer value) - like 9782273015745
      3. You get the following error:
        class java.lang.Long cannot be cast to class java.lang.Integer (java.lang.Long and java.lang.Integer are in module java.base of loader 'bootstrap')
        java.lang.ClassCastException: class java.lang.Long cannot be cast to class java.lang.Integer (java.lang.Long and java.lang.Integer are in module java.base of loader 'bootstrap')
            at org.ametys.cms.search.ui.model.impl.IndexingFieldSearchUICriterion.getLongQuery(IndexingFieldSearchUICriterion.java:505)
            at org.ametys.cms.search.ui.model.impl.IndexingFieldSearchUICriterion.getQuery(IndexingFieldSearchUICriterion.java:310)
            at org.ametys.cms.search.QueryBuilder$ValuedSearchCriterion.lambda$toQuery$0(QueryBuilder.java:575)
            at org.ametys.cms.search.advanced.TreeMaker.toQuery(TreeMaker.java:158)
            at org.ametys.cms.search.QueryBuilder$ValuedSearchCriterion.toQuery(QueryBuilder.java:582)
            at org.ametys.cms.search.QueryBuilder.lambda$getAdvancedCriteriaQuery$6(QueryBuilder.java:550)
            at org.ametys.cms.search.advanced.AdvancedQueryBuilder.lambda$build$0(AdvancedQueryBuilder.java:50)
            at org.ametys.cms.search.advanced.AbstractTreeNode.walk(AbstractTreeNode.java:55)
            at org.ametys.cms.search.advanced.AdvancedQueryBuilder.build(AdvancedQueryBuilder.java:48)
            at org.ametys.cms.search.QueryBuilder.getAdvancedCriteriaQuery(QueryBuilder.java:550)
            at org.ametys.cms.search.QueryBuilder.build(QueryBuilder.java:161)
            at org.ametys.cms.search.content.ContentSearcherFactory$SearchModelContentSearcher._searcher(ContentSearcherFactory.java:276)
            at org.ametys.cms.search.content.ContentSearcherFactory$SearchModelContentSearcher.searchWithFacets(ContentSearcherFactory.java:271)
            at org.ametys.cms.search.cocoon.SearchAction.doSearch(SearchAction.java:207)
            at org.ametys.cms.search.cocoon.SearchAction.act(SearchAction.java:137)
            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)
            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)
            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.ametys.core.ui.dispatcher.DispatchGenerator._dispatching(DispatchGenerator.java:153)
            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.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:541)
            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:688)
            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:375)
            at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
            at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
            at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1639)
            at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
            at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
            at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
            at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
            at java.base/java.lang.Thread.run(Thread.java:834)

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

              Created:
              Updated:
              Resolved: