WPS icon indicating copy to clipboard operation
WPS copied to clipboard

[WPS 4.0] WPS4R complains about invalid data types

Open ridoo opened this issue 9 years ago • 1 comments

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 in org.n52.wps.server.r.debug.session
  • application/json in org.n52.wps.server.r.demo.interpolation.jsclient
  • rdata+Spatial in org.n52.wps.server.r.demo.meuse.rdata
  • rdata in org.n52.wps.server.r.enviroCar_osmMatching
  • text/csv in org.n52.wps.server.r.test.csv
  • rdata in org.n52.wps.server.r.test.rdata

ridoo avatar Sep 23 '15 06:09 ridoo

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 :-)

nuest avatar Sep 23 '15 08:09 nuest