Getting a "Cannot find the declaration of element 'management-context' error message when updating AMQ Broker 7.10
Issue
When upgrading to AMQ version 7.10 or later, the following exception is observed:
$ bin/artemis run
Dec 08, 2022 8:35:42 PM java.lang.System$LoggerFinder lambda$accessProvider$0
WARNING: Failed to instantiate LoggerFinder provider; Using default.
javax.xml.bind.UnmarshalException
- with linked exception:
[org.xml.sax.SAXParseException; lineNumber: 18; columnNumber: 56; cvc-elt.1.a: Cannot find the declaration of element 'management-context'.]
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:453)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:387)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:356)
at org.apache.activemq.artemis.dto.XmlUtil.decode(XmlUtil.java:117)
at org.apache.activemq.artemis.cli.factory.jmx.XmlJmxAclHandler.createJmxAcl(XmlJmxAclHandler.java:34)
at org.apache.activemq.artemis.cli.factory.jmx.ManagementFactory.createJmxAclConfiguration(ManagementFactory.java:57)
at org.apache.activemq.artemis.cli.factory.jmx.ManagementFactory.createJmxAclConfiguration(ManagementFactory.java:64)
at org.apache.activemq.artemis.cli.commands.Configurable.getManagementDTO(Configurable.java:134)
at org.apache.activemq.artemis.cli.commands.Run.execute(Run.java:82)
at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:160)
at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:108)
at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:135)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:134)
at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:50)
Caused by: org.xml.sax.SAXParseException; lineNumber: 18; columnNumber: 56; cvc-elt.1.a: Cannot find the declaration of element 'management-context'.
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:135)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:2132)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:829)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorHandlerImpl.startElement(ValidatorHandlerImpl.java:570)
at com.sun.xml.bind.v2.runtime.unmarshaller.ValidatingUnmarshaller.startElement(ValidatingUnmarshaller.java:71)
at com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElement(InterningXmlVisitor.java:45)
at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStreamConnector.java:216)
at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:150)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:385)
... 16 more
Environment
- Red Hat AMQ
- 7.10
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.