You are viewing limited content. For full access, please sign in.

Question

Question

The specified operation was aborted by the user.

SDK
asked on December 9, 2016 Show version history

So I swear this used to work just fine...but now the following code throws the error above.  Does anyone see what I'm doing wrong?

/**
 * Looks for a document by memberNumber
 *
 * @param session
 * @param memberNumber
 */
public SearchResultListing searchForDocumentByMemberNumber(Session session, String memberNumber) throws Exception {
    session = ConnectionResourcePool.INSTANCE.acquire(Arrays.asList(new String[] {"Nathan"}), Arrays.asList(new String[] {"nathan"})).getSession();
    Search searchForDocument = new Search(session);
    searchForDocument.setCommand("{[Members]:[MemberNumber]=\"" + memberNumber + "*\"}");
    searchForDocument.run();
    EntryListingSettings entryListingSettings = new EntryListingSettings();
    ColumnSpecifierCollection columnSpecifierCollection = new ColumnSpecifierCollection();
    columnSpecifierCollection.add(SystemColumn.CreationDate);
    columnSpecifierCollection.add(SystemColumn.CreatorName);
    columnSpecifierCollection.add(SystemColumn.Id);
    columnSpecifierCollection.add(SystemColumn.Name);
    columnSpecifierCollection.add(SystemColumn.Tags);
    columnSpecifierCollection.add(SystemColumn.TemplateId);
    columnSpecifierCollection.add(SystemColumn.TemplateName);
    entryListingSettings.setColumns(columnSpecifierCollection);
    SearchResultListing searchResultListing = searchForDocument.getResult(entryListingSettings);
    LOGGER.log(Level.FINE, "Number of documents found: " + searchResultListing.getRowCount());
    return searchResultListing;
}

 

The error is thrown on the searchForDocument.getResult(entryListingSettings); line.

 

This is the full stack trace:

 

com.laserfiche.repositoryaccess.LaserficheRepositoryException: The specified operation was aborted by the user.

    at com.laserfiche.repositoryaccess.ProtocolUtil.decodeError(ProtocolUtil.java:105)
    at com.laserfiche.repositoryaccess.ProtocolUtil.decodeError(ProtocolUtil.java:114)
    at com.laserfiche.repositoryaccess.EntryListingBase.getRowsetData(EntryListingBase.java:578)
    at com.laserfiche.repositoryaccess.EntryListingBase.<init>(EntryListingBase.java:42)
    at com.laserfiche.repositoryaccess.SearchResultListing.<init>(SearchResultListing.java:12)
    at com.laserfiche.repositoryaccess.Search.getResult(Search.java:444)

 

I put a breakpoint in the code and I can see in the laserfiche SDK code that it's a 9052 error #.  I have no idea what that means.  Is there some reference documentation that lists all the error codes and their meanings?

0 0

Answer

SELECTED ANSWER
replied on December 9, 2016

Ok, figured it out.  One of my fellow co-workers had changed the template names.  So there no longer existed a template called 'Members' it was now just 'Member'.

So I guess in the parsing of the 

setCommand("{[Members]:[MemberNumber]=\"" + memberNumber + "*\"}");

be aware that if some of it is inaccurate you can get an aborted operation and not a  template not found exception or no results found exception (either of which would have been more helpful)

1 0

Replies

replied on December 9, 2016

I don't have an answer for you, but error code 9052 just means "canceled".  RA has an ErrorCodes enum that gives named values for the numbers, and I assume JRA has something equivalent.

1 0
replied on December 9, 2016

After you mentioned this I went looking.  There is a resource bundle for the JRA stuff "repositoryaccess.properties" and it lists the error #'s with their associated messages.

ERR9052 The specified operation was aborted by the user.

So that's where the message text itself is coming from...still not very helpful as to the root cause.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.