[fullstop-instance-plugin-support] exception when parsing app_version from yml
Closed this issue · 0 comments
Gregsen commented
ERROR [pool-7-thread-1] o.z.s.f.PluginEventsProcessor - java.lang.Double cannot be cast to java.lang.String
java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.String
at org.zalando.stups.fullstop.plugin.impl.EC2InstanceContextImpl.lambda$getVersionId$5(EC2InstanceContextImpl.java:135) ~[fullstop-instance-plugin-support-1.2.0-SNAPSHOT.jar!/:?]
at java.util.Optional.map(Optional.java:215) ~[?:1.8.0_66-internal]
at org.zalando.stups.fullstop.plugin.impl.EC2InstanceContextImpl.getVersionId(EC2InstanceContextImpl.java:135) ~[fullstop-instance-plugin-support-1.2.0-SNAPSHOT.jar!/:?]
at org.zalando.stups.fullstop.plugin.taupageyaml.TaupageYamlPlugin.process(TaupageYamlPlugin.java:52) ~[fullstop-taupage-yaml-plugin-1.2.0-SNAPSHOT.jar!/:?]
at java.util.ArrayList.forEach(ArrayList.java:1249) ~[?:1.8.0_66-internal]
at org.zalando.stups.fullstop.plugin.AbstractEC2InstancePlugin.processEvent(AbstractEC2InstancePlugin.java:36) ~[fullstop-instance-plugin-support-1.2.0-SNAPSHOT.jar!/:?]
at org.zalando.stups.fullstop.PluginEventsProcessor.doProcess(PluginEventsProcessor.java:52) ~[fullstop-processing-1.2.0-SNAPSHOT.jar!/:?]
at org.zalando.stups.fullstop.PluginEventsProcessor.doProcess(PluginEventsProcessor.java:43) ~[fullstop-processing-1.2.0-SNAPSHOT.jar!/:?]
at java.util.ArrayList.forEach(ArrayList.java:1249) [?:1.8.0_66-internal]
at org.zalando.stups.fullstop.PluginEventsProcessor.process(PluginEventsProcessor.java:33) [fullstop-processing-1.2.0-SNAPSHOT.jar!/:?]
at com.amazonaws.services.cloudtrail.processinglibrary.reader.EventReader.emitEvents(EventReader.java:229) [aws-cloudtrail-processing-library-1.0.2.jar!/:?]
at com.amazonaws.services.cloudtrail.processinglibrary.reader.EventReader.processSource(EventReader.java:156) [aws-cloudtrail-processing-library-1.0.2.jar!/:?]
at com.amazonaws.services.cloudtrail.processinglibrary.AWSCloudTrailProcessingExecutor$ScheduledJob$1.run(AWSCloudTrailProcessingExecutor.java:178) [aws-cloudtrail-processing-library-1.0.2.jar!/:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_66-internal]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_66-internal]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_66-internal]
An exception is thrown, when application_version
is parsed, because if it is a number, it will be recognized as double and we then try to cast it to string.