[
https://issues.apache.org/jira/browse/STANBOL-1368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rupert Westenthaler resolved STANBOL-1368.
------------------------------------------
Resolution: Fixed
The issue was cause by three things:
1. the set language configuration was not correctly reset in the
(re)-initialization of the RESTful NLP Analysis service
2. the request for the supported languages of the RESTful NLP Analysis service
was not setting the "application/json" Accept header. So the response was some
HTML page. Because of that the parsing of the supported lanugages (a simple
regex over the string) was generating unexpected results.
The fix
1. the lanugage configuration is not set in the #activate and reset in the
#deactivate method. There is no need to repeat this when re-initialising the
remote NLP service
2. the supported languages request now sets the "Accept: application/json"
header.
fixed with http://svn.apache.org/r1617239 in 0.12 and
http://svn.apache.org/r1617241 in trunk
> Bad language configuration in RESTful NLP Analysis Engine after remote
> service was unavailable
> ----------------------------------------------------------------------------------------------
>
> Key: STANBOL-1368
> URL: https://issues.apache.org/jira/browse/STANBOL-1368
> Project: Stanbol
> Issue Type: Bug
> Components: Enhancement Engines
> Affects Versions: 0.12.0
> Reporter: Rupert Westenthaler
> Assignee: Rupert Westenthaler
> Priority: Minor
> Fix For: 1.0.0, 0.12.1
>
>
> The RESTful NLP Analyis Engine can enter a state where it sends requests for
> languages that are not supported by the remote service.
> In such cases users will see exceptions like
> {code}
> The language 'en' of the parsed text is not supported (supported: [it, es])
> at
> org.apache.stanbol.enhancer.engines.restful.nlp.impl.RestfulNlpAnalysisEngine$AnalysisResponseHandler.handleResponse(RestfulNlpAnalysisEngine.java:377)
> {code}
> Workaround: In such cases it is sufficient to restart the engine (OSGI
> component)
--
This message was sent by Atlassian JIRA
(v6.2#6252)