Enforce SpotBugs in inventory build process
[transportpce.git] / inventory / src / main / java / org / opendaylight / transportpce / inventory / INode121.java
index 5ba9a938f3500a9b666433418fa5ac05b7deca6b..04e408cf42dc68ecd83dd54d66c55d7f05c0a2dd 100644 (file)
@@ -8,11 +8,11 @@
 
 package org.opendaylight.transportpce.inventory;
 
+import static java.util.Objects.requireNonNull;
 import static org.opendaylight.transportpce.inventory.utils.StringUtils.getCurrentTimestamp;
 import static org.opendaylight.transportpce.inventory.utils.StringUtils.prepareDashString;
 import static org.opendaylight.transportpce.inventory.utils.StringUtils.prepareEmptyString;
 
-import com.google.common.base.Preconditions;
 import java.sql.Connection;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
@@ -53,13 +53,14 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.odu.interfaces.rev161
 import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.odu.interfaces.rev161014.opu.opu.msi.RxMsi;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.odu.interfaces.rev161014.opu.opu.msi.TxMsi;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.otu.interfaces.rev161014.otu.container.OtuBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.rstp.rev161014.rstp.bridge.port.attr.RstpBridgePortTable;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.rstp.rev161014.rstp.container.rstp.RstpBridgeInstance;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.wavelength.map.rev161014.wavelength.map.g.Wavelengths;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+@edu.umd.cs.findbugs.annotations.SuppressFBWarnings(
+    value = "SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING",
+    justification = "TODO review the SQL statement generation process")
 public class INode121 {
 
     private static final Logger LOG = LoggerFactory.getLogger(INode121.class);
@@ -89,7 +90,7 @@ public class INode121 {
         String query = Queries.getQuery().deviceInfoInsert().get();
         LOG.info("Running {} query ", query);
         try (Connection connection = dataSource.getConnection();
-             PreparedStatement preparedStatement = connection.prepareStatement(query)) {
+                PreparedStatement preparedStatement = connection.prepareStatement(query)) {
             Object[] prepareParameters = prepareDeviceInfoParameters(deviceInfo);
             for (int i = 0; i < prepareParameters.length; i++) {
                 LOG.debug("Parameter {} has value {}", i + 1, prepareParameters[i]);
@@ -148,12 +149,8 @@ public class INode121 {
             persistDevConnectionMap(deviceId, connection);
             LOG.debug("iNode persist Connection Map call complete");
 
-        } catch (SQLException e) {
-            LOG.error(e.getMessage(), e);
-        } catch (InterruptedException e) {
-            LOG.error(e.getMessage(), e);
-        } catch (ExecutionException e) {
-            LOG.error(e.getMessage(), e);
+        } catch (SQLException | InterruptedException | ExecutionException e) {
+            LOG.error("Something wrong when storing node into DB", e);
         }
         return sqlResult;
     }
@@ -172,7 +169,7 @@ public class INode121 {
                 }
             }
         } catch (SQLException e) {
-            LOG.error(e.getMessage(), e);
+            LOG.error("Something wrong when fetching node in DB", e);
         }
         return nodeExists == 0 ? false : true;
     }
@@ -184,8 +181,7 @@ public class INode121 {
                 Timeouts.DEVICE_READ_TIMEOUT_UNIT);
 
         LOG.info("Shelves size {}", deviceObject.get().getShelves().size());
-        try (Connection connection = dataSource.getConnection()) {
-            Preconditions.checkNotNull(connection);
+        try (Connection connection = requireNonNull(dataSource.getConnection())) {
             for (int i = 0; i < deviceObject.get().getShelves().size(); i++) {
                 Shelves shelve = deviceObject.get().getShelves().get(i);
                 String shelfName = shelve.getShelfName();
@@ -201,7 +197,7 @@ public class INode121 {
                 persistShelves(nodeId, connection, shelve);
             }
         } catch (SQLException e1) {
-            LOG.error(e1.getMessage(), e1);
+            LOG.error("Something wrong when fetching ROADM shelves in DB", e1);
         }
     }
 
@@ -216,8 +212,7 @@ public class INode121 {
         }
         LOG.info("Circuit pack size {}", deviceObject.get().getCircuitPacks().size());
 
-        try (Connection connection = dataSource.getConnection()) {
-            Preconditions.checkNotNull(connection);
+        try (Connection connection = requireNonNull(dataSource.getConnection())) {
             for (int i = 0; i < deviceObject.get().getCircuitPacks().size(); i++) {
                 CircuitPacks cp = deviceObject.get().getCircuitPacks().get(i);
 
@@ -234,7 +229,7 @@ public class INode121 {
                 persistCircuitPacks(nodeId, connection, cp);
             }
         } catch (SQLException e1) {
-            LOG.error(e1.getMessage(), e1);
+            LOG.error("Something wrong when fetching Circuit Packs in DB", e1);
         }
     }
 
@@ -249,7 +244,7 @@ public class INode121 {
             stmt.execute();
             stmt.clearParameters();
         } catch (SQLException e) {
-            LOG.error(e.getMessage(), e);
+            LOG.error("Something wrong when storing Circuit Packs in DB", e);
         }
     }
 
@@ -264,7 +259,7 @@ public class INode121 {
             preparedStmt.execute();
             preparedStmt.clearParameters();
         } catch (SQLException e) {
-            LOG.error(e.getMessage(), e);
+            LOG.error("Something wrong when storing shelves in DB", e);
         }
     }
 
@@ -290,7 +285,7 @@ public class INode121 {
                 stmt.execute();
                 stmt.clearParameters();
             } catch (SQLException e) {
-                LOG.error(e.getMessage(), e);
+                LOG.error("Something wrong when storing shelves slots in DB", e);
             }
         }
     }
@@ -319,16 +314,11 @@ public class INode121 {
                 stmt.execute();
                 stmt.clearParameters();
             } catch (SQLException e) {
-                LOG.error(e.getMessage(), e);
+                LOG.error("Something wrong when storing Cirtcuits Packs slots in DB", e);
             }
         }
     }
 
-    private void persistPorts(CircuitPacks circuitPacks, Connection connection) {
-        LOG.warn("Ports are not persisted yet");
-    }
-
-
     /**
      * Prepares parameters for device insert query.
      *
@@ -517,7 +507,7 @@ public class INode121 {
                 cpPort.getOtdrPort().getLaunchCableLength().toString()));
         String otdrPortPortDirection = (cpPort.getOtdrPort() == null ? "-1" :
             (cpPort.getOtdrPort().getPortDirection() == null ? "-1" :
-                Integer.valueOf(cpPort.getOtdrPort().getPortDirection().getIntValue()).toString()));
+                Integer.toString(cpPort.getOtdrPort().getPortDirection().getIntValue())));
         //String ilaPortPortPowerCapabilityMixRx = "";
         //String ilaPortPortPowerCapabilityMixTx = "";
         //String ilaPortPortPowerCapabilityMaxRx = "";
@@ -618,7 +608,7 @@ public class INode121 {
                 preparedStmt.execute();
                 preparedStmt.clearParameters();
             } catch (SQLException e) {
-                LOG.error(e.getMessage(), e);
+                LOG.error("Something wrong when storing Cirtcuits Packs Ports in DB", e);
             }
         }
     }
@@ -632,7 +622,7 @@ public class INode121 {
         String maintTestsignalTypeEnu = "";
         String otuFecEnu = "";
         String otuMaintTypeEnu = "";
-        String otsFiberTypeEnu = "";
+        //String otsFiberTypeEnu = "";
         String ethernetSpeed = "-1";
         String ethernetFec = "";
         String ethernetMtu = "-1";
@@ -718,7 +708,7 @@ public class INode121 {
                 EthernetBuilder ethIfBuilder = new EthernetBuilder(deviceInterface.augmentation(Interface1.class)
                     .getEthernet());
                 ethernetSpeed = (ethIfBuilder.getSpeed() == null ? "-1" :
-                    Integer.valueOf(ethIfBuilder.getSpeed().intValue()).toString());
+                    Integer.toString(ethIfBuilder.getSpeed().intValue()));
                 ethernetFec = ethIfBuilder.getFec().getName();
                 ethernetDuplexEnu = (ethIfBuilder.getDuplex() == null ? "" : ethIfBuilder.getDuplex().getName());
                 ethernetMtu = ethIfBuilder.getMtu().toString();
@@ -743,7 +733,7 @@ public class INode121 {
                     org.opendaylight.yang.gen.v1
                         .http.org.openroadm.optical.transport.interfaces.rev161014.Interface1.class)
                     .getOts());
-                otsFiberTypeEnu = String.valueOf(otsIfBuilder.getFiberType().getIntValue());
+                //otsFiberTypeEnu = String.valueOf(otsIfBuilder.getFiberType().getIntValue());
                 otsSpanLossReceive = otsIfBuilder.getSpanLossReceive().toString();
                 otsSpanLossTransmit = otsIfBuilder.getSpanLossTransmit().toString();
                 break;
@@ -771,8 +761,8 @@ public class INode121 {
                 maintTestsignalEnabled = oduIfBuilder.getMaintTestsignal().isEnabled().toString();
                 maintTestsignalTestpatternEnu = oduIfBuilder.getMaintTestsignal().getTestPattern().getName();
                 maintTestsignalTypeEnu = oduIfBuilder.getMaintTestsignal().getType().getName();
-                maintTestsignalBiterrors = Integer.valueOf(oduIfBuilder.getMaintTestsignal().getBitErrors().intValue())
-                    .toString();
+                maintTestsignalBiterrors = Integer.toString(
+                        oduIfBuilder.getMaintTestsignal().getBitErrors().intValue());
                 maintTestsignalBiterrorsterminal = oduIfBuilder.getMaintTestsignal().getBitErrorsTerminal().toString();
                 maintTestsignalSyncseconds = oduIfBuilder.getMaintTestsignal().getSyncSeconds();
                 maintTestsignalSyncsecondsterminal = oduIfBuilder.getMaintTestsignal().getSyncSecondsTerminal();
@@ -1039,7 +1029,7 @@ public class INode121 {
                 stmt.execute();
                 stmt.clearParameters();
             } catch (SQLException e) {
-                LOG.error(e.getMessage(), e);
+                LOG.error("Something wrong when storing devices interfaces in DB", e);
             }
         }
     }
@@ -1082,7 +1072,7 @@ public class INode121 {
                 stmt.execute();
                 stmt.clearParameters();
             } catch (SQLException e) {
-                LOG.error(e.getMessage(), e);
+                LOG.error("Something wrong when storing devices protocols in DB", e);
             }
         }
     }
@@ -1122,7 +1112,7 @@ public class INode121 {
                 stmt.execute();
                 stmt.clearParameters();
             } catch (SQLException e) {
-                LOG.error(e.getMessage(), e);
+                LOG.error("Something wrong when storing devices protocols LLDP Port config in DB", e);
             }
 
         }
@@ -1183,183 +1173,13 @@ public class INode121 {
                     stmt.execute();
                     stmt.clearParameters();
                 } catch (SQLException e) {
-                    LOG.error(e.getMessage(), e);
-                }
-
-            }
-        }
-    }
-
-    private void persistDevProtocolRstp(String nodeId, Connection connection) {
-
-        InstanceIdentifier<Protocols> protocolsIID =
-                InstanceIdentifier.create(OrgOpenroadmDevice.class).child(Protocols.class);
-        Optional<Protocols> protocolObject =
-                deviceTransactionManager.getDataFromDevice(nodeId, LogicalDatastoreType.CONFIGURATION, protocolsIID,
-                        Timeouts.DEVICE_READ_TIMEOUT, Timeouts.DEVICE_READ_TIMEOUT_UNIT);
-        if (!protocolObject.isPresent() || protocolObject.get().augmentation(Protocols1.class) == null) {
-            LOG.error("LLDP subtree is missing");
-
-        }
-        String startTimestamp = getCurrentTimestamp();
-        for (int i = 0; i < protocolObject.get()
-            .augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.rstp.rev161014.Protocols1.class)
-            .getRstp().getRstpBridgeInstance().size(); i++) {
-
-            RstpBridgeInstance rstpBridgeInstance = protocolObject.get()
-                .augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.rstp.rev161014.Protocols1.class)
-                .getRstp().getRstpBridgeInstance().get(i);
-            String bridgeName = rstpBridgeInstance.getBridgeName();
-            String bridgePriority = rstpBridgeInstance.getRstpConfig().getBridgePriority().toString();
-            String shutdown = rstpBridgeInstance.getRstpConfig().getShutdown().toString();
-            String holdTime = rstpBridgeInstance.getRstpConfig().getHoldTime().toString();
-            String helloTime = rstpBridgeInstance.getRstpConfig().getHelloTime().toString();
-            String maxAge = rstpBridgeInstance.getRstpConfig().getMaxAge().toString();
-            String forwardDelay = rstpBridgeInstance.getRstpConfig().getForwardDelay().toString();
-            String transmitHoldCount = rstpBridgeInstance.getRstpConfig().getTransmitHoldCount().toString();
-            String rootBridgePort =
-                rstpBridgeInstance.getRstpState().getRstpBridgeAttr().getRootBridgePort().toString();
-            String rootPathCost = rstpBridgeInstance.getRstpState().getRstpBridgeAttr().getRootPathCost().toString();
-            String rootBridgePriority =
-                rstpBridgeInstance.getRstpState().getRstpBridgeAttr().getRootBridgePriority().toString();
-            String rootBridgeId = rstpBridgeInstance.getRstpState().getRstpBridgeAttr().getRootBridgeId().toString();
-            String rootHoldTime = rstpBridgeInstance.getRstpState().getRstpBridgeAttr().getRootHoldTime().toString();
-            String rootHelloTime = rstpBridgeInstance.getRstpState().getRstpBridgeAttr().getRootHelloTime().toString();
-            String rootMaxAge = rstpBridgeInstance.getRstpState().getRstpBridgeAttr().getRootMaxAge().toString();
-            String rootForwardDelay =
-                rstpBridgeInstance.getRstpState().getRstpBridgeAttr().getRootForwardDelay().toString();
-            String bridgeId = rstpBridgeInstance.getRstpState().getRstpBridgeAttr().getBridgeId().toString();
-            String topoChangeCount =
-                rstpBridgeInstance.getRstpState().getRstpBridgeAttr().getTopoChangeCount().toString();
-            String timeSinceTopoChange =
-                rstpBridgeInstance.getRstpState().getRstpBridgeAttr().getTimeSinceTopoChange().toString();
-
-            persistDevProtocolRstpBridgePort(nodeId, bridgeName, rstpBridgeInstance, connection);
-            persistDevProtocolRstpBridgePortAttr(nodeId, bridgeName, rstpBridgeInstance, connection);
-
-            Object[] parameters = {nodeId,
-                bridgeName,
-                bridgePriority,
-                shutdown,
-                holdTime,
-                helloTime,
-                maxAge,
-                forwardDelay,
-                transmitHoldCount,
-                rootBridgePort,
-                rootPathCost,
-                rootBridgePriority,
-                rootBridgeId,
-                rootHoldTime,
-                rootHelloTime,
-                rootMaxAge,
-                rootForwardDelay,
-                bridgeId,
-                topoChangeCount,
-                timeSinceTopoChange,
-                startTimestamp,
-                startTimestamp
-            };
-
-            String query = Queries.getQuery().deviceProtocolRstpInsert().get();
-            LOG.info("Running {} query ", query);
-            try (PreparedStatement stmt = connection.prepareStatement(query)) {
-                for (int j = 0; j < parameters.length; j++) {
-                    stmt.setObject(j + 1, parameters[j]);
-                }
-                stmt.execute();
-                stmt.clearParameters();
-            } catch (SQLException e) {
-                LOG.error(e.getMessage(), e);
-            }
-
-        }
-    }
-
-    private void persistDevProtocolRstpBridgePort(String nodeId, String bridgeName,
-        RstpBridgeInstance rstpBridgeInstance, Connection connection) {
-
-        String startTimestamp = getCurrentTimestamp();
-        for (int i = 0; i < rstpBridgeInstance.getRstpConfig().getRstpBridgePortTable().size(); i++) {
-            RstpBridgePortTable rstpBridgePortTable =
-                rstpBridgeInstance.getRstpConfig().getRstpBridgePortTable().get(i);
-
-            String ifName = rstpBridgePortTable.getIfname();
-            String cost = rstpBridgePortTable.getCost().toString();
-            String priority = rstpBridgePortTable.getPriority().toString();
-
-            Object[] parameters = {nodeId,
-                bridgeName,
-                ifName,
-                cost,
-                priority,
-                startTimestamp,
-                startTimestamp
-            };
-
-            String query = Queries.getQuery().deviceProtocolRstpBridgePortInsert().get();
-            LOG.info("Running {} query ", query);
-            try (PreparedStatement stmt = connection.prepareStatement(query)) {
-                for (int j = 0; j < parameters.length; j++) {
-                    stmt.setObject(j + 1, parameters[j]);
+                    LOG.error("Something wrong when storing devices protocols LLDP list number in DB", e);
                 }
-                stmt.execute();
-                stmt.clearParameters();
-            } catch (SQLException e) {
-                LOG.error(e.getMessage(), e);
-            }
-
-        }
-    }
-
-    private void persistDevProtocolRstpBridgePortAttr(String nodeId, String bridgeName,
-        RstpBridgeInstance rstpBridgeInstance, Connection connection) {
 
-        String startTimestamp = getCurrentTimestamp();
-        for (int i = 0; i < rstpBridgeInstance.getRstpState().getRstpBridgePortAttr().getRstpBridgePortTable().size();
-            i++) {
-
-            org.opendaylight.yang.gen.v1.http.org.openroadm.rstp.rev161014.rstp.bridge.port.state.attr
-                .RstpBridgePortTable rstpBridgePortTableAttr =
-                    rstpBridgeInstance.getRstpState().getRstpBridgePortAttr().getRstpBridgePortTable().get(i);
-
-            String ifName = rstpBridgePortTableAttr.getIfname();
-            String bridgePortState = rstpBridgePortTableAttr.getBridgePortState().getName();
-            String bridgePortRole = rstpBridgePortTableAttr.getBridgePortRole().getName();
-            String bridgePortId = rstpBridgePortTableAttr.getBridgePortId().toString();
-            String openEdgeBridgePort = rstpBridgePortTableAttr.getOperEdgeBridgePort().toString();
-            String designatedBridgePort = rstpBridgePortTableAttr.getDesignatedBridgePort().toString();
-            String designatedBridgeId = rstpBridgePortTableAttr.getDesignatedBridgeid().toString();
-
-            Object[] parameters = {nodeId,
-                bridgeName,
-                ifName,
-                bridgePortState,
-                bridgePortRole,
-                bridgePortId,
-                openEdgeBridgePort,
-                designatedBridgePort,
-                designatedBridgeId,
-                startTimestamp,
-                startTimestamp
-            };
-
-            String query = Queries.getQuery().deviceProtocolRstpBridgePortAttrInsert().get();
-            LOG.info("Running {} query ", query);
-            try (PreparedStatement stmt = connection.prepareStatement(query)) {
-                for (int j = 0; j < parameters.length; j++) {
-                    stmt.setObject(j + 1, parameters[j]);
-                }
-                stmt.execute();
-                stmt.clearParameters();
-            } catch (SQLException e) {
-                LOG.error(e.getMessage(), e);
             }
-
         }
     }
 
-
     private void persistDevInternalLinks(String nodeId, Connection connection) {
 
         InstanceIdentifier<OrgOpenroadmDevice> deviceIID = InstanceIdentifier.create(OrgOpenroadmDevice.class);
@@ -1404,7 +1224,7 @@ public class INode121 {
                     stmt.execute();
                     stmt.clearParameters();
                 } catch (SQLException e) {
-                    LOG.error(e.getMessage(), e);
+                    LOG.error("Something wrong when storing devices internal links", e);
                 }
 
             }
@@ -1433,10 +1253,10 @@ public class INode121 {
                 String externalLinkName = externalLink.getExternalLinkName();
                 String sourceNodeId = externalLink.getSource().getNodeId();
                 String sourceCircuitPackName = externalLink.getSource().getCircuitPackName();
-                String sourcePortName = externalLink.getSource().getPortName().toString();
+                String sourcePortName = externalLink.getSource().getPortName();
                 String destinationNodeId = externalLink.getDestination().getNodeId();
                 String destinationCircuitPackName = externalLink.getDestination().getCircuitPackName();
-                String destinationPortName = externalLink.getDestination().getPortName().toString();
+                String destinationPortName = externalLink.getDestination().getPortName();
 
                 Object[] parameters = {nodeId,
                     externalLinkName,
@@ -1459,7 +1279,7 @@ public class INode121 {
                     stmt.execute();
                     stmt.clearParameters();
                 } catch (SQLException e) {
-                    LOG.error(e.getMessage(), e);
+                    LOG.error("Something wrong when storing devices external links", e);
                 }
 
             }
@@ -1509,7 +1329,7 @@ public class INode121 {
                     stmt.execute();
                     stmt.clearParameters();
                 } catch (SQLException e) {
-                    LOG.error(e.getMessage(), e);
+                    LOG.error("Something wrong when storing devices physical links", e);
                 }
 
             }
@@ -1572,7 +1392,7 @@ public class INode121 {
                     stmt.execute();
                     stmt.clearParameters();
                 } catch (SQLException e) {
-                    LOG.error(e.getMessage(), e);
+                    LOG.error("Something wrong when storing devices degrees", e);
                 }
 
             }
@@ -1605,7 +1425,7 @@ public class INode121 {
                 stmt.execute();
                 stmt.clearParameters();
             } catch (SQLException e) {
-                LOG.error(e.getMessage(), e);
+                LOG.error("Something wrong when storing devices degrees circuit packs", e);
             }
 
         }
@@ -1639,7 +1459,7 @@ public class INode121 {
                 stmt.execute();
                 stmt.clearParameters();
             } catch (SQLException e) {
-                LOG.error(e.getMessage(), e);
+                LOG.error("Something wrong when storing devices degrees connection ports", e);
             }
 
         }
@@ -1698,7 +1518,7 @@ public class INode121 {
                     stmt.execute();
                     stmt.clearParameters();
                 } catch (SQLException e) {
-                    LOG.error(e.getMessage(), e);
+                    LOG.error("Something wrong when storing devices SRG", e);
                 }
 
             }
@@ -1732,7 +1552,7 @@ public class INode121 {
                 stmt.execute();
                 stmt.clearParameters();
             } catch (SQLException e) {
-                LOG.error(e.getMessage(), e);
+                LOG.error("Something wrong when storing devices SRG circuit packs", e);
             }
 
         }
@@ -1787,7 +1607,7 @@ public class INode121 {
                     stmt.execute();
                     stmt.clearParameters();
                 } catch (SQLException e) {
-                    LOG.error(e.getMessage(), e);
+                    LOG.error("Something wrong when storing devices ROADM connection ", e);
                 }
 
             }
@@ -1829,7 +1649,7 @@ public class INode121 {
                 stmt.execute();
                 stmt.clearParameters();
             } catch (SQLException e) {
-                LOG.error(e.getMessage(), e);
+                LOG.error("Something wrong when storing devices connection map", e);
             }
 
         }
@@ -1867,7 +1687,7 @@ public class INode121 {
                 stmt.execute();
                 stmt.clearParameters();
             } catch (SQLException e) {
-                LOG.error(e.getMessage(), e);
+                LOG.error("Something wrong when storing devices wavelength map", e);
             }
 
         }
@@ -1893,7 +1713,7 @@ public class INode121 {
                 stmt.execute();
                 stmt.clearParameters();
             } catch (SQLException e) {
-                LOG.error(e.getMessage(), e);
+                LOG.error("Something wrong when storing devices interface tcm", e);
             }
         }
     }
@@ -1917,7 +1737,7 @@ public class INode121 {
                 stmt.execute();
                 stmt.clearParameters();
             } catch (SQLException e) {
-                LOG.error(e.getMessage(), e);
+                LOG.error("Something wrong when storing devices interface OTN ODU Tx MSI", e);
             }
         }
     }
@@ -1942,7 +1762,7 @@ public class INode121 {
                 stmt.execute();
                 stmt.clearParameters();
             } catch (SQLException e) {
-                LOG.error(e.getMessage(), e);
+                LOG.error("Something wrong when storing devices interface OTN ODU Rx MSI", e);
             }
         }
     }
@@ -1967,7 +1787,7 @@ public class INode121 {
                 stmt.execute();
                 stmt.clearParameters();
             } catch (SQLException e) {
-                LOG.error(e.getMessage(), e);
+                LOG.error("Something wrong when storing devices interface OTN ODU Exp MSI", e);
             }
         }
     }