com.atlassian.confluence.api.service.exceptions.unchecked.NotImplementedServiceException: OR clauses are unsupported in parsing to REST

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • The space picker in the CQLUX allows a mix of Space categories and Spaces, so the resultant CQL could be something like: {code} (space = 'FOO' or space.type = 'global') {code} When reloading a CQL parameter into the macro browser, a request is made to the CQLMetaDataResource to split the CQL string into expressions that can be loaded into UI fields. Right now, a request with the CQL example above will result in the following stacktrace: {code} com.atlassian.confluence.api.service.exceptions.unchecked.NotImplementedServiceException: OR clauses are unsupported in parsing to REST at com.atlassian.confluence.plugins.cql.impl.CQLtoRESTParseTreeVisitor.visitOrClause(CQLtoRESTParseTreeVisitor.java:63) at com.atlassian.confluence.plugins.cql.impl.CQLtoRESTParseTreeVisitor.visitOrClause(CQLtoRESTParseTreeVisitor.java:30) at com.atlassian.querylang.antlrgen.AqlParser$OrClauseContext.accept(AqlParser.java:813) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:72) at com.atlassian.querylang.antlrgen.AqlBaseVisitor.visitClause(AqlBaseVisitor.java:436) at com.atlassian.confluence.plugins.cql.impl.CQLtoRESTParseTreeVisitor.visitSubClause(CQLtoRESTParseTreeVisitor.java:95) at com.atlassian.confluence.plugins.cql.impl.CQLtoRESTParseTreeVisitor.visitNotClause(CQLtoRESTParseTreeVisitor.java:84) at com.atlassian.confluence.plugins.cql.impl.CQLtoRESTParseTreeVisitor.visitAndClause(CQLtoRESTParseTreeVisitor.java:75) at com.atlassian.confluence.plugins.cql.impl.CQLtoRESTParseTreeVisitor.visitOrClause(CQLtoRESTParseTreeVisitor.java:65) at com.atlassian.confluence.plugins.cql.impl.CQLtoRESTParseTreeVisitor.visitOrClause(CQLtoRESTParseTreeVisitor.java:30) at com.atlassian.querylang.antlrgen.AqlParser$OrClauseContext.accept(AqlParser.java:813) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:72) at com.atlassian.querylang.antlrgen.AqlBaseVisitor.visitClause(AqlBaseVisitor.java:436) at com.atlassian.querylang.antlrgen.AqlParser$ClauseContext.accept(AqlParser.java:763) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:72) at com.atlassian.querylang.antlrgen.AqlBaseVisitor.visitAqlStatement(AqlBaseVisitor.java:260) at com.atlassian.querylang.antlrgen.AqlParser$AqlStatementContext.accept(AqlParser.java:522) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:44) at com.atlassian.confluence.plugins.cql.impl.CQLtoRESTParseTreeVisitor.visit(CQLtoRESTParseTreeVisitor.java:44) at com.atlassian.confluence.plugins.cql.rest.DefaultCQLMetaDataService.visitParseTree(DefaultCQLMetaDataService.java:81) at com.atlassian.confluence.plugins.cql.rest.DefaultCQLMetaDataService.parseExpressions(DefaultCQLMetaDataService.java:57) at com.atlassian.confluence.plugins.cql.rest.CQLMetaDataResource.getExpressions(CQLMetaDataResource.java:72) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) {code} It looks like we would need to implement the visitOrClause in the CQLtoRESTParseTreeVisitor.
    via by David Taylor [Atlassian],
  • The space picker in the CQLUX allows a mix of Space categories and Spaces, so the resultant CQL could be something like: {code} (space = 'FOO' or space.type = 'global') {code} When reloading a CQL parameter into the macro browser, a request is made to the CQLMetaDataResource to split the CQL string into expressions that can be loaded into UI fields. Right now, a request with the CQL example above will result in the following stacktrace: {code} com.atlassian.confluence.api.service.exceptions.unchecked.NotImplementedServiceException: OR clauses are unsupported in parsing to REST at com.atlassian.confluence.plugins.cql.impl.CQLtoRESTParseTreeVisitor.visitOrClause(CQLtoRESTParseTreeVisitor.java:63) at com.atlassian.confluence.plugins.cql.impl.CQLtoRESTParseTreeVisitor.visitOrClause(CQLtoRESTParseTreeVisitor.java:30) at com.atlassian.querylang.antlrgen.AqlParser$OrClauseContext.accept(AqlParser.java:813) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:72) at com.atlassian.querylang.antlrgen.AqlBaseVisitor.visitClause(AqlBaseVisitor.java:436) at com.atlassian.confluence.plugins.cql.impl.CQLtoRESTParseTreeVisitor.visitSubClause(CQLtoRESTParseTreeVisitor.java:95) at com.atlassian.confluence.plugins.cql.impl.CQLtoRESTParseTreeVisitor.visitNotClause(CQLtoRESTParseTreeVisitor.java:84) at com.atlassian.confluence.plugins.cql.impl.CQLtoRESTParseTreeVisitor.visitAndClause(CQLtoRESTParseTreeVisitor.java:75) at com.atlassian.confluence.plugins.cql.impl.CQLtoRESTParseTreeVisitor.visitOrClause(CQLtoRESTParseTreeVisitor.java:65) at com.atlassian.confluence.plugins.cql.impl.CQLtoRESTParseTreeVisitor.visitOrClause(CQLtoRESTParseTreeVisitor.java:30) at com.atlassian.querylang.antlrgen.AqlParser$OrClauseContext.accept(AqlParser.java:813) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:72) at com.atlassian.querylang.antlrgen.AqlBaseVisitor.visitClause(AqlBaseVisitor.java:436) at com.atlassian.querylang.antlrgen.AqlParser$ClauseContext.accept(AqlParser.java:763) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:72) at com.atlassian.querylang.antlrgen.AqlBaseVisitor.visitAqlStatement(AqlBaseVisitor.java:260) at com.atlassian.querylang.antlrgen.AqlParser$AqlStatementContext.accept(AqlParser.java:522) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:44) at com.atlassian.confluence.plugins.cql.impl.CQLtoRESTParseTreeVisitor.visit(CQLtoRESTParseTreeVisitor.java:44) at com.atlassian.confluence.plugins.cql.rest.DefaultCQLMetaDataService.visitParseTree(DefaultCQLMetaDataService.java:81) at com.atlassian.confluence.plugins.cql.rest.DefaultCQLMetaDataService.parseExpressions(DefaultCQLMetaDataService.java:57) at com.atlassian.confluence.plugins.cql.rest.CQLMetaDataResource.getExpressions(CQLMetaDataResource.java:72) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) {code} It looks like we would need to implement the visitOrClause in the CQLtoRESTParseTreeVisitor.
    via by David Taylor [Atlassian],
    • com.atlassian.confluence.api.service.exceptions.unchecked.NotImplementedServiceException: OR clauses are unsupported in parsing to REST at com.atlassian.confluence.plugins.cql.impl.CQLtoRESTParseTreeVisitor.visitOrClause(CQLtoRESTParseTreeVisitor.java:63) at com.atlassian.confluence.plugins.cql.impl.CQLtoRESTParseTreeVisitor.visitOrClause(CQLtoRESTParseTreeVisitor.java:30) at com.atlassian.querylang.antlrgen.AqlParser$OrClauseContext.accept(AqlParser.java:813) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:72) at com.atlassian.querylang.antlrgen.AqlBaseVisitor.visitClause(AqlBaseVisitor.java:436) at com.atlassian.confluence.plugins.cql.impl.CQLtoRESTParseTreeVisitor.visitSubClause(CQLtoRESTParseTreeVisitor.java:95) at com.atlassian.confluence.plugins.cql.impl.CQLtoRESTParseTreeVisitor.visitNotClause(CQLtoRESTParseTreeVisitor.java:84) at com.atlassian.confluence.plugins.cql.impl.CQLtoRESTParseTreeVisitor.visitAndClause(CQLtoRESTParseTreeVisitor.java:75) at com.atlassian.confluence.plugins.cql.impl.CQLtoRESTParseTreeVisitor.visitOrClause(CQLtoRESTParseTreeVisitor.java:65) at com.atlassian.confluence.plugins.cql.impl.CQLtoRESTParseTreeVisitor.visitOrClause(CQLtoRESTParseTreeVisitor.java:30) at com.atlassian.querylang.antlrgen.AqlParser$OrClauseContext.accept(AqlParser.java:813) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:72) at com.atlassian.querylang.antlrgen.AqlBaseVisitor.visitClause(AqlBaseVisitor.java:436) at com.atlassian.querylang.antlrgen.AqlParser$ClauseContext.accept(AqlParser.java:763) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:72) at com.atlassian.querylang.antlrgen.AqlBaseVisitor.visitAqlStatement(AqlBaseVisitor.java:260) at com.atlassian.querylang.antlrgen.AqlParser$AqlStatementContext.accept(AqlParser.java:522) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:44) at com.atlassian.confluence.plugins.cql.impl.CQLtoRESTParseTreeVisitor.visit(CQLtoRESTParseTreeVisitor.java:44) at com.atlassian.confluence.plugins.cql.rest.DefaultCQLMetaDataService.visitParseTree(DefaultCQLMetaDataService.java:81) at com.atlassian.confluence.plugins.cql.rest.DefaultCQLMetaDataService.parseExpressions(DefaultCQLMetaDataService.java:57) at com.atlassian.confluence.plugins.cql.rest.CQLMetaDataResource.getExpressions(CQLMetaDataResource.java:72) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606)
    No Bugmate found.