Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TAP service returns an invalid error document, which is not parsable.
When running the TAP query with a syntax error in 'async' mode, e.g. "SELECT TOP 1000 FROM TAP_SCHEMA.schemas" (missing ''), The error page created would include two INFO element, namely, 'CAUSES' and 'ORIGIN_STACK_TRACE', as follows:
- Encountered "FROM". Was expecting one of: "(" "+" "-" "" "AVG" "MAX" "MIN" "SUM" "COUNT" "BOX" "CENTROID" "CIRCLE" "POINT" "POLYGON" "REGION" "CONTAINS" "INTERSECTS" "AREA" "COORD1" "COORD2" "COORDSYS" "DISTANCE" "ABS" "CEILING" "DEGREES" "EXP" "FLOOR" "LOG" "LOG10" "MOD" "PI" "POWER" "RADIANS" "RAND" "ROUND" "SQRT" "TRUNCATE" "ACOS" "ASIN" "ATAN" "ATAN2" "COS" "COT" "SIN" "TAN" "'" <SCIENTIFIC_NUMBER> <UNSIGNED_FLOAT> <UNSIGNED_INTEGER> """ <REGULAR_IDENTIFIER_CANDIDATE> <REGULAR_IDENTIFIER_CANDIDATE> """
(HINT: "FROM" is a reserved ADQL word. To use it as a column/table/schema name/alias, write it between double quotes.)
adql.parser.ParseException: Encountered "FROM". Was expecting one of: "(" "+" "-" "*" "AVG" "MAX" "MIN" "SUM" "COUNT" "BOX" "CENTROID" "CIRCLE" "POINT" "POLYGON" "REGION" "CONTAINS" "INTERSECTS" "AREA" "COORD1" "COORD2" "COORDSYS" "DISTANCE" "ABS" "CEILING" "DEGREES" "EXP" "FLOOR" "LOG" "LOG10" "MOD" "PI" "POWER" "RADIANS" "RAND" "ROUND" "SQRT" "TRUNCATE" "ACOS" "ASIN" "ATAN" "ATAN2" "COS" "COT" "SIN" "TAN" "'" <SCIENTIFIC_NUMBER> <UNSIGNED_FLOAT> <UNSIGNED_INTEGER> """ <REGULAR_IDENTIFIER_CANDIDATE> <REGULAR_IDENTIFIER_CANDIDATE> """
(HINT: "FROM" is a reserved ADQL word. To use it as a column/table/schema name/alias, write it between double quotes.)
at adql.parser.ADQLParser.generateParseException(ADQLParser.java:6320)
at adql.parser.ADQLParser.jj_consume_token(ADQLParser.java:6180)
at adql.parser.ADQLParser.SelectItem(ADQLParser.java:1318)
at adql.parser.ADQLParser.Select(ADQLParser.java:1162)
at adql.parser.ADQLParser.QueryExpression(ADQLParser.java:1051)
at adql.parser.ADQLParser.Query(ADQLParser.java:1010)
at adql.parser.ADQLParser.parseQuery(ADQLParser.java:451)
at tap.ADQLExecutor.parseADQL(ADQLExecutor.java:571)
at tap.ADQLExecutor.start(ADQLExecutor.java:366)
at tap.ADQLExecutor.start(ADQLExecutor.java:226)
at tap.AsyncThread.jobWork(AsyncThread.java:81)
at uws.job.JobThread.run(JobThread.java:430)
These two INFO elements contain free text that is not parsable by the xml parser, resulting in an error. You can try this out on TOPCAT.
The error I am getting from the parser is
The element type "REGULAR_IDENTIFIER" must be terminated by the matching end-tag "</REGULAR_IDENTIFIER>".
To fix it, CDATA (Character Data that should not be interpreted as XML markup) should be used around all free text:
or whatever ]]>