Problems using "offset" parameter on events REST Service

Description

Hi,
on a brand new installation of opennms 1.10.3, I'm trying to execute the following steps and I get the attached exception:

1. Create a new group "Camera"
(Admin>Manage Provisioning Requisitions>Add new group)
2. Add a new node invoking a REST service
INPUT: <node foreign-id="2" node-label="1_19_29_40_2" xmlns="http://xmlns.opennms.org/xsd/config/model-import"/>
RetCOde: 200
Output: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><model-import xmlns="http://xmlns.opennms.org/xsd/config/model-import" non-ip-snmp-primary="N" non-ip-interfaces="false" foreign-source="Camera" date-stamp="2012-05-28T16:27:43.587+02:00"><node node-label="1_19_29_40_2" foreign-id="2"/></model-import>
3 Syncronize Group invoking this URL: /requisitions/Camera/import
4. Visualize all events: http://172.17.160.200:8980/opennms/rest/events
Returns <events totalCount="17" count="10">...
5. http://172.17.160.200:8980/opennms/rest/events?limit=10&offset=0
Returns <events totalCount="17" count="10">....
6. http://172.17.160.200:8980/opennms/rest/events?limit=10&offset=10
Returns an exception

Could you give me some information about this issue?

Best Regards,

Environment

Operative System CentOS 5.7 OpenNMS Version: 1.10.3 Java Version: 1.6.0_24 Sun Microsystems Inc. Java Virtual Machine: 19.1-b02 Sun Microsystems Inc. Operating System: Linux 2.6.18-274.el5 i386 Servlet Container: jetty/7.5.1.v20110908 (Servlet Spec 2.5) User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.52 Safari/536.5

Acceptance / Success Criteria

None

Attachments

1

Lucidchart Diagrams

Activity

Seth Leger August 7, 2012 at 4:02 PM

I've fixed this issue by adding checks for null resultsets if you increment the offset past the end of the results. Marking as fixed.

commit a9110611e51e76b0cadef74b06fa67392a7916d1

Fixed

Details

Assignee

Reporter

Due date

Components

Fix versions

Affects versions

Priority

PagerDuty

Created May 28, 2012 at 10:19 AM
Updated January 27, 2017 at 4:20 PM
Resolved August 7, 2012 at 4:02 PM