sparna-git / skos-play

SKOS-Play allows to print SKOS files in HTML or PDF. It also embeds xls2rdf to generate RDF from Excel.
http://labs.sparna.fr/skos-play
GNU Lesser General Public License v3.0
67 stars 12 forks source link

Avoid Server Error 500 if there are cycles in the hierarchy #44

Open AndyClifton opened 3 years ago

AndyClifton commented 3 years ago

I'm getting this 500 error when I try to visualise or print my file at https://labs.sparna.fr/skos-play/upload.

I can click upload and then generate some documents, but the visualise options fail.

e.g. I select english (my file is multilingual) and "tree visualisation". Then I get...

##HTTP Status 500 – Internal Server Error
Type Exception Report

Message Handler processing failed; nested exception is java.lang.StackOverflowError

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

## Exception

org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.StackOverflowError
    org.springframework.web.servlet.DispatcherServlet.triggerAfterCompletionWithError(DispatcherServlet.java:1287)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:961)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
    org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
    org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:742)

Is this related to #41?

tfrancart commented 3 years ago

You have a cycle in your concept hierarchy. Check with the SKOS testing tool at https://labs.sparna.fr/skos-testing-tool/test?url=https://raw.githubusercontent.com/IEA-Wind-Task-32/wind-lidar-glossary/main/glossary.ttl&rules=anr,chr,dcc,dlv,el,hr,husv,ilc,ipl,ml,mri,ncl,oc,oilt,ol,otc,rc,rrc,strc,tchbc,uc,ucil,urc,usr,var&format=html

AndyClifton commented 3 years ago

Ok, thanks! I fixed that and it seems to work.

I had assumed that the visualisation tool would check the input file. I hadn’t expected a bad file to cause an exception.