Closed m1ci closed 8 years ago
Thanks for reporting this. Never seen this behavior so far. I'll have a look as soon as possible.
I used the file attached to https://github.com/freme-project/freme-ner/issues/76 https://github.com/freme-project/freme-ner/files/133952/SB50.zip and processed it with 1) e-entity and output turtle: works as exected 2) e-entity and output html: gives he error reported here with this error message
{"timestamp":1455733543376,"status":500,"error":"Internal Server Error","exception":"java.lang.StringIndexOutOfBoundsException","message":"String index out of range: -14","path":"/e-entity/freme-ner/documents"}
3) e-Terminology and output turtle or html: both work as expected - html as well. output-e-terminology-as-html-issue-35.txt
Not sure if this helps, but 3) shows that this works with other e-services, so maybe the issue is on how things come back from freme-ner to e-internationalisation.
I tested it and I can reproduce the bug. I also checked the log files on FREME dev. They say
ERROR 2016-02-18 09:21:49,902 [http-nio-8084-exec-5] org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception
java.lang.StringIndexOutOfBoundsException: String index out of range: -14
at java.lang.String.substring(String.java:1967)
at eu.freme.i18n.okapi.nif.converter.HTMLBackConverter.convertBack(HTMLBackConverter.java:127)
at eu.freme.i18n.okapi.nif.converter.HTMLBackConverter.convertBack(HTMLBackConverter.java:105)
at eu.freme.i18n.okapi.nif.converter.HTMLBackConverter.convertBack(HTMLBackConverter.java:75)
at eu.freme.i18n.api.EInternationalizationAPI.convertBack(EInternationalizationAPI.java:81)
at eu.freme.broker.tools.internationalization.ConversionHttpServletResponseWrapper.writeBackToClient(ConversionHttpServletResponseWrapper.java:61)
at eu.freme.broker.tools.internationalization.EInternationalizationFilter.doFilter(EInternationalizationFilter.java:299)
So we can see that the bug originates from within e-Internationalization. You can also see that it happens when the turtle is converted back to HTML.
Thanks, Jan. It's still unclear to me why this works with other HTML documents and e-Entity roundtripping, and why it works with e-Terminology and the same HTML document.
Hi,
I don't know if this is really related, but I get the same error when running this call.
The context being that I'm using the CKEditor Plugin to perform linking against a custom dataset.
This problem is fixed.
This issue was reported by @pheyvaer and moved from https://github.com/freme-project/freme-ner/issues/78
The same call as in issue #76, however this time we ask to output the result using text/html. However, we get the following error
What exactly is the problem here?
P.S. According to the w3 validator our document is valid (beside some deprecated elements, however, that should not make a difference I think).