Zhang Xiang created ARTEMIS-3263:
------------------------------------
Summary: Easiest Core Bridge configs do not work
Key: ARTEMIS-3263
URL: https://issues.apache.org/jira/browse/ARTEMIS-3263
Project: ActiveMQ Artemis
Issue Type: Bug
Components: Broker
Affects Versions: 2.17.0
Environment: Fedora 34 Beta
Dragonwell OpenJDK 11.0.10
Reporter: Zhang Xiang
I read the official documentation
[https://activemq.apache.org/components/artemis/documentation/latest/core-bridges.html]
and find that most of the attributes are optional. Then I added some simple
configs to broker.xml to test it.
{code:java}
<connectors>
<connector name="connector-A">tcp://192.168.1.200:61616</connector>
</connectors>
<addresses>
<address name="to-A">
<multicast>
<queue name="to-A-subscription"/>
</multicast>
</address>
/addresses>
<bridge name="my-bridge">
<queue-name>to-A-subscription</queue-name>
<static-connectors>
<connector-ref>connector-A</connector-ref>
</static-connectors>
</bridge>
{code}
and the ActiveMQ Artemis got error at startup and quit:
{code:java}
2021-04-23 13:05:55,264 ERROR [org.apache.activemq.artemis.core.client]
AMQ214019: Invalid configuration: org.xml.sax.SAXParseException;
cvc-complex-type.2.4.a: Invalid content was found starting with element
'{"urn:activemq:core":bridge}'. One of
'{"urn:activemq:core":system-property-prefix,
"urn:activemq:core":internal-naming-prefix,
"urn:activemq:core":amqp-use-core-subscription-naming,
"urn:activemq:core":resolve-protocols,
"urn:activemq:core":scheduled-thread-pool-max-size,
"urn:activemq:core":thread-pool-max-size,
"urn:activemq:core":graceful-shutdown-enabled,
"urn:activemq:core":graceful-shutdown-timeout,
"urn:activemq:core":security-enabled,
"urn:activemq:core":security-invalidation-interval,
"urn:activemq:core":authentication-cache-size,
"urn:activemq:core":authorization-cache-size,
"urn:activemq:core":journal-lock-acquisition-timeout,
"urn:activemq:core":wild-card-routing-enabled,
"urn:activemq:core":management-address,
"urn:activemq:core":management-notification-address,
"urn:activemq:core":cluster-user, "urn:activemq:core":cluster-password,
"urn:activemq:core":password-codec, "urn:activemq:core":mask-password,
"urn:activemq:core":log-delegate-factory-class-name,
"urn:activemq:core":jmx-management-enabled, "urn:activemq:core":jmx-domain,
"urn:activemq:core":jmx-use-broker-name,
"urn:activemq:core":message-counter-enabled,
"urn:activemq:core":message-counter-sample-period,
"urn:activemq:core":message-counter-max-day-history,
"urn:activemq:core":connection-ttl-override,
"urn:activemq:core":connection-ttl-check-interval,
"urn:activemq:core":configuration-file-refresh-period,
"urn:activemq:core":temporary-queue-namespace,
"urn:activemq:core":async-connection-execution-enabled,
"urn:activemq:core":transaction-timeout,
"urn:activemq:core":transaction-timeout-scan-period,
"urn:activemq:core":message-expiry-scan-period,
"urn:activemq:core":message-expiry-thread-priority,
"urn:activemq:core":address-queue-scan-period,
"urn:activemq:core":id-cache-size, "urn:activemq:core":persist-id-cache,
"urn:activemq:core":remoting-incoming-interceptors,
"urn:activemq:core":remoting-outgoing-interceptors,
"urn:activemq:core":persist-delivery-count-before-delivery,
"urn:activemq:core":populate-validated-user,
"urn:activemq:core":reject-empty-validated-user,
"urn:activemq:core":broadcast-groups, "urn:activemq:core":discovery-groups,
"urn:activemq:core":diverts, "urn:activemq:core":queues,
"urn:activemq:core":bridges, "urn:activemq:core":ha-policy,
"urn:activemq:core":cluster-connections,
"urn:activemq:core":broker-connections, "urn:activemq:core":grouping-handler,
"urn:activemq:core":create-bindings-dir,
"urn:activemq:core":page-max-concurrent-io,
"urn:activemq:core":read-whole-page,
"urn:activemq:core":node-manager-lock-directory,
"urn:activemq:core":create-journal-dir,
"urn:activemq:core":journal-buffer-size,
"urn:activemq:core":journal-sync-transactional,
"urn:activemq:core":journal-sync-non-transactional,
"urn:activemq:core":log-journal-write-rate,
"urn:activemq:core":journal-compact-percentage,
"urn:activemq:core":journal-compact-min-files,
"urn:activemq:core":journal-file-open-timeout,
"urn:activemq:core":server-dump-interval, "urn:activemq:core":global-max-size,
"urn:activemq:core":memory-warning-threshold,
"urn:activemq:core":memory-measure-interval, "urn:activemq:core":store,
"urn:activemq:core":broker-plugins, "urn:activemq:core":metrics-plugin,
"urn:activemq:core":metrics, "urn:activemq:core":address-settings,
"urn:activemq:core":resource-limit-settings,
"urn:activemq:core":connector-services, "urn:activemq:core":network-check-list,
"urn:activemq:core":network-check-URL-list,
"urn:activemq:core":network-check-period,
"urn:activemq:core":network-check-timeout,
"urn:activemq:core":network-check-NIC,
"urn:activemq:core":network-check-ping-command,
"urn:activemq:core":network-check-ping6-command,
"urn:activemq:core":wildcard-addresses}' is expected.2021-04-23 13:05:55,264
ERROR [org.apache.activemq.artemis.core.client] AMQ214019: Invalid
configuration: org.xml.sax.SAXParseException; cvc-complex-type.2.4.a: Invalid
content was found starting with element '{"urn:activemq:core":bridge}'. One of
'{"urn:activemq:core":system-property-prefix,
"urn:activemq:core":internal-naming-prefix,
"urn:activemq:core":amqp-use-core-subscription-naming,
"urn:activemq:core":resolve-protocols,
"urn:activemq:core":scheduled-thread-pool-max-size,
"urn:activemq:core":thread-pool-max-size,
"urn:activemq:core":graceful-shutdown-enabled,
"urn:activemq:core":graceful-shutdown-timeout,
"urn:activemq:core":security-enabled,
"urn:activemq:core":security-invalidation-interval,
"urn:activemq:core":authentication-cache-size,
"urn:activemq:core":authorization-cache-size,
"urn:activemq:core":journal-lock-acquisition-timeout,
"urn:activemq:core":wild-card-routing-enabled,
"urn:activemq:core":management-address,
"urn:activemq:core":management-notification-address,
"urn:activemq:core":cluster-user, "urn:activemq:core":cluster-password,
"urn:activemq:core":password-codec, "urn:activemq:core":mask-password,
"urn:activemq:core":log-delegate-factory-class-name,
"urn:activemq:core":jmx-management-enabled, "urn:activemq:core":jmx-domain,
"urn:activemq:core":jmx-use-broker-name,
"urn:activemq:core":message-counter-enabled,
"urn:activemq:core":message-counter-sample-period,
"urn:activemq:core":message-counter-max-day-history,
"urn:activemq:core":connection-ttl-override,
"urn:activemq:core":connection-ttl-check-interval,
"urn:activemq:core":configuration-file-refresh-period,
"urn:activemq:core":temporary-queue-namespace,
"urn:activemq:core":async-connection-execution-enabled,
"urn:activemq:core":transaction-timeout,
"urn:activemq:core":transaction-timeout-scan-period,
"urn:activemq:core":message-expiry-scan-period,
"urn:activemq:core":message-expiry-thread-priority,
"urn:activemq:core":address-queue-scan-period,
"urn:activemq:core":id-cache-size, "urn:activemq:core":persist-id-cache,
"urn:activemq:core":remoting-incoming-interceptors,
"urn:activemq:core":remoting-outgoing-interceptors,
"urn:activemq:core":persist-delivery-count-before-delivery,
"urn:activemq:core":populate-validated-user,
"urn:activemq:core":reject-empty-validated-user,
"urn:activemq:core":broadcast-groups, "urn:activemq:core":discovery-groups,
"urn:activemq:core":diverts, "urn:activemq:core":queues,
"urn:activemq:core":bridges, "urn:activemq:core":ha-policy,
"urn:activemq:core":cluster-connections,
"urn:activemq:core":broker-connections, "urn:activemq:core":grouping-handler,
"urn:activemq:core":create-bindings-dir,
"urn:activemq:core":page-max-concurrent-io,
"urn:activemq:core":read-whole-page,
"urn:activemq:core":node-manager-lock-directory,
"urn:activemq:core":create-journal-dir,
"urn:activemq:core":journal-buffer-size,
"urn:activemq:core":journal-sync-transactional,
"urn:activemq:core":journal-sync-non-transactional,
"urn:activemq:core":log-journal-write-rate,
"urn:activemq:core":journal-compact-percentage,
"urn:activemq:core":journal-compact-min-files,
"urn:activemq:core":journal-file-open-timeout,
"urn:activemq:core":server-dump-interval, "urn:activemq:core":global-max-size,
"urn:activemq:core":memory-warning-threshold,
"urn:activemq:core":memory-measure-interval, "urn:activemq:core":store,
"urn:activemq:core":broker-plugins, "urn:activemq:core":metrics-plugin,
"urn:activemq:core":metrics, "urn:activemq:core":address-settings,
"urn:activemq:core":resource-limit-settings,
"urn:activemq:core":connector-services, "urn:activemq:core":network-check-list,
"urn:activemq:core":network-check-URL-list,
"urn:activemq:core":network-check-period,
"urn:activemq:core":network-check-timeout,
"urn:activemq:core":network-check-NIC,
"urn:activemq:core":network-check-ping-command,
"urn:activemq:core":network-check-ping6-command,
"urn:activemq:core":wildcard-addresses}' is expected. at
java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)
[java.xml:] at
java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:135)
[java.xml:] at
java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396)
[java.xml:] at
java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
[java.xml:] at
java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284)
[java.xml:] at
java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:511)
[java.xml:] at
java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3587)
[java.xml:] at
java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1971)
[java.xml:] at
java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:829)
[java.xml:] at
java.xml/com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.beginNode(DOMValidatorHelper.java:276)
[java.xml:] at
java.xml/com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(DOMValidatorHelper.java:243)
[java.xml:] at
java.xml/com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(DOMValidatorHelper.java:189)
[java.xml:] at
java.xml/com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:108)
[java.xml:] at
java.xml/javax.xml.validation.Validator.validate(Validator.java:124)
[java.xml:] at
org.apache.activemq.artemis.utils.XMLUtil.validate(XMLUtil.java:361)
[artemis-core-client-2.17.0.jar:2.17.0] at
org.apache.activemq.artemis.core.config.FileDeploymentManager.readConfiguration(FileDeploymentManager.java:80)
[artemis-server-2.17.0.jar:2.17.0] at
org.apache.activemq.artemis.integration.FileBroker.createComponents(FileBroker.java:118)
[artemis-cli-2.17.0.jar:2.17.0] at
org.apache.activemq.artemis.cli.commands.Run.execute(Run.java:112)
[artemis-cli-2.17.0.jar:2.17.0] at
org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:154)
[artemis-cli-2.17.0.jar:2.17.0] at
org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:102)
[artemis-cli-2.17.0.jar:2.17.0] at
org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:129)
[artemis-cli-2.17.0.jar:2.17.0] at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java.base:] at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[java.base:] at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java.base:] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[java.base:] at
org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:134)
[artemis-boot.jar:2.17.0] at
org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:50)
[artemis-boot.jar:2.17.0]
java.lang.IllegalStateException: Invalid configuration at
org.apache.activemq.artemis.utils.XMLUtil.validate(XMLUtil.java:365) at
org.apache.activemq.artemis.core.config.FileDeploymentManager.readConfiguration(FileDeploymentManager.java:80)
at
org.apache.activemq.artemis.integration.FileBroker.createComponents(FileBroker.java:118)
at org.apache.activemq.artemis.cli.commands.Run.execute(Run.java:112) at
org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:154) at
org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:102) at
org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:129) 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; cvc-complex-type.2.4.a: Invalid content was
found starting with element '{"urn:activemq:core":bridge}'. One of
'{"urn:activemq:core":system-property-prefix,
"urn:activemq:core":internal-naming-prefix,
"urn:activemq:core":amqp-use-core-subscription-naming,
"urn:activemq:core":resolve-protocols,
"urn:activemq:core":scheduled-thread-pool-max-size,
"urn:activemq:core":thread-pool-max-size,
"urn:activemq:core":graceful-shutdown-enabled,
"urn:activemq:core":graceful-shutdown-timeout,
"urn:activemq:core":security-enabled,
"urn:activemq:core":security-invalidation-interval,
"urn:activemq:core":authentication-cache-size,
"urn:activemq:core":authorization-cache-size,
"urn:activemq:core":journal-lock-acquisition-timeout,
"urn:activemq:core":wild-card-routing-enabled,
"urn:activemq:core":management-address,
"urn:activemq:core":management-notification-address,
"urn:activemq:core":cluster-user, "urn:activemq:core":cluster-password,
"urn:activemq:core":password-codec, "urn:activemq:core":mask-password,
"urn:activemq:core":log-delegate-factory-class-name,
"urn:activemq:core":jmx-management-enabled, "urn:activemq:core":jmx-domain,
"urn:activemq:core":jmx-use-broker-name,
"urn:activemq:core":message-counter-enabled,
"urn:activemq:core":message-counter-sample-period,
"urn:activemq:core":message-counter-max-day-history,
"urn:activemq:core":connection-ttl-override,
"urn:activemq:core":connection-ttl-check-interval,
"urn:activemq:core":configuration-file-refresh-period,
"urn:activemq:core":temporary-queue-namespace,
"urn:activemq:core":async-connection-execution-enabled,
"urn:activemq:core":transaction-timeout,
"urn:activemq:core":transaction-timeout-scan-period,
"urn:activemq:core":message-expiry-scan-period,
"urn:activemq:core":message-expiry-thread-priority,
"urn:activemq:core":address-queue-scan-period,
"urn:activemq:core":id-cache-size, "urn:activemq:core":persist-id-cache,
"urn:activemq:core":remoting-incoming-interceptors,
"urn:activemq:core":remoting-outgoing-interceptors,
"urn:activemq:core":persist-delivery-count-before-delivery,
"urn:activemq:core":populate-validated-user,
"urn:activemq:core":reject-empty-validated-user,
"urn:activemq:core":broadcast-groups, "urn:activemq:core":discovery-groups,
"urn:activemq:core":diverts, "urn:activemq:core":queues,
"urn:activemq:core":bridges, "urn:activemq:core":ha-policy,
"urn:activemq:core":cluster-connections,
"urn:activemq:core":broker-connections, "urn:activemq:core":grouping-handler,
"urn:activemq:core":create-bindings-dir,
"urn:activemq:core":page-max-concurrent-io,
"urn:activemq:core":read-whole-page,
"urn:activemq:core":node-manager-lock-directory,
"urn:activemq:core":create-journal-dir,
"urn:activemq:core":journal-buffer-size,
"urn:activemq:core":journal-sync-transactional,
"urn:activemq:core":journal-sync-non-transactional,
"urn:activemq:core":log-journal-write-rate,
"urn:activemq:core":journal-compact-percentage,
"urn:activemq:core":journal-compact-min-files,
"urn:activemq:core":journal-file-open-timeout,
"urn:activemq:core":server-dump-interval, "urn:activemq:core":global-max-size,
"urn:activemq:core":memory-warning-threshold,
"urn:activemq:core":memory-measure-interval, "urn:activemq:core":store,
"urn:activemq:core":broker-plugins, "urn:activemq:core":metrics-plugin,
"urn:activemq:core":metrics, "urn:activemq:core":address-settings,
"urn:activemq:core":resource-limit-settings,
"urn:activemq:core":connector-services, "urn:activemq:core":network-check-list,
"urn:activemq:core":network-check-URL-list,
"urn:activemq:core":network-check-period,
"urn:activemq:core":network-check-timeout,
"urn:activemq:core":network-check-NIC,
"urn:activemq:core":network-check-ping-command,
"urn:activemq:core":network-check-ping6-command,
"urn:activemq:core":wildcard-addresses}' is expected. 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$XSIErrorReporter.reportError(XMLSchemaValidator.java:511)
at
java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3587)
at
java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1971)
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.DOMValidatorHelper.beginNode(DOMValidatorHelper.java:276)
at
java.xml/com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(DOMValidatorHelper.java:243)
at
java.xml/com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(DOMValidatorHelper.java:189)
at
java.xml/com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:108)
at java.xml/javax.xml.validation.Validator.validate(Validator.java:124) at
org.apache.activemq.artemis.utils.XMLUtil.validate(XMLUtil.java:361) ... 12
morejava.lang.NullPointerException at
org.apache.activemq.artemis.integration.FileBroker.getServer(FileBroker.java:141)
at org.apache.activemq.artemis.cli.commands.Run.execute(Run.java:137) at
org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:154) at
org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:102) at
org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:129) 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)
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)