Uploaded image for project: 'Stratos'
  1. Stratos
  2. STRATOS-1575

NPE when deploying an application policy with no properties defined

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.1.3
    • Fix Version/s: None
    • Component/s: Autoscaler
    • Labels:
      None

      Description

      Below application policy deployment fails with the bug
      {
      "algorithm": "one-after-another",
      "id": "application-policy-r1",
      "networkPartitions": [
      "network-partition-r2"
      ],
      "properties": [
      {
      }
      ]
      }

      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
      at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1736)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1695)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.NullPointerException
      at org.apache.stratos.common.Properties.getProperty(Properties.java:59)
      at org.apache.stratos.autoscaler.util.AutoscalerUtil.validateApplicationPolicy(AutoscalerUtil.java:596)
      at org.apache.stratos.autoscaler.services.impl.AutoscalerServiceImpl.addApplicationPolicy(AutoscalerServiceImpl.java:849)
      ... 47 more
      TID: [0] [STRATOS] [2015-09-22 21:46:46,658] ERROR

      {org.apache.stratos.rest.endpoint.api.StratosApiV41Utils}

      - Could not add application policy. Exception occurred while trying to invoke service method addApplicationPolicy
      org.apache.axis2.AxisFault: Exception occurred while trying to invoke service method addApplicationPolicy
      at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              udaraliyanage Udara Liyanage
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: