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

[Java Broker] Creation of SiteSpecificTrustStore with invalid site url results in broken REST interfaces due to NPE thrown on generation of REST data

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • qpid-java-6.0
    • qpid-java-6.0
    • Broker-J
    • None

    Description

      After attempt to create SiteSpecificTrustStore with invalid site URL, an error is reported and trust store is not created, however, all subsequent calls to broker REST interface result in NPE

      2015-11-20 17:00:37,093 WARN  [HttpManagement-HTTP-303] (o.e.j.s.ServletHandler) - /api/latest/broker^M
      java.lang.NullPointerException: null^M
              at org.apache.qpid.server.security.SiteSpecificTrustStoreImpl.getCertificate(SiteSpecificTrustStoreImpl.java:123) ~[qpid-broker-core-6.0.0.jar:6.0.0]^M
              at sun.reflect.GeneratedMethodAccessor149.invoke(Unknown Source) ~[na:na]^M
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_79]^M
              at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_79]^M
              at org.apache.qpid.server.model.ConfiguredObjectAttributeOrStatistic.getValue(ConfiguredObjectAttributeOrStatistic.java:60) ~[qpid-broker-core-6.0.0.jar:6.0.0]^M
              at org.apache.qpid.server.model.ConfiguredObjectAttribute.getValue(ConfiguredObjectAttribute.java:27) ~[qpid-broker-core-6.0.0.jar:6.0.0]^M
              at org.apache.qpid.server.model.AbstractConfiguredObject.getAttribute(AbstractConfiguredObject.java:1585) ~[qpid-broker-core-6.0.0.jar:6.0.0]^M
              at org.apache.qpid.server.management.plugin.servlet.rest.ConfiguredObjectToMapConverter.incorporateAttributesIntoMap(ConfiguredObjectToMapConverter.java:117) ~[qpid-broker-plugins-management-h
      ttp-6.0.0.jar:6.0.0]^M
              at org.apache.qpid.server.management.plugin.servlet.rest.ConfiguredObjectToMapConverter.convertObjectToMap(ConfiguredObjectToMapConverter.java:66) ~[qpid-broker-plugins-management-http-6.0.0.j
      ar:6.0.0]^M
              at org.apache.qpid.server.management.plugin.servlet.rest.ConfiguredObjectToMapConverter.incorporateChildrenIntoMap(ConfiguredObjectToMapConverter.java:290) ~[qpid-broker-plugins-management-htt
      p-6.0.0.jar:6.0.0]^M
              at org.apache.qpid.server.management.plugin.servlet.rest.ConfiguredObjectToMapConverter.convertObjectToMap(ConfiguredObjectToMapConverter.java:75) ~[qpid-broker-plugins-management-http-6.0.0.j
      ar:6.0.0]^M
              at org.apache.qpid.server.management.plugin.servlet.rest.RestServlet.doGetWithSubjectAndActor(RestServlet.java:406) ~[qpid-broker-plugins-management-http-6.0.0.jar:6.0.0]^M
              at org.apache.qpid.server.management.plugin.servlet.rest.AbstractServlet$1.run(AbstractServlet.java:90) ~[qpid-broker-plugins-management-http-6.0.0.jar:6.0.0]^M
              at org.apache.qpid.server.management.plugin.servlet.rest.AbstractServlet$1.run(AbstractServlet.java:86) ~[qpid-broker-plugins-management-http-6.0.0.jar:6.0.0]^M
              at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_79]^M
              at javax.security.auth.Subject.doAs(Subject.java:415) ~[na:1.7.0_79]^M
              at org.apache.qpid.server.management.plugin.servlet.rest.AbstractServlet.doWithSubjectAndActor(AbstractServlet.java:215) ~[qpid-broker-plugins-management-http-6.0.0.jar:6.0.0]^M
              at org.apache.qpid.server.management.plugin.servlet.rest.AbstractServlet.doGet(AbstractServlet.java:84) ~[qpid-broker-plugins-management-http-6.0.0.jar:6.0.0]^M
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:575) ~[geronimo-servlet_3.0_spec-1.0.jar:1.0]^M
      

      Attachments

        Activity

          People

            lorenz.quack Lorenz Quack
            orudyy Alex Rudyy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: