Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

JIRA rest API restrict to fetch more then 1000 results

pradeep_sharma_a3 January 17, 2013

When I am trying to get results through JIRA rest api and result size is more then 1000 its giving me below error-

AxisFault

faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException

faultSubcode:

faultString: com.atlassian.jira.rpc.exception.RemoteException: Error occurred during searching: 'You are not allowed to get a result set of more than 1000 results. Current search returns 2000 results'.

faultActor:

faultNode:

faultDetail:

{}com.atlassian.jira.rpc.exception.RemoteException:null

{http://xml.apache.org/axis/}hostname:XXX

com.atlassian.jira.rpc.exception.RemoteException: Error occurred during searching: 'You are not allowed to get a result set of more than 1000 results. Current search returns 2000 results'.

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

at java.lang.Class.newInstance0(Class.java:355)

at java.lang.Class.newInstance(Class.java:308)

at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:104)

at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:90)

at com.atlassian.jira.rpc.soap.client.RemoteException.getDeserializer(RemoteException.java:75)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.apache.axis.encoding.ser.BaseDeserializerFactory.getSpecialized(BaseDeserializerFactory.java:154)

at org.apache.axis.encoding.ser.BaseDeserializerFactory.getDeserializerAs(BaseDeserializerFactory.java:84)

at org.apache.axis.encoding.DeserializationContext.getDeserializer(DeserializationContext.java:464)

at org.apache.axis.encoding.DeserializationContext.getDeserializerForType(DeserializationContext.java:547)

at org.apache.axis.message.SOAPFaultDetailsBuilder.onStartChild(SOAPFaultDetailsBuilder.java:157)

at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)

at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)

at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:377)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)

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:511)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)

at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)

at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)

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 com.atlassian.jira.rpc.soap.client.JirasoapserviceV2SoapBindingStub.getIssuesFromJqlSearch(JirasoapserviceV2SoapBindingStub.java:7415)

at org.springframework.web.servlet.mvc.AbstractFormController.showForm(AbstractFormController.java:574)

at org.springframework.web.servlet.mvc.SimpleFormController.showForm(SimpleFormController.java:198)

at org.springframework.web.servlet.mvc.SimpleFormController.showForm(SimpleFormController.java:175)

at org.springframework.web.servlet.mvc.AbstractFormController.showNewForm(AbstractFormController.java:338)

at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:278)

at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)

at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)

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:298)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)

at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

at java.lang.Thread.run(Thread.java:662)

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 17, 2013

Yes, that's a limit set because trying to retreive too many issues puts a heavy load on Jira.

You can change it in Jira if you need to, although I wouldn't recommend it, as you can kill your system with it. Start at https://confluence.atlassian.com/display/JIRAKB/Export+More+Than+1000+Results+to+Excel

I would recommend that you actually question why you want a stupidly large list of issues outside Jira with a view to doing the work inside Jira instead, or looking at the business reasons (90% of these things turn out to be a request that hasn't actually been thought through properly and is pretty pointless)

pradeep_sharma_a3 January 22, 2013

Thanks Nic

Now I am using below method of rest API and passed maxResult=1000, I filtered my results by adding add clauses into jql now.

JiraSoapService.getIssuesFromJqlSearch(token, jql, maxResult);

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 22, 2013

Excellent. Remember to stop doing this if you experience any performance or stability problems. The limit is there for a good reason.

Omar Ahmad October 13, 2015

I don't think this is a good enough solution to this problem. The REST API allows query results to be intelligently retrieved, i.e. retrieve first 1000, then second 1000 etc. However, the SOAP client does not allow this. It is fine to limit the result set to 1000, but a user should be allowed to retrieve all search results iteratively.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 13, 2015

No, paging is less than ideal. The correct solution is to analyse why you're doing it.

TAGS
AUG Leaders

Atlassian Community Events