This article explains how to fix the NAT policy update if it is failing with the error "[Error] java.lang.NullPointerException"
From the SD.log, we will see the below error. Where port field has String(inherit-branch="true") instead of double type for the NAT Pool.
<pool> <name>NATPOOL</name> <address> <ipaddr>IPADDRESS</ipaddr> <port inherit-branch="true"></port> </address> </pool></destination></nat></security></configuration> 2024-08-29 06:50:28,093 WARN [net.juniper.jnap.sm.provisioning.common.SDProvisioningUtils] (JobThread28508197, Parent JobThread28508196) isPEAvailable ###### true 2024-08-29 06:50:28,095 ERROR [net.juniper.jnap.sm.provisioning.processor.BasicCMProcessor] (JobThread28508197, Parent JobThread28508196) Failed to do XSLT transformation: ValidationException: Cannot convert string "" to a double at net.sf.saxon.type.ValidationFailure.makeException(ValidationFailure.java:233) [saxon9.jar:]
To fix this issue, please follow the below steps:
mysql -ujboss -p$(grep mysql.jboss /etc/sysconfig/JunosSpace/pwd | awk -F= '{print $2}') sm_db
1. Get the deviceID from SDDeviceCMEntity table for device(ndefra00bm02):
mysql> select * from SDDeviceCMEntity where name="<DeviceName>"\G; *************************** 1. row *************************** id: 11758757 designObjectVersion: NULL description: NULL syncState: 0 lastUpdatedAt: 2024-10-01 05:42:21 name: DEVICENAME zonePolicyMgmtState: 0 globalPolicyMgmtState: 0 deviceMoId: net.juniper.jmp.jpa.ClusterDeviceEntity:23855105 useGlobalAddressBook: 1 enablePolicyRematch: 1 preserveSessionScOS: 0 deviceType: ROOT vpnDeviceCM_id: NULL domainId: NULL isDeleted: isUpdated: 0 isProxyARPManaged: 1 designObjectUUID: NULL isDeviceRegisteredWithSky: 1 1 row in set (0.00 sec)
2. Check whether that deviceID is available in table "LastUpdateConfiguration"
mysql> select id,deviceCM_id from LastUpdateConfiguration where deviceCM_id=<id from the above output>; +----------+-------------+ | id | deviceCM_id | +----------+-------------+ | 26247384 | 11758757 | +----------+-------------+ 1 row in set (0.00 sec)
3. Then we can go for deletion of that record from table "LastUpdateConfiguration"
delete from LastUpdateConfiguration where deviceCM_id=<deviceCM_id from the above output>;