An incompatibility has been introduced with this build. When running search when > 50 elements found. Limiting the count parameter to 50 or less works around this problem. However, existing automation will fail as it is not common to impose a result limit. Moreover, it is important to be able to find ALL elements matching the search criteria so that automation can act on each result. If you want to enforce paging support, then that should be done via REST APIs only or make the new SOAP limit much higher and some way to do the paging.

      Easily reproduced using the Atlassian CLI on an installation that finds more than 50 entries: --action getContentList --search "home"

      java.lang.UnsupportedOperationException
      	at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
      	at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
      	at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
      	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:604)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1789)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2950)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)
      	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:513)
      	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:815)
      	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:744)
      	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:128)
      	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208)
      	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:543)
      	at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
      	at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
      	at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
      	at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
      	at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
      	at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
      	at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
      	at org.apache.axis.client.Call.invoke(Call.java:2767)
      	at org.apache.axis.client.Call.invoke(Call.java:2443)
      	at org.apache.axis.client.Call.invoke(Call.java:2366)
      	at org.apache.axis.client.Call.invoke(Call.java:1812)
      	at org.swift.common.soap.confluence.ConfluenceserviceV2SoapBindingStub.search(ConfluenceserviceV2SoapBindingStub.java:4984)
      	at org.swift.confluence.cli.ConfluenceClient.addContentListFromSearch(ConfluenceClient.java:5455)
      	at org.swift.confluence.cli.ConfluenceClient.getContentListFromSearch(ConfluenceClient.java:5402)
      	at org.swift.confluence.cli.ConfluenceClient.getContentList(ConfluenceClient.java:5295)
      	at org.swift.confluence.cli.ConfluenceClient.handleRequest(ConfluenceClient.java:664)
      	at org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:124)
      	at org.swift.common.cli.CliClient.doWork(CliClient.java:393)
      	at org.swift.confluence.cli.ConfluenceClient.main(ConfluenceClient.java:150)
      

            [CONFSERVER-33445] java.lang.UnsupportedOperationException on search

            Was this ever resolved? I'm using 5.9 and 5.10 and am seeing this as well. If I modify the sort order as follows (using the DefaultPredefinedSearchBuilder):

            SearchQueryParameters params = new SearchQueryParameters();
            params.setQuery(queryString) ;
            SearchSort searchSort = new ModifiedSort(SearchSort.Order.DESCENDING);
            params.setSort(searchSort);
            ISearch search = predefinedSearchBuilder.buildSiteSearch(params, 0, getLimitValue());

            I get the error reported by @dtaylor. Am I missing something, or is there a workaround?

            Instant Search added a comment - Was this ever resolved? I'm using 5.9 and 5.10 and am seeing this as well. If I modify the sort order as follows (using the DefaultPredefinedSearchBuilder): SearchQueryParameters params = new SearchQueryParameters(); params.setQuery(queryString) ; SearchSort searchSort = new ModifiedSort(SearchSort.Order.DESCENDING); params.setSort(searchSort); ISearch search = predefinedSearchBuilder.buildSiteSearch(params, 0, getLimitValue()); I get the error reported by @dtaylor. Am I missing something, or is there a workaround?

            Update 2 - The code throwing the exception in the BooleanScorer class is:

            @Override
            public int nextDoc() {
               throw new UnsupportedOperationException();
            }
            

            so it looks like the BoostingQuery Scorer isn't expecting its internal contextScorer delegate to be a BooleanScorer. jhoarau has been in that area of the code recently so might know more than Dave L.

            David Taylor (Inactive) added a comment - Update 2 - The code throwing the exception in the BooleanScorer class is: @Override public int nextDoc() { throw new UnsupportedOperationException(); } so it looks like the BoostingQuery Scorer isn't expecting its internal contextScorer delegate to be a BooleanScorer. jhoarau has been in that area of the code recently so might know more than Dave L.

            Update - I've added a failing acceptance test PagesRpcAcceptanceTest.testSearchWithLargeResults() that reliably reproduces the problem.

            The exception is being thrown by Lucene:

            java.lang.UnsupportedOperationException
            	at org.apache.lucene.search.BooleanScorer.nextDoc(BooleanScorer.java:319)
            	at com.atlassian.confluence.search.v2.lucene.boosting.BoostingQuery$BoostingQueryScorer.nextDoc(BoostingQuery.java:192)
            	at org.apache.lucene.search.Scorer.score(Scorer.java:64)
            	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:624)
            	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:488)
            	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:444)
            	at org.apache.lucene.search.IndexSearcher.searchAfter(IndexSearcher.java:258)
            	at com.atlassian.confluence.search.v2.lucene.ScoreDocIterator.next(ScoreDocIterator.java:63)
            	at com.atlassian.confluence.search.v2.lucene.SearcherWithTokenAction.internalPerformSearchWithPostFiltering(SearcherWithTokenAction.java:160)
            	at com.atlassian.confluence.search.v2.lucene.SearcherWithTokenAction.perform(SearcherWithTokenAction.java:67)
            	at com.atlassian.confluence.search.v2.lucene.SearcherWithTokenAction.perform(SearcherWithTokenAction.java:25)
            	at com.atlassian.bonnie.LuceneConnection.withSearcher(LuceneConnection.java:387)
            	at com.atlassian.confluence.search.v2.lucene.LuceneSearchManager.search(LuceneSearchManager.java:125)
            	at com.atlassian.confluence.search.v2.lucene.LuceneSearchManager.search(LuceneSearchManager.java:118)
            	at com.atlassian.confluence.rpc.soap.services.PagesSoapService.search(PagesSoapService.java:374)
            	at com.atlassian.confluence.rpc.soap.services.PagesSoapService.search(PagesSoapService.java:403)
            	at com.atlassian.confluence.rpc.soap.XhtmlSoapService.search(XhtmlSoapService.java:529)
            	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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
            	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
            	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
            	at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16)
            	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
            	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
            	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
            	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
            	at com.sun.proxy.$Proxy2087.search(Unknown Source)
            	at com.atlassian.confluence.rpc.xmlrpc.ConfluenceXmlRpcHandlerImpl.search(ConfluenceXmlRpcHandlerImpl.java:479)
            	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)
            

            Lucene has been upgraded from 4.3.0 to 4.4.0 recently by dave@atlassian.com which may have something to do with the 50 limit.

            David Taylor (Inactive) added a comment - Update - I've added a failing acceptance test PagesRpcAcceptanceTest.testSearchWithLargeResults() that reliably reproduces the problem. The exception is being thrown by Lucene: java.lang.UnsupportedOperationException at org.apache.lucene.search.BooleanScorer.nextDoc(BooleanScorer.java:319) at com.atlassian.confluence.search.v2.lucene.boosting.BoostingQuery$BoostingQueryScorer.nextDoc(BoostingQuery.java:192) at org.apache.lucene.search.Scorer.score(Scorer.java:64) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:624) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:488) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:444) at org.apache.lucene.search.IndexSearcher.searchAfter(IndexSearcher.java:258) at com.atlassian.confluence.search.v2.lucene.ScoreDocIterator.next(ScoreDocIterator.java:63) at com.atlassian.confluence.search.v2.lucene.SearcherWithTokenAction.internalPerformSearchWithPostFiltering(SearcherWithTokenAction.java:160) at com.atlassian.confluence.search.v2.lucene.SearcherWithTokenAction.perform(SearcherWithTokenAction.java:67) at com.atlassian.confluence.search.v2.lucene.SearcherWithTokenAction.perform(SearcherWithTokenAction.java:25) at com.atlassian.bonnie.LuceneConnection.withSearcher(LuceneConnection.java:387) at com.atlassian.confluence.search.v2.lucene.LuceneSearchManager.search(LuceneSearchManager.java:125) at com.atlassian.confluence.search.v2.lucene.LuceneSearchManager.search(LuceneSearchManager.java:118) at com.atlassian.confluence.rpc.soap.services.PagesSoapService.search(PagesSoapService.java:374) at com.atlassian.confluence.rpc.soap.services.PagesSoapService.search(PagesSoapService.java:403) at com.atlassian.confluence.rpc.soap.XhtmlSoapService.search(XhtmlSoapService.java:529) 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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy2087.search(Unknown Source) at com.atlassian.confluence.rpc.xmlrpc.ConfluenceXmlRpcHandlerImpl.search(ConfluenceXmlRpcHandlerImpl.java:479) 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) Lucene has been upgraded from 4.3.0 to 4.4.0 recently by dave@atlassian.com which may have something to do with the 50 limit.

            Reproduced locally on 5.5-stable branch. I can confirm that rpc.search("home", 50) works and rpc.search("home", 51) fails with an UnsupportedOperationException.

            Looking for the cause of that exception now.

            David Taylor (Inactive) added a comment - Reproduced locally on 5.5-stable branch. I can confirm that rpc.search("home", 50) works and rpc.search("home", 51) fails with an UnsupportedOperationException. Looking for the cause of that exception now.

            Hi Bob.

            This is on the backlog for our API team. I'm not sure of the exact status right now, cpetchell may be able to give us a clearer idea of where this is at.

            Regards
            Steve Haffenden
            Confluence Bugmaster
            Atlassian

            Steve Haffenden (Inactive) added a comment - Hi Bob. This is on the backlog for our API team. I'm not sure of the exact status right now, cpetchell may be able to give us a clearer idea of where this is at. Regards Steve Haffenden Confluence Bugmaster Atlassian

            Bob Swift added a comment -

            What is the status of this? There really isn't a workaround for automation that uses this capability. The new rest apis don't support content search, so I can't provide a workaround either.

            Bob Swift added a comment - What is the status of this? There really isn't a workaround for automation that uses this capability. The new rest apis don't support content search, so I can't provide a workaround either.

            Bob Swift added a comment - - edited

            That is fine. Yes, I am pretty sure it was working on build 4993 which I think was beta1. I have a Bamboo test that failed on rc1 and the same test seemed to be ok earlier and that log shows the Confluence build was 4993.

            Bob Swift added a comment - - edited That is fine. Yes, I am pretty sure it was working on build 4993 which I think was beta1. I have a Bamboo test that failed on rc1 and the same test seemed to be ok earlier and that log shows the Confluence build was 4993.

            Hi Bob

            Thanks for taking the time to raise this issue. I'm going to drop this down to a major as the impact of the error does not cause Confluence to stop working.

            Could you confirm that this was working prior to Confluence 5.5 beta 1?

            Regards
            Steve Haffenden
            Confluence Bugmaster
            Atlassian

            Steve Haffenden (Inactive) added a comment - Hi Bob Thanks for taking the time to raise this issue. I'm going to drop this down to a major as the impact of the error does not cause Confluence to stop working. Could you confirm that this was working prior to Confluence 5.5 beta 1? Regards Steve Haffenden Confluence Bugmaster Atlassian

              dave@atlassian.com dave (Inactive)
              bob.swift@charter.net Bob Swift
              Affected customers:
              0 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: