Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-9220

Jetty /api fails to start

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 5.17.3
    • None
    • Web Console
    • None

    Description

      When starting ActiveMQ 5.17.3 on windows server, the  url:  http:/xxx:8161/API fails with error  503.

       

      In the logfile I notice this error:

      2023-02-08 21:20:51 | INFO  | ActiveMQ Jolokia REST API available at http://0.0.0.0:8161/api/jolokia/ | org.apache.activemq.web.WebConsoleStarter | WrapperSimpleAppMain
      2023-02-08 21:20:51 | WARN  | unavailable | org.eclipse.jetty.server.handler.ContextHandler.api | WrapperSimpleAppMain
      java.lang.NullPointerException: Cannot invoke "String.length()" because "replacement" is null
          at java.base/java.util.regex.Matcher.appendExpandedReplacement(Matcher.java:1014)
          at java.base/java.util.regex.Matcher.appendReplacement(Matcher.java:907)
          at org.jolokia.util.NetworkUtil.replaceExpression(NetworkUtil.java:366)
          at org.jolokia.restrictor.RestrictorFactory.createRestrictor(RestrictorFactory.java:48)
          at org.jolokia.http.AgentServlet.createRestrictor(AgentServlet.java:195)
          at org.jolokia.http.AgentServlet.init(AgentServlet.java:135)
          at org.eclipse.jetty.servlet.ServletHolder$Wrapper.init(ServletHolder.java:1345)
          at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:632)
          at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:415)
          at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$0(ServletHandler.java:750)
          at java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357)
          at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510)
          at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
          at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:310)
          at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735)
          at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
          at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:774)
          at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:379)
          at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1449)
          at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1414)
          at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:916)
          at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:288)
          at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524)
          at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
          at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
          at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
          at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
          at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
          at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
          at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
          at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
          at org.eclipse.jetty.security.SecurityHandler.doStart(SecurityHandler.java:411)
          at org.eclipse.jetty.security.ConstraintSecurityHandler.doStart(ConstraintSecurityHandler.java:417)
          at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
          at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
          at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
          at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
          at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
          at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
          at org.eclipse.jetty.server.Server.start(Server.java:423)
          at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
          at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
          at org.eclipse.jetty.server.Server.doStart(Server.java:387)
          at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
          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:568)
          at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:283)
          at org.springframework.beans.factory.config.MethodInvokingBean.invokeWithTargetException(MethodInvokingBean.java:123)
          at org.springframework.beans.factory.config.MethodInvokingFactoryBean.afterPropertiesSet(MethodInvokingFactoryBean.java:108)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
          at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
          at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
          at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:936)
          at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
          at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)
          at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)
          at org.apache.activemq.xbean.XBeanBrokerFactory$1.<init>(XBeanBrokerFactory.java:104)
          at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:104)
          at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:67)
          at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
          at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
          at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:87)
          at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:63)
          at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:154)
          at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:63)
          at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)
          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:568)
          at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
          at org.apache.activemq.console.Main.main(Main.java:115)
          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:568)
          at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
          at java.base/java.lang.Thread.run(Thread.java:833)
      2023-02-08 21:20:51 | WARN  | Failed startup of context o.e.j.w.WebAppContext@6825d475{Apache ActiveMQ REST API,/api,file:///D:/APP/ActiveMQ/apache-activemq-5.17.3/webapps/api/,UNAVAILABLE} | org.eclipse.jetty.webapp.WebAppContext | WrapperSimpleAppMain
      javax.servlet.ServletException: jolokia-agent==org.jolokia.http.AgentServlet@c61e72f3{jsp=null,order=1,inst=true,async=false,src=DESCRIPTOR:file:///D:/APP/ActiveMQ/apache-activemq-5.17.3/webapps/api/WEB-INF/web.xml,STARTED}
          at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:650)
          at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:415)
          at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$0(ServletHandler.java:750)
          at java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357)
          at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510)
          at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
          at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:310)
          at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735)
          at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
          at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:774)
          at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:379)
          at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1449)
          at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1414)
          at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:916)
          at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:288)
          at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524)
          at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
          at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
          at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
          at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
          at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
          at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
          at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
          at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
          at org.eclipse.jetty.security.SecurityHandler.doStart(SecurityHandler.java:411)
          at org.eclipse.jetty.security.ConstraintSecurityHandler.doStart(ConstraintSecurityHandler.java:417)
          at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
          at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
          at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
          at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
          at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
          at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
          at org.eclipse.jetty.server.Server.start(Server.java:423)
          at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
          at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
          at org.eclipse.jetty.server.Server.doStart(Server.java:387)
          at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
          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:568)
          at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:283)
          at org.springframework.beans.factory.config.MethodInvokingBean.invokeWithTargetException(MethodInvokingBean.java:123)
          at org.springframework.beans.factory.config.MethodInvokingFactoryBean.afterPropertiesSet(MethodInvokingFactoryBean.java:108)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
          at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
          at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
          at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:936)
          at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
          at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)
          at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)
          at org.apache.activemq.xbean.XBeanBrokerFactory$1.<init>(XBeanBrokerFactory.java:104)
          at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:104)
          at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:67)
          at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
          at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
          at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:87)
          at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:63)
          at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:154)
          at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:63)
          at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)
          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:568)
          at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
          at org.apache.activemq.console.Main.main(Main.java:115)
          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:568)
          at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
          at java.base/java.lang.Thread.run(Thread.java:833)
      Caused by: java.lang.NullPointerException: Cannot invoke "String.length()" because "replacement" is null
          at java.base/java.util.regex.Matcher.appendExpandedReplacement(Matcher.java:1014)
          at java.base/java.util.regex.Matcher.appendReplacement(Matcher.java:907)
          at org.jolokia.util.NetworkUtil.replaceExpression(NetworkUtil.java:366)
          at org.jolokia.restrictor.RestrictorFactory.createRestrictor(RestrictorFactory.java:48)
          at org.jolokia.http.AgentServlet.createRestrictor(AgentServlet.java:195)
          at org.jolokia.http.AgentServlet.init(AgentServlet.java:135)
          at org.eclipse.jetty.servlet.ServletHolder$Wrapper.init(ServletHolder.java:1345)
          at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:632)
          ... 78 more

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jbonofre Jean-Baptiste Onofré
            j-d-c Jan Declercq
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment