You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Metapath, if one uses an explicit qualified name for a field, flag, or assembly, a compilation exception occurs (MPST0003).
Who is the bug affecting
Developers of Metaschema-enabled tooling and engineers who write Metapath with explicit use of qualified names for querying specific data elements in Metaschema-bound document instances by their namespace explicitly.
How do we replicate this issue
Write a Metapath-based constraint with a @target with a qualified name, such as
Use the metaschema-java library or CLI to validate the constraint.
Locate one or more of the following exceptions.
NOTE: The full example code can be found in the repro branch below.
A expect constraint with id 'has-authorization-boundary-diagram-link-href-target', matching the item at path '/system-security-plan/control-implementation[1]/implemented-requirement[43]/link[2]', resulted in an unexpected error. MPST0003: Unable to compile Metapath '.[ancestor::Q{http://csrc.nist.gov/ns/oscal/1.0}authorization-boundary and @rel='diagram']'
gov.nist.secauto.metaschema.core.metapath.StaticMetapathException: MPST0003: Unable to compile Metapath '.[ancestor::Q{http://csrc.nist.gov/ns/oscal/1.0}authorization-boundary and @rel='diagram']'
at gov.nist.secauto.metaschema.core.metapath.MetapathExpression.compile(MetapathExpression.java:94) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.IMetapathExpression.compile(IMetapathExpression.java:136) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.model.constraint.impl.AbstractConstraint.lambda$new$0(AbstractConstraint.java:88) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at nl.talsmasoftware.lazy4j.Lazy.forceEagerEvaluation(Lazy.java:85) ~[nl.talsmasoftware.lazy4j-2.0.0.jar:?]
at nl.talsmasoftware.lazy4j.Lazy.get(Lazy.java:101) ~[nl.talsmasoftware.lazy4j-2.0.0.jar:?]
at gov.nist.secauto.metaschema.core.model.constraint.impl.AbstractConstraint.getTargetMetapath(AbstractConstraint.java:141) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.model.constraint.impl.AbstractConstraint.matchTargets(AbstractConstraint.java:149) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.validateExpect(DefaultConstraintValidator.java:650) [dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.validateAssembly(DefaultConstraintValidator.java:208) [dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:1018) [dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:955) [dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem.accept(IAssemblyNodeItem.java:76) [dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitModelChildren(AbstractNodeItemVisitor.java:73) [dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitAssembly(AbstractNodeItemVisitor.java:173) [dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:1019) [dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:955) [dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem.accept(IAssemblyNodeItem.java:76) [dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitModelChildren(AbstractNodeItemVisitor.java:73) [dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitAssembly(AbstractNodeItemVisitor.java:173) [dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:1019) [dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:955) [dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem.accept(IAssemblyNodeItem.java:76) [dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitModelChildren(AbstractNodeItemVisitor.java:73) [dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemVisitor.visitAssembly(AbstractNodeItemVisitor.java:173) [dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:1019) [dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator$Visitor.visitAssembly(DefaultConstraintValidator.java:955) [dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem.accept(IAssemblyNodeItem.java:76) [dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator.validate(DefaultConstraintValidator.java:142) [dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.databind.IBindingContext.validate(IBindingContext.java:502) [dev.metaschema.java.metaschema-databind-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.databind.IBindingContext.validate(IBindingContext.java:474) [dev.metaschema.java.metaschema-databind-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.databind.IBindingContext.validateWithConstraints(IBindingContext.java:558) [dev.metaschema.java.metaschema-databind-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.cli.commands.AbstractValidateContentCommand$AbstractValidationCommandExecutor.validate(AbstractValidateContentCommand.java:268) [dev.metaschema.java.metaschema-cli-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.cli.commands.AbstractValidateContentCommand$AbstractValidationCommandExecutor.execute(AbstractValidateContentCommand.java:222) [dev.metaschema.java.metaschema-cli-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.cli.processor.CLIProcessor$CallingContext.invokeCommand(CLIProcessor.java:521) [dev.metaschema.java.cli-processor-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.cli.processor.CLIProcessor$CallingContext.processCommand(CLIProcessor.java:497) [dev.metaschema.java.cli-processor-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.cli.processor.CLIProcessor.parseCommand(CLIProcessor.java:234) [dev.metaschema.java.cli-processor-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.cli.processor.CLIProcessor.process(CLIProcessor.java:210) [dev.metaschema.java.cli-processor-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.oscal.tools.cli.core.CLI.runCli(CLI.java:83) [dev.metaschema.oscal.oscal-cli-enhanced-2.5.0-SNAPSHOT.jar:?]
at gov.nist.secauto.oscal.tools.cli.core.CLI.main(CLI.java:48) [dev.metaschema.oscal.oscal-cli-enhanced-2.5.0-SNAPSHOT.jar:?]
Caused by: org.antlr.v4.runtime.misc.ParseCancellationException: line 1:13 mismatched input '{' expecting ']'
at gov.nist.secauto.metaschema.core.metapath.antlr.FailingErrorListener.syntaxError(FailingErrorListener.java:25) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at org.antlr.v4.runtime.ProxyErrorListener.syntaxError(ProxyErrorListener.java:41) ~[org.antlr.antlr4-runtime-4.13.2.jar:4.13.2]
at org.antlr.v4.runtime.Parser.notifyErrorListeners(Parser.java:544) ~[org.antlr.antlr4-runtime-4.13.2.jar:4.13.2]
at org.antlr.v4.runtime.DefaultErrorStrategy.reportInputMismatch(DefaultErrorStrategy.java:327) ~[org.antlr.antlr4-runtime-4.13.2.jar:4.13.2]
at org.antlr.v4.runtime.DefaultErrorStrategy.reportError(DefaultErrorStrategy.java:139) ~[org.antlr.antlr4-runtime-4.13.2.jar:4.13.2]
at gov.nist.secauto.metaschema.core.metapath.antlr.Metapath10.predicate(Metapath10.java:3332) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.antlr.Metapath10.postfixexpr(Metapath10.java:3134) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.antlr.Metapath10.stepexpr(Metapath10.java:2420) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.antlr.Metapath10.relativepathexpr(Metapath10.java:2352) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.antlr.Metapath10.pathexpr(Metapath10.java:2301) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.antlr.Metapath10.simplemapexpr(Metapath10.java:2216) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.antlr.Metapath10.valueexpr(Metapath10.java:2073) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.antlr.Metapath10.unaryexpr(Metapath10.java:2036) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.antlr.Metapath10.arrowexpr(Metapath10.java:1947) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.antlr.Metapath10.castexpr(Metapath10.java:1879) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.antlr.Metapath10.castableexpr(Metapath10.java:1822) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.antlr.Metapath10.treatexpr(Metapath10.java:1765) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.antlr.Metapath10.instanceofexpr(Metapath10.java:1708) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.antlr.Metapath10.intersectexceptexpr(Metapath10.java:1641) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.antlr.Metapath10.unionexpr(Metapath10.java:1568) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.antlr.Metapath10.multiplicativeexpr(Metapath10.java:1495) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.antlr.Metapath10.additiveexpr(Metapath10.java:1414) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.antlr.Metapath10.rangeexpr(Metapath10.java:1353) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.antlr.Metapath10.stringconcatexpr(Metapath10.java:1295) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.antlr.Metapath10.comparisonexpr(Metapath10.java:1212) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.antlr.Metapath10.andexpr(Metapath10.java:1149) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.antlr.Metapath10.orexpr(Metapath10.java:1088) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.antlr.Metapath10.exprsingle(Metapath10.java:561) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.antlr.Metapath10.expr(Metapath10.java:464) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.antlr.Metapath10.metapath(Metapath10.java:214) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
at gov.nist.secauto.metaschema.core.metapath.MetapathExpression.compile(MetapathExpression.java:80) ~[dev.metaschema.java.metaschema-core-2.2.0-SNAPSHOT.jar:?]
... 38 more
Expected behavior (i.e. solution)
The QName is honored and the path successfully evaluates on the explicitly identified QName.
Other comments
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
In Metapath, if one uses an explicit qualified name for a field, flag, or assembly, a compilation exception occurs (
MPST0003
).Who is the bug affecting
Developers of Metaschema-enabled tooling and engineers who write Metapath with explicit use of qualified names for querying specific data elements in Metaschema-bound document instances by their namespace explicitly.
How do we replicate this issue
@target
with a qualified name, such asNOTE: The full example code can be found in the repro branch below.
https://github.com/aj-stein-gsa/fedramp-automation/tree/bug-metaschema-java-292-example-qname-repro
Expected behavior (i.e. solution)
The QName is honored and the path successfully evaluates on the explicitly identified QName.
Other comments
No response
The text was updated successfully, but these errors were encountered: