Bug #349
WPS for simple indices fails with SAX Exception
Status:
Resolved
Priority:
High
Assignee:
-
Start date:
03/19/2015
Due date:
% Done:
0%
Description
From a user:
In Processing section there are may climate extreme indices (WPS for simple indices) but when I tried to calculate some simple indices using example files from KNMI I’ve got “Error: SAXException: Premature end of file. for URL http://climate4impact.eu/impactportal/WPS?OUTPUT=/pywps-142661205115.xml”
History
#1 Updated by Christian Page over 7 years ago
Maybe a duplicate of bug #159?
#2 Updated by Maarten Plieger over 7 years ago
This might solve it, in impactportal.wps.WebProcessingInterface.java, line 451, method monitorProcess:
/* * It seems that the statuslocation XML file is sometimes not completely written by PyWPS, or not immediately available after the process has been executed. * Solution: Retry to read the XML file a couple of times until we have a good result. * */ int maximumTries = 10; boolean success = false; do{ maximumTries--; try{ b.parse(new URL(statusLocation)); success = true; }catch(SAXException s){ Debug.errprintln("Statuslocation does not contain valid XML, retrying..., attempts left: "+maximumTries); Thread.sleep(200); if(maximumTries == 0){ throw s; } } }while(maximumTries>0 && success == false);
#3 Updated by Maarten Plieger over 7 years ago
- Status changed from New to Resolved
Code is running at development environment http://dev.climate4impact.eu/impactportal/account/processing.jsp