PacketProcessorWebResource cannot find PacketService when it become instantiated; changed debug logs to trace in FPMManager

Change-Id: I57f39c730bc4101d21dc1c6d7b6387a42c2afb31
(cherry picked from commit 0d7cf74b85729c4346ae53b441793c24af0a3102)
diff --git a/apps/routing/fpm/app/src/main/java/org/onosproject/routing/fpm/FpmManager.java b/apps/routing/fpm/app/src/main/java/org/onosproject/routing/fpm/FpmManager.java
index 59df2b4..9378854 100644
--- a/apps/routing/fpm/app/src/main/java/org/onosproject/routing/fpm/FpmManager.java
+++ b/apps/routing/fpm/app/src/main/java/org/onosproject/routing/fpm/FpmManager.java
@@ -644,7 +644,7 @@
             raLength =  Ip4Address.BYTE_LENGTH + RouteAttribute.ROUTE_ATTRIBUTE_HEADER_LENGTH;
             addrFamily = RtNetlink.RT_ADDRESS_FAMILY_INET;
             for (Ip4Address pdPushNextHop: pdPushNextHopList) {
-                log.debug("IPv4 next hop is:" + pdPushNextHop);
+                log.trace("IPv4 next hop is:" + pdPushNextHop);
                 updateRoute(pdPushNextHop, isAdd, prefix, ch, raLength, addrFamily);
             }
         } else {
@@ -657,7 +657,7 @@
             raLength =  Ip6Address.BYTE_LENGTH + RouteAttribute.ROUTE_ATTRIBUTE_HEADER_LENGTH;
             addrFamily = RtNetlink.RT_ADDRESS_FAMILY_INET6;
             for (Ip6Address pdPushNextHop: pdPushNextHopList) {
-                log.debug("IPv6 next hop is:" + pdPushNextHop);
+                log.trace("IPv6 next hop is:" + pdPushNextHop);
                 updateRoute(pdPushNextHop, isAdd, prefix, ch, raLength, addrFamily);
             }
         }
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/PacketProcessorsWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/PacketProcessorsWebResource.java
index aefd84e..e449079 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/PacketProcessorsWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/PacketProcessorsWebResource.java
@@ -21,7 +21,6 @@
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.onosproject.net.packet.PacketProcessorEntry;
 import org.onosproject.net.packet.PacketService;
-import org.slf4j.Logger;
 
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
@@ -30,7 +29,6 @@
 import javax.ws.rs.core.Response;
 
 import java.util.List;
-import static org.slf4j.LoggerFactory.getLogger;
 import static org.onosproject.net.packet.PacketProcessor.ADVISOR_MAX;
 import static org.onosproject.net.packet.PacketProcessor.DIRECTOR_MAX;
 
@@ -41,11 +39,6 @@
 @Path("packet/processors")
 public class PacketProcessorsWebResource extends AbstractWebResource {
 
-    private final Logger log = getLogger(getClass());
-    PacketService service = get(PacketService.class);
-    private final ObjectNode root = mapper().createObjectNode();
-    private final ArrayNode pktProcNode = root.putArray("packet-processors");
-
     /**
      * Gets packet processors. Returns array of all packet processors.
 
@@ -55,6 +48,9 @@
     @GET
     @Produces(MediaType.APPLICATION_JSON)
     public Response getPacketProcessors() {
+      PacketService service = get(PacketService.class);
+      ObjectNode root = mapper().createObjectNode();
+      ArrayNode pktProcNode = root.putArray("packet-processors");
       List<PacketProcessorEntry> processors = service.getProcessors();
       ObjectMapper mapper = new ObjectMapper();
       for (PacketProcessorEntry p : processors) {