Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-6019

Queue added to model even if attribute resolution fails

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.30, 0.31
    • Fix Version/s: 0.30
    • Component/s: Broker-J
    • Labels:
      None

      Description

      If when using the Management UI if I incorrect specify an attribute when creating a queue, for instance, I pass a system property ${foo}, with a value bar to an attribute that expects a number, I receive an error message on screen:

      For input string: "bar"

      and the stack trace (1) below in the logs. The error message is obviously less than idea, however this exposes a second problem. I then see stack trace (2) periodically appearing in the logs. It can be see that even though child creation apparently failed, the object has be in fact registered with the parent and exists in the model.

      (1)

      java.lang.NumberFormatException: For input string: "bar"
              at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
              at java.lang.Long.parseLong(Long.java:430)
              at java.lang.Long.valueOf(Long.java:540)
              at org.apache.qpid.server.model.AttributeValueConverter$3.convert(AttributeValueConverter.java:92)
              at org.apache.qpid.server.model.AttributeValueConverter$3.convert(AttributeValueConverter.java:77)
              at org.apache.qpid.server.model.ConfiguredObjectAttribute.convert(ConfiguredObjectAttribute.java:51)
              at org.apache.qpid.server.model.AbstractConfiguredObject.automatedSetValue(AbstractConfiguredObject.java:367)
              at org.apache.qpid.server.model.AbstractConfiguredObject.resolveAutomatedAttribute(AbstractConfiguredObject.java:680)
              at org.apache.qpid.server.model.AbstractConfiguredObject.onResolve(AbstractConfiguredObject.java:635)
              at org.apache.qpid.server.model.AbstractConfiguredObject.doResolution(AbstractConfiguredObject.java:543)
              at org.apache.qpid.server.model.AbstractConfiguredObject.create(AbstractConfiguredObject.java:475)
              at org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory.create(AbstractConfiguredObjectTypeFactory.java:58)
              at org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory.create(AbstractConfiguredObjectTypeFactory.java:31)
              at org.apache.qpid.server.model.ConfiguredObjectFactoryImpl.create(ConfiguredObjectFactoryImpl.java:112)
              at org.apache.qpid.server.virtualhost.AbstractVirtualHost.addQueueWithoutDLQ(AbstractVirtualHost.java:569)
              at org.apache.qpid.server.virtualhost.AbstractVirtualHost.addQueue(AbstractVirtualHost.java:562)
              at org.apache.qpid.server.virtualhost.AbstractVirtualHost.addChild(AbstractVirtualHost.java:387)
              at org.apache.qpid.server.model.AbstractConfiguredObject$10.execute(AbstractConfiguredObject.java:1142)
              at org.apache.qpid.server.model.AbstractConfiguredObject$10.execute(AbstractConfiguredObject.java:1136)
              at org.apache.qpid.server.configuration.updater.TaskExecutorImpl.executeTask(TaskExecutorImpl.java:299)
              at org.apache.qpid.server.configuration.updater.TaskExecutorImpl.access$400(TaskExecutorImpl.java:43)
              at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$CallableWrapper$1.run(TaskExecutorImpl.java:327)
              at java.security.AccessController.doPrivileged(Native Method)
              at javax.security.auth.Subject.doAs(Subject.java:356)
              at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$CallableWrapper.call(TaskExecutorImpl.java:322)
              at java.util.concurrent.FutureTask.run(FutureTask.java:262)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
              at java.lang.Thread.run(Thread.java:745)
      

      (2)

      2014-08-18 21:41:36,351 WARN  [qtp2076101692-28] (servlet.ServletHandler) - /api/latest/virtualhost/myvhost/myvhost
      java.lang.NullPointerException
      	at org.apache.qpid.server.queue.AbstractQueue.getOldestMessageArrivalTime(AbstractQueue.java:1428)
      	at org.apache.qpid.server.queue.AbstractQueue.getOldestMessageAge(AbstractQueue.java:1466)
      	at sun.reflect.GeneratedMethodAccessor130.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.apache.qpid.server.model.ConfiguredObjectAttributeOrStatistic.getValue(ConfiguredObjectAttributeOrStatistic.java:138)
      	at org.apache.qpid.server.model.AbstractConfiguredObject.getStatistics(AbstractConfiguredObject.java:1376)
      	at org.apache.qpid.server.management.plugin.servlet.rest.ConfiguredObjectToMapConverter.incorporateStatisticsIntoMap(ConfiguredObjectToMapConverter.java:112)
      	at org.apache.qpid.server.management.plugin.servlet.rest.ConfiguredObjectToMapConverter.convertObjectToMap(ConfiguredObjectToMapConverter.java:45)
      	at org.apache.qpid.server.management.plugin.servlet.rest.ConfiguredObjectToMapConverter.incorporateChildrenIntoMap(ConfiguredObjectToMapConverter.java:135)
      	at org.apache.qpid.server.management.plugin.servlet.rest.ConfiguredObjectToMapConverter.convertObjectToMap(ConfiguredObjectToMapConverter.java:49)
      	at org.apache.qpid.server.management.plugin.servlet.rest.RestServlet.doGetWithSubjectAndActor(RestServlet.java:326)
      	at org.apache.qpid.server.management.plugin.servlet.rest.AbstractServlet$1.run(AbstractServlet.java:79)
      	at org.apache.qpid.server.management.plugin.servlet.rest.AbstractServlet$1.run(AbstractServlet.java:75)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at javax.security.auth.Subject.doAs(Subject.java:415)
      	at org.apache.qpid.server.management.plugin.servlet.rest.AbstractServlet.doWithSubjectAndActor(AbstractServlet.java:210)
      	at org.apache.qpid.server.management.plugin.servlet.rest.AbstractServlet.doGet(AbstractServlet.java:73)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:575)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1496)
      	at org.apache.qpid.server.management.plugin.filter.ForbiddingAuthorisationFilter.doFilter(ForbiddingAuthorisationFilter.java:90)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1467)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
      	at org.eclipse.jetty.server.Server.handle(Server.java:370)
      	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
      	at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)
      	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)
      	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
      	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
      	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
      	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)
      	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
      	at java.lang.Thread.run(Thread.java:745)
      

        Attachments

          Activity

            People

            • Assignee:
              orudyy Alex Rudyy
              Reporter:
              kwall Keith Wall
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: