-
Bug
-
Resolution: Done
-
Medium
-
Honolulu Release
-
None
-
Holmes Sprint 63, Holmes Sprint 64, Holmes Sprint 65, Holmes Sprint 66, Holmes Sprint 67
Exceptions in logs shows unable to parse rule if in case pod get restarted with existing rules in database
Steps to reproduce
1. Create rules from UI
2. Restart rule-management container
Actual: Parsing Exceptions in logs
Expected: Rule should get parsed without exceptions
Following is the exception stack found in logs
2021-11-12 15:51:36 403 ERROR [org.onap.holmes.rulemgt.dcae.DcaeConfigurationPolling][pool-2-thread-1] invocationID:{InvocationID} - Failed to build http client. 1636731922952 com.google.gson.JsonSyntaxException: 1636731922952 at com.google.gson.internal.bind.DateTypeAdapter.deserializeToDate(DateTypeAdapter.java:87) at com.google.gson.internal.bind.DateTypeAdapter.read(DateTypeAdapter.java:75) at com.google.gson.internal.bind.DateTypeAdapter.read(DateTypeAdapter.java:46) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:82) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222) at com.google.gson.Gson.fromJson(Gson.java:932) at com.google.gson.Gson.fromJson(Gson.java:897) at com.google.gson.Gson.fromJson(Gson.java:846) at com.google.gson.Gson.fromJson(Gson.java:817) at org.onap.holmes.common.utils.GsonUtil.jsonToBean(GsonUtil.java:60) at org.onap.holmes.rulemgt.dcae.DcaeConfigurationPolling.getAllCorrelationRules(DcaeConfigurationPolling.java:114) at org.onap.holmes.rulemgt.dcae.DcaeConfigurationPolling.run(DcaeConfigurationPolling.java:81) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) Caused by: java.text.ParseException: Failed to parse date ["1636731922952"]: Invalid time zone indicator '2' at com.google.gson.internal.bind.util.ISO8601Utils.parse(ISO8601Utils.java:274) at com.google.gson.internal.bind.DateTypeAdapter.deserializeToDate(DateTypeAdapter.java:85) ... 22 common frames omitted Caused by: java.lang.IndexOutOfBoundsException: Invalid time zone indicator '2' at com.google.gson.internal.bind.util.ISO8601Utils.parse(ISO8601Utils.java:245) ... 23 common frames omitted