Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-9676

Json parse error on broker properties.json causes error to start

XMLWordPrintable

      properties have reported errors, but not barfed on invalid values or typo.
      the json support is not so lenient.

      We may want to trap parsing errors and report in the same way.

      {{2025-03-26 16:57:08,569 INFO [org.apache.activemq.artemis.integration.bootstrap] AMQ101000: Starting ActiveMQ Artemis Server version 2.40.0
      2025-03-26 16:57:08,583 ERROR [org.apache.activemq.artemis.core.server] AMQ224097: Failed to start server
      org.apache.activemq.artemis.commons.shaded.json.stream.JsonParsingException: Unexpected character '}' (Codepoint: 125) on [lineNumber=10, columnNumber=8, streamOffset=223]. Reason is [[Expected " ] { } LITERAL]]
      at org.apache.activemq.artemis.commons.shaded.johnzon.core.JsonStreamParserImpl.uexc(JsonStreamParserImpl.java:1051) ~[artemis-commons-2.40.0.jar:2.40.0]
      at org.apache.activemq.artemis.commons.shaded.johnzon.core.JsonStreamParserImpl.uexc(JsonStreamParserImpl.java:1057) ~[artemis-commons-2.40.0.jar:2.40.0]
      at org.apache.activemq.artemis.commons.shaded.johnzon.core.JsonStreamParserImpl.handleEndObject(JsonStreamParserImpl.java:528) ~[artemis-commons-2.40.0.jar:2.40.0]
      at org.apache.activemq.artemis.commons.shaded.johnzon.core.JsonStreamParserImpl.internalNext(JsonStreamParserImpl.java:454) ~[artemis-commons-2.40.0.jar:2.40.0]
      at org.apache.activemq.artemis.commons.shaded.johnzon.core.JsonStreamParserImpl.internalNext(JsonStreamParserImpl.java:415) ~[artemis-commons-2.40.0.jar:2.40.0]
      at org.apache.activemq.artemis.commons.shaded.johnzon.core.JohnzonJsonParserImpl.next(JohnzonJsonParserImpl.java:63) ~[artemis-commons-2.40.0.jar:2.40.0]
      at org.apache.activemq.artemis.commons.shaded.johnzon.core.JsonReaderImpl.parseObject(JsonReaderImpl.java:176) ~[artemis-commons-2.40.0.jar:2.40.0]
      at org.apache.activemq.artemis.commons.shaded.johnzon.core.JsonReaderImpl.parseObject(JsonReaderImpl.java:188) ~[artemis-commons-2.40.0.jar:2.40.0]
      at org.apache.activemq.artemis.commons.shaded.johnzon.core.JsonReaderImpl.readValue(JsonReaderImpl.java:95) ~[artemis-commons-2.40.0.jar:2.40.0]
      at org.apache.activemq.artemis.commons.shaded.johnzon.core.JsonReaderImpl.read(JsonReaderImpl.java:73) ~[artemis-commons-2.40.0.jar:2.40.0]
      at org.apache.activemq.artemis.commons.shaded.johnzon.core.JsonReaderImpl.readObject(JsonReaderImpl.java:147) ~[artemis-commons-2.40.0.jar:2.40.0]
      at org.apache.activemq.artemis.utils.JsonLoader.readObject(JsonLoader.java:42) ~[artemis-commons-2.40.0.jar:2.40.0]
      at org.apache.activemq.artemis.core.config.impl.ConfigurationImpl$InsertionOrderedProperties.loadJson(ConfigurationImpl.java:3920) ~[artemis-server-2.40.0.jar:2.40.0]
      at org.apache.activemq.artemis.core.config.impl.ConfigurationImpl.parseFileProperties(ConfigurationImpl.java:604) ~[artemis-server-2.40.0.jar:2.40.0]
      at org.apache.activemq.artemis.core.config.impl.ConfigurationImpl.parseProperties(ConfigurationImpl.java:586) ~[artemis-server-2.40.0.jar:2.40.0]
      at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.internalStart(ActiveMQServerImpl.java:683) ~[artemis-server-2.40.0.jar:2.40.0]
      at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.start(ActiveMQServerImpl.java:633) [artemis-server-2.40.0.jar:2.40.0]
      at org.apache.activemq.artemis.integration.FileBroker.start(FileBroker.java:67) [artemis-cli-2.40.0.jar:2.40.0]
      at org.apache.activemq.artemis.cli.commands.Run.execute(Run.java:132) [artemis-cli-2.40.0.jar:2.40.0]
      at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:222) [artemis-cli-2.40.0.jar:2.40.0]
      at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:170) [artemis-cli-2.40.0.jar:2.40.0]
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
      at java.base/java.lang.reflect.Method.invoke(Method.java:569) ~[?:?]
      at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:149) [artemis-boot.jar:2.40.0]
      at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:61) [artemis-boot.jar:2.40.0]
      org.apache.activemq.artemis.commons.shaded.json.stream.JsonParsingException: Unexpected character '}' (Codepoint: 125) on [lineNumber=10, columnNumber=8, streamOffset=223]. Reason is [[Expected " ] { } LITERAL]]
      at org.apache.activemq.artemis.commons.shaded.johnzon.core.JsonStreamParserImpl.uexc(JsonStreamParserImpl.java:1051)
      at org.apache.activemq.artemis.commons.shaded.johnzon.core.JsonStreamParserImpl.uexc(JsonStreamParserImpl.java:1057)
      at org.apache.activemq.artemis.commons.shaded.johnzon.core.JsonStreamParserImpl.handleEndObject(JsonStreamParserImpl.java:528)
      at org.apache.activemq.artemis.commons.shaded.johnzon.core.JsonStreamParserImpl.internalNext(JsonStreamParserImpl.java:454)
      at org.apache.activemq.artemis.commons.shaded.johnzon.core.JsonStreamParserImpl.internalNext(JsonStreamParserImpl.java:415)
      at org.apache.activemq.artemis.commons.shaded.johnzon.core.JohnzonJsonParserImpl.next(JohnzonJsonParserImpl.java:63)
      at org.apache.activemq.artemis.commons.shaded.johnzon.core.JsonReaderImpl.parseObject(JsonReaderImpl.java:176)
      at org.apache.activemq.artemis.commons.shaded.johnzon.core.JsonReaderImpl.parseObject(JsonReaderImpl.java:188)
      at org.apache.activemq.artemis.commons.shaded.johnzon.core.JsonReaderImpl.readValue(JsonReaderImpl.java:95)
      at org.apache.activemq.artemis.commons.shaded.johnzon.core.JsonReaderImpl.read(JsonReaderImpl.java:73)
      at org.apache.activemq.artemis.commons.shaded.johnzon.core.JsonReaderImpl.readObject(JsonReaderImpl.java:147)
      at org.apache.activemq.artemis.utils.JsonLoader.readObject(JsonLoader.java:42)
      at org.apache.activemq.artemis.core.config.impl.ConfigurationImpl$InsertionOrderedProperties.loadJson(ConfigurationImpl.java:3920)
      at org.apache.activemq.artemis.core.config.impl.ConfigurationImpl.parseFileProperties(ConfigurationImpl.java:604)
      at org.apache.activemq.artemis.core.config.impl.ConfigurationImpl.parseProperties(ConfigurationImpl.java:586)
      at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.internalStart(ActiveMQServerImpl.java:683)
      at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.start(ActiveMQServerImpl.java:633)
      at org.apache.activemq.artemis.integration.FileBroker.start(FileBroker.java:67)
      at org.apache.activemq.artemis.cli.commands.Run.execute(Run.java:132)
      at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:222)
      at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:170)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:569)
      at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:149)
      at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:61)}}

              gtully@redhat.com Gary Tully
              gtully@redhat.com Gary Tully
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: