Dear Team, I am getting cast exception in flink. Caused by: org.apache.flink.client.program.ProgramInvocationException: The main method caused an error: class java.lang.String cannot be cast to class java.lang.Double (java.lang.String and java.lang.Double are in module java.base of loader 'bootstrap') at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:372)
The code that I wrote is Properties alerts = new Properties(); try (InputStream stream = OtelTransformerJob.class .getClassLoader().getResourceAsStream("rule-based-config.txt")) { alerts.load(stream); } Map<String, Double> rules = alerts.entrySet().stream() .collect(Collectors.toMap(e -> (String) e.getKey(), e -> (Double) e .getValue())); Not sure what is the problem here Thanks, Tauseef