52North / WPS

**DEPRECATED** The 52°North Web Processing Service enables the deployment of geo-processes on the web in a standardized way.
GNU General Public License v2.0
63 stars 55 forks source link

[WPS 4.0] WPS4R complains about invalid data types #196

Open ridoo opened 9 years ago

ridoo commented 9 years ago

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:

nuest commented 9 years ago

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