WPS
WPS copied to clipboard
[WPS 4.0] WPS4R complains about invalid data types
Not sure what I am missing here, I assume this had been working before WPS 4.0:
I get exceptions like this:
ERROR org.n52.wps.server.r.metadata.RAnnotationParser: Invalid R algorithm 'org.n52.wps.server.r.debug.session'. Script validation failed when executing process description creator.
org.n52.wps.server.r.syntax.RAnnotationException: Invalid datatype key for R script annotations: text/x-markdown
at org.n52.wps.server.r.data.RDataTypeRegistry.getType(RDataTypeRegistry.java:100) ~[52n-wps-r-4.0.0-SNAPSHOT.jar:na]
with a follow-up exception
ERROR org.n52.wps.server.r.ScriptFileRepository: invalid script content: No annotations found
ERROR org.n52.wps.server.r.LocalRAlgorithmRepository: Could not load algorithm 'org.n52.wps.server.r.debug.session'
org.n52.wps.server.r.util.InvalidRScriptException: Invalid script content.
at org.n52.wps.server.r.ScriptFileRepository.validateScriptFile(ScriptFileRepository.java:150) ~[52n-wps-r-4.0.0-SNAPSHOT.jar:na]
The unknown datatypes are:
-
text/x-markdown
inorg.n52.wps.server.r.debug.session
-
application/json
inorg.n52.wps.server.r.demo.interpolation.jsclient
-
rdata+Spatial
inorg.n52.wps.server.r.demo.meuse.rdata
-
rdata
inorg.n52.wps.server.r.enviroCar_osmMatching
-
text/csv
inorg.n52.wps.server.r.test.csv
-
rdata
inorg.n52.wps.server.r.test.rdata
Some of them seem to be defined in the R_Datatype.conf file > https://github.com/52North/WPS/blob/dev/52n-wps-webapp/src/main/webapp/R/R_Datatype.conf (in Java these are "custom data types")
As discussed offline, I would vote for having only one place to define how to handle datatypes, and right now it happens in the linked file and the Java class https://github.com/52North/WPS/blob/dev/52n-wps-r/src/main/java/org/n52/wps/server/r/data/RDataType.java
Hope this gives you a hint for the next debug point :-)