2
votes

I have a java servlet that works as a REST service. My data is delivered through a categorized view with 3 categorized columns.

I create a view navigator using the View.createViewNavFromCategory("2014\43") where the category specified adheres to the first two categorized columns.

2014 = year and 43 = week number, which means there can be up to 53 second column categories.

My categorized columns are sorted decending. For some strange reason I found that all columns had to be sorted the same way (undocumented).

My code:

        String viewCategory = "";
        if (isYearSpecified) viewCategory = <year parameter>;
        if (isWeekSpecified) viewCategory = viewCategory + "\\" + <week parameter>;
        ViewNavigator nav = lookupView.createViewNavFromCategory(viewCategory);

        //and set the size of the preloading cache: 
        nav.setBufferMaxEntries(numCacheEntries); 

        // Initialize list of JSON income objects
        List prognosisJSON = new ArrayList();

        //and then traverse the view: 
        ViewEntry currEntry = nav.getFirst(); 

This works as a charm until I specify a week lower than 13. If using category "2014\12", "2014\11" and lower the viewEntry returns null when trying to access the first entry in the navigator.

I should perhaps add that my view contains 2102 documents in categories before the one that fails (if there is an undocumented max limit).

What can I do to prevent this?

1
What version ofd Domino is this? - Richard Schwartz
Hi Richard. I'm using Domino 9.0.1 FP3. - Ove Stoerholt
There's a wiki doc from (I think) 8.5.3 that describes some caching capabilities in NotesViewNavigator. Unfortunately the link doesn't seem to be working rigfht now. www-10.lotus.com/ldd/ddwiki.nsf/dx/… From what I can pick up from pages that link to it, there's a property NotesViewNavigator.BufferMaxEntries. Perhaps playing with that value might help you. - Richard Schwartz
I'have tried the BufferMaxEntries already. I had it set to 400 and tried to double this just to check if it made any difference. Unfortunately it didn't... - Ove Stoerholt
I just tested accessing the samt view category using Lotusscript. No problem there... - Ove Stoerholt

1 Answers

1
votes

I suspect you're hitting this problem http://www.intec.co.uk/apparent-java-getalldocumentsbykey-getallentriesbykey-bug/. The fact it works in LotusScript and the keys you're looking for sound suspicious. To completely confirm it, it should also fail in a Java agent. The latest I had was that this was planned for 9.0.2. If so, in the mean time, changing the columns to text instead of number will solve the problem.