AMQ 7.11.x - Custom logging configuration with warning: Caused by: java.lang.StringIndexOutOfBoundsException
Issue
When customizing the logging configuration from AMQ 7.11, the following warning (or similar) is encountered during broker start:
WARN [org.eclipse.jetty.webapp.WebAppContext] Failed startup of context o.e.j.w.WebAppContext@20440c6c{hawtio,/console,file:///home/jboss/amq-broker/tmp/webapps/jetty-artemis-broker-ss-0_artemis-broker-hdls-svc_myamq_svc_cluster_local-8161-hawtio_war-_console-_Connector-0-15360974013460505891/webapp/,UNAVAILABLE,@Connector-0}{/opt/amq/web/hawtio.war}
java.lang.ExceptionInInitializerError: null
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?]
at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]
at org.eclipse.jetty.server.handler.ContextHandler$StaticContext.createInstance(ContextHandler.java:2891) ~[jetty-server-10.0.11.redhat-00002.jar:10.0.11.redhat-00002]
at org.eclipse.jetty.servlet.ServletContextHandler$Context.createInstance(ServletContextHandler.java:1292) ~[jetty-servlet-10.0.11.redhat-00002.jar:10.0.11.redhat-00002]
at org.eclipse.jetty.servlet.ServletContextHandler$Context.createInstance(ServletContextHandler.java:1301) ~[jetty-servlet-10.0.11.redhat-00002.jar:10.0.11.redhat-00002]
at org.eclipse.jetty.servlet.BaseHolder.createInstance(BaseHolder.java:204) ~[jetty-servlet-10.0.11.redhat-00002.jar:10.0.11.redhat-00002]
at org.eclipse.jetty.servlet.ListenerHolder.createInstance(ListenerHolder.java:100) ~[jetty-servlet-10.0.11.redhat-00002.jar:10.0.11.redhat-00002]
at org.eclipse.jetty.servlet.ListenerHolder.doStart(ListenerHolder.java:89) ~[jetty-servlet-10.0.11.redhat-00002.jar:10.0.11.redhat-00002]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[jetty-util-10.0.11.redhat-00002.jar:10.0.11.redhat-00002]
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:382) ~[jetty-servlet-10.0.11.redhat-00002.jar:10.0.11.redhat-00002]
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1304) ~[jetty-webapp-10.0.11.redhat-00002.jar:10.0.11.redhat-00002]
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:895) ~[jetty-server-10.0.11.redhat-00002.jar:10.0.11.redhat-00002]
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:306) ~[jetty-servlet-10.0.11.redhat-00002.jar:10.0.11.redhat-00002]
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:532) ~[jetty-webapp-10.0.11.redhat-00002.jar:10.0.11.redhat-00002]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[jetty-util-10.0.11.redhat-00002.jar:10.0.11.redhat-00002]
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171) ~[jetty-util-10.0.11.redhat-00002.jar:10.0.11.redhat-00002]
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121) ~[jetty-util-10.0.11.redhat-00002.jar:10.0.11.redhat-00002]
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89) ~[jetty-server-10.0.11.redhat-00002.jar:10.0.11.redhat-00002]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[jetty-util-10.0.11.redhat-00002.jar:10.0.11.redhat-00002]
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171) ~[jetty-util-10.0.11.redhat-00002.jar:10.0.11.redhat-00002]
at org.eclipse.jetty.server.Server.start(Server.java:469) ~[jetty-server-10.0.11.redhat-00002.jar:10.0.11.redhat-00002]
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[jetty-util-10.0.11.redhat-00002.jar:10.0.11.redhat-00002]
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89) ~[jetty-server-10.0.11.redhat-00002.jar:10.0.11.redhat-00002]
at org.eclipse.jetty.server.Server.doStart(Server.java:414) ~[jetty-server-10.0.11.redhat-00002.jar:10.0.11.redhat-00002]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[jetty-util-10.0.11.redhat-00002.jar:10.0.11.redhat-00002]
at org.apache.activemq.artemis.component.WebServerComponent.start(WebServerComponent.java:192) ~[artemis-web-2.28.0.redhat-00004.jar:2.28.0.redhat-00004]
at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.addExternalComponent(ActiveMQServerImpl.java:996) ~[artemis-server-2.28.0.redhat-00004.jar:2.28.0.redhat-00004]
at org.apache.activemq.artemis.cli.commands.Run.execute(Run.java:144) ~[artemis-cli-2.28.0.redhat-00004.jar:2.28.0.redhat-00004]
at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:212) ~[artemis-cli-2.28.0.redhat-00004.jar:2.28.0.redhat-00004]
at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:162) ~[artemis-cli-2.28.0.redhat-00004.jar:2.28.0.redhat-00004]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:144) ~[artemis-boot.jar:2.28.0.redhat-00004]
at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:61) ~[artemis-boot.jar:2.28.0.redhat-00004]
Caused by: java.lang.StringIndexOutOfBoundsException: begin 0, end -1, length 14
at java.lang.String.checkBoundsBeginEnd(String.java:4602) ~[?:?]
at java.lang.String.substring(String.java:2705) ~[?:?]
at org.apache.logging.log4j.util.PropertiesUtil.partitionOnCommonPrefixes(PropertiesUtil.java:555) ~[log4j-api-2.19.0.redhat-00001.jar:2.19.0.redhat-00001]
at org.apache.logging.log4j.core.config.properties.PropertiesConfigurationBuilder.build(PropertiesConfigurationBuilder.java:174) ~[log4j-core-2.19.0.redhat-00001.jar:2.19.0.redhat-00001]
at org.apache.logging.log4j.core.config.properties.PropertiesConfigurationFactory.getConfiguration(PropertiesConfigurationFactory.java:56) ~[log4j-core-2.19.0.redhat-00001.jar:2.19.0.redhat-00001]
at org.apache.logging.log4j.core.config.properties.PropertiesConfigurationFactory.getConfiguration(PropertiesConfigurationFactory.java:35) ~[log4j-core-2.19.0.redhat-00001.jar:2.19.0.redhat-00001]
at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:523) ~[log4j-core-2.19.0.redhat-00001.jar:2.19.0.redhat-00001]
at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:498) ~[log4j-core-2.19.0.redhat-00001.jar:2.19.0.redhat-00001]
at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:422) ~[log4j-core-2.19.0.redhat-00001.jar:2.19.0.redhat-00001]
at org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:323) ~[log4j-core-2.19.0.redhat-00001.jar:2.19.0.redhat-00001]
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:695) ~[log4j-core-2.19.0.redhat-00001.jar:2.19.0.redhat-00001]
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:716) ~[log4j-core-2.19.0.redhat-00001.jar:2.19.0.redhat-00001]
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:270) ~[log4j-core-2.19.0.redhat-00001.jar:2.19.0.redhat-00001]
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:155) ~[log4j-core-2.19.0.redhat-00001.jar:2.19.0.redhat-00001]
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:47) ~[log4j-core-2.19.0.redhat-00001.jar:2.19.0.redhat-00001]
at org.apache.logging.log4j.LogManager.getContext(LogManager.java:196) ~[log4j-api-2.19.0.redhat-00001.jar:2.19.0.redhat-00001]
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:137) ~[log4j-api-2.19.0.redhat-00001.jar:2.19.0.redhat-00001]
at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:55) ~[log4j-slf4j-impl-2.19.0.redhat-00001.jar:2.19.0.redhat-00001]
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:47) ~[log4j-api-2.19.0.redhat-00001.jar:2.19.0.redhat-00001]
at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:33) ~[log4j-slf4j-impl-2.19.0.redhat-00001.jar:2.19.0.redhat-00001]
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:363) ~[slf4j-api-1.7.36.redhat-00003.jar:1.7.36.redhat-00003]
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:388) ~[slf4j-api-1.7.36.redhat-00003.jar:1.7.36.redhat-00003]
at io.hawt.HawtioContextListener.<clinit>(HawtioContextListener.java:23) ~[?:?]
... 39 more
Environment
- Red Hat AMQ
- 7.11.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.