javauniverseu2uniobjects

Getting a select list from an alternate index with selectMatchingAK return a "The RPC failed" error


I'm trying to use an alternate index to get records id from a file using uniobject and java.

UniFile uFile = uSession.open("EC_WORK_ORDER_REQUEST_STATUS");  
UniSelectList uSelect = uSession.selectList(0);  
uSelect.selectMatchingAK(uFile, "EC_WORK_ORDER_REQUEST_ID", "12547");

But I'm getting the following error at run time :

asjava.uniobjects.UniSelectListException: The RPC failed
    at asjava.uniobjects.UniSelectList.doAKSelect(UniSelectList.java:568)
    at asjava.uniobjects.UniSelectList.selectMatchingAK(UniSelectList.java:511)
    at cezinc.unitest.TestUniobject.main(TestUniobject.java:134) 

Running the following in UniVerse's TCL works.

>SELECT EC_WORK_ORDER_REQUEST_STATUS WITH EC_WORK_ORDER_REQUEST_ID = 12547

3 record(s) selected to SELECT list #0.

And here's the specs of the index :

>LIST.INDEX EC_WORK_ORDER_REQUEST_STATUS
Index name(s):  EC_WORK_ORDER_REQUEST_ID
Alternate Key Index Summary for file EC_WORK_ORDER_REQUEST_STATUS
File........... EC_WORK_ORDER_REQUEST_STATUS
Indices........ 1 (0 A-type, 0 C-type, 1 D-type, 0 I-type, 0 SQL, 0 S-type)
Index Updates.. Enabled, No updates pending

Index name      Type  Build    Nulls  In DICT  S/M  Just Unique Field num/I-type
EC_WORK_ORDER_RE D    Not Reqd  No     Yes      S    R     N    1

What I'm doing wrong?


Solution

  • The problem was a old version of the OniObjects library. According to Rocket Software, the issue was addressed in September 2015.

    Installing the latest version of the U2 Client Tools (October 2016) solved the problem.