cancel
Showing results for 
Search instead for 
Did you mean: 

Webscript: Error with searchService

jay21
Champ in-the-making
Champ in-the-making

Hi,

I am encounterning a strange issue.

I have a simple webscript that searces for a parameter in the URL. Following is my code: Error is on execution of search

String id = templateVars.get("id");
SearchParameters sp = new SearchParameters();
;
sp.setLanguage(SearchService.LANGUAGE_LUCENE);
sp.setQuery(id);
sp.addStore(new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore"));

ResultSet results = searchService.query(sp);
if (results != null && results.length() <= 0) {
throw new WebScriptException(HttpServletResponse.SC_NOT_FOUND, "Unable to find " + objectId);
}

Error Below

/alfresco-api/pre/SearchService/query/args/searchParameters={lang=lucene, query=xxxxxxxx, stores=[workspace://SpacesStore], defaultFTSOp=OR, defaultFTSFieldOp=OR}
2021-08-23 17:56:46,641 ERROR [extensions.webscripts.AbstractRuntime] [ajp-nio-8009-exec-1] Exception from executeScript: 07230000 Wrapped Exception (with status template): access denied ("java.net.SocketPermission" "localhost:0" "listen,resolve")

1 ACCEPTED ANSWER

abhinavmishra14
World-Class Innovator
World-Class Innovator

Consider using amp if you have dependencies in your custom modules.

See details here: https://docs.alfresco.com/content-services/latest/develop/extension-packaging/

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

View answer in original post

5 REPLIES 5