diff --git a/src/main/java/net/floodlightcontroller/staticentry/StaticEntryPusher.java b/src/main/java/net/floodlightcontroller/staticentry/StaticEntryPusher.java index f45c241c92f96bfe5a9c4edf52009dbc58c666cf..ae20a628c088fdc9423c4b9b13f7c4ca678aed7d 100644 --- a/src/main/java/net/floodlightcontroller/staticentry/StaticEntryPusher.java +++ b/src/main/java/net/floodlightcontroller/staticentry/StaticEntryPusher.java @@ -300,7 +300,7 @@ implements IOFSwitchListener, IFloodlightModule, IStaticEntryPusherService, ISto } try { - switchName = (String) row.get(Columns.COLUMN_SWITCH); + switchName = DatapathId.of((String) row.get(Columns.COLUMN_SWITCH)).toString(); entryName = (String) row.get(Columns.COLUMN_NAME); String tmp = (String) row.get(Columns.COLUMN_ENTRY_TYPE); @@ -399,7 +399,7 @@ implements IOFSwitchListener, IFloodlightModule, IStaticEntryPusherService, ISto matchString.append(key + "=" + row.get(key).toString()); } } - } catch (ClassCastException e) { + } catch (Exception e) { if (entryName != null && switchName != null) { log.warn("Skipping entry {} on switch {} with bad data : " + e.getMessage(), entryName, switchName); } else { diff --git a/src/main/java/net/floodlightcontroller/util/ActionUtils.java b/src/main/java/net/floodlightcontroller/util/ActionUtils.java index 68832bed235f1efb2d0e4a8a2186e245407f7734..e7f274e3793908e288d25ecca514162a97f7de9a 100644 --- a/src/main/java/net/floodlightcontroller/util/ActionUtils.java +++ b/src/main/java/net/floodlightcontroller/util/ActionUtils.java @@ -110,6 +110,7 @@ import org.slf4j.LoggerFactory; import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonToken; + import com.fasterxml.jackson.core.JsonGenerator.Feature; import com.fasterxml.jackson.core.JsonParser; @@ -184,7 +185,7 @@ public class ActionUtils { } switch(a.getType()) { case OUTPUT: - sb.append(STR_OUTPUT).append("=").append(Integer.toString(((OFActionOutput)a).getPort().getPortNumber())); + sb.append(STR_OUTPUT).append("=").append(ActionUtils.portToString(((OFActionOutput)a).getPort())); break; case ENQUEUE: long queue = ((OFActionEnqueue)a).getQueueId();