When the current value in a resource usage counter file set to 0, the system should understand it
An error in a resource usage counter must not impact the rest of the system operation
Actual Behavior
A failure to parse Duration out of a value in the resource usage counter (literally, 0) renders the system unusable at startup
Root Cause
Exception traces below.
Additional Context
Observed as of rev. 757f781bb07a6a2f93626c0bba22b68a82833af1
1/2
2024-02-27 13:54:31,578 ERROR Loggers$Slf4JLogger main [run] Operator called default onErrorDropped
reactor.core.Exceptions$ErrorCallbackNotImplemented: java.time.format.DateTimeParseException: Text cannot be parsed to a Duration
Caused by: java.time.format.DateTimeParseException: Text cannot be parsed to a Duration
at java.time.Duration.parse(Duration.java:419) ~[?:?]
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Assembly trace from producer [reactor.core.publisher.FluxMapFuseable] :
reactor.core.publisher.Flux.map
net.sf.dz3r.runtime.config.hardware.HvacConfigurationParser.parse(HvacConfigurationParser.java:63)
Error has been observed at the following site(s):
*__Flux.map ⇢ at net.sf.dz3r.runtime.config.hardware.HvacConfigurationParser.parse(HvacConfigurationParser.java:63)
Original Stack Trace:
at java.time.Duration.parse(Duration.java:419) ~[?:?]
at net.sf.dz3r.counter.FileTimeUsageCounter.load(FileTimeUsageCounter.java:126) ~[hcc-common-4.2.0-SNAPSHOT.jar:?]
at net.sf.dz3r.counter.FileTimeUsageCounter.<init>(FileTimeUsageCounter.java:55) ~[hcc-common-4.2.0-SNAPSHOT.jar:?]
at net.sf.dz3r.runtime.config.hardware.HvacConfigurationParser.createFileCounter(HvacConfigurationParser.java:45) ~[hcc-bootstrap-4.2.0-SNAPSHOT.jar:?]
at net.sf.dz3r.runtime.config.hardware.HvacConfigurationParser.parseHeatpump(HvacConfigurationParser.java:108) ~[hcc-bootstrap-4.2.0-SNAPSHOT.jar:?]
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:113) ~[reactor-core-3.6.0.jar:3.6.0]
at reactor.core.publisher.FluxIterable$IterableSubscription.fastPath(FluxIterable.java:402) ~[reactor-core-3.6.0.jar:3.6.0]
at reactor.core.publisher.FluxIterable$IterableSubscription.request(FluxIterable.java:291) ~[reactor-core-3.6.0.jar:3.6.0]
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.request(FluxMapFuseable.java:171) ~[reactor-core-3.6.0.jar:3.6.0]
at reactor.core.publisher.LambdaSubscriber.onSubscribe(LambdaSubscriber.java:119) ~[reactor-core-3.6.0.jar:3.6.0]
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onSubscribe(FluxMapFuseable.java:96) ~[reactor-core-3.6.0.jar:3.6.0]
at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:201) ~[reactor-core-3.6.0.jar:3.6.0]
at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:83) ~[reactor-core-3.6.0.jar:3.6.0]
at reactor.core.publisher.Flux.subscribe(Flux.java:8777) ~[reactor-core-3.6.0.jar:3.6.0]
at reactor.core.publisher.Flux.subscribeWith(Flux.java:8898) ~[reactor-core-3.6.0.jar:3.6.0]
at reactor.core.publisher.Flux.subscribe(Flux.java:8742) ~[reactor-core-3.6.0.jar:3.6.0]
at reactor.core.publisher.Flux.subscribe(Flux.java:8666) ~[reactor-core-3.6.0.jar:3.6.0]
at reactor.core.publisher.Flux.subscribe(Flux.java:8609) ~[reactor-core-3.6.0.jar:3.6.0]
at net.sf.dz3r.runtime.config.hardware.HvacConfigurationParser.parse(HvacConfigurationParser.java:64) ~[hcc-bootstrap-4.2.0-SNAPSHOT.jar:?]
at net.sf.dz3r.runtime.config.ConfigurationParser.parse(ConfigurationParser.java:103) ~[hcc-bootstrap-4.2.0-SNAPSHOT.jar:?]
at net.sf.dz3r.runtime.ApplicationBase.run(ApplicationBase.java:102) ~[hcc-bootstrap-4.2.0-SNAPSHOT.jar:?]
at net.sf.dz3r.runtime.springboot.HccApplication.run(HccApplication.java:52) ~[classes/:?]
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:771) ~[spring-boot-3.1.5.jar:3.1.5]
at org.springframework.boot.SpringApplication.lambda$callRunners$3(SpringApplication.java:755) ~[spring-boot-3.1.5.jar:3.1.5]
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) [?:?]
at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357) [?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510) [?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) [?:?]
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) [?:?]
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) [?:?]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) [?:?]
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) [?:?]
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:750) [spring-boot-3.1.5.jar:3.1.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:323) [spring-boot-3.1.5.jar:3.1.5]
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:150) [spring-boot-3.1.5.jar:3.1.5]
at net.sf.dz3r.runtime.springboot.HccApplication.main(HccApplication.java:36) [classes/:?]
2/2
2024-02-27 13:54:31,831 ERROR Loggers$Slf4JLogger main [run] Operator called default onErrorDropped
reactor.core.Exceptions$ErrorCallbackNotImplemented: java.lang.NullPointerException: Cannot invoke "net.sf.dz3r.device.actuator.HvacDevice.compute(reactor.core.publisher.Flux)" because "hvacDevice" is null
Caused by: java.lang.NullPointerException: Cannot invoke "net.sf.dz3r.device.actuator.HvacDevice.compute(reactor.core.publisher.Flux)" because "hvacDevice" is null
at net.sf.dz3r.model.UnitDirector.connectFeeds(UnitDirector.java:144) ~[hcc-director-4.2.0-SNAPSHOT.jar:?]
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Assembly trace from producer [reactor.core.publisher.FluxMapFuseable] :
reactor.core.publisher.Flux.map
net.sf.dz3r.runtime.config.model.DirectorConfigurationParser.parse(DirectorConfigurationParser.java:26)
Error has been observed at the following site(s):
*__Flux.map ⇢ at net.sf.dz3r.runtime.config.model.DirectorConfigurationParser.parse(DirectorConfigurationParser.java:26)
Original Stack Trace:
at net.sf.dz3r.model.UnitDirector.connectFeeds(UnitDirector.java:144) ~[hcc-director-4.2.0-SNAPSHOT.jar:?]
at net.sf.dz3r.model.UnitDirector.<init>(UnitDirector.java:87) ~[hcc-director-4.2.0-SNAPSHOT.jar:?]
at net.sf.dz3r.runtime.config.model.DirectorConfigurationParser.parse(DirectorConfigurationParser.java:42) ~[hcc-bootstrap-4.2.0-SNAPSHOT.jar:?]
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:113) ~[reactor-core-3.6.0.jar:3.6.0]
at reactor.core.publisher.FluxIterable$IterableSubscription.fastPath(FluxIterable.java:402) ~[reactor-core-3.6.0.jar:3.6.0]
at reactor.core.publisher.FluxIterable$IterableSubscription.request(FluxIterable.java:291) ~[reactor-core-3.6.0.jar:3.6.0]
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.request(FluxMapFuseable.java:171) ~[reactor-core-3.6.0.jar:3.6.0]
at reactor.core.publisher.LambdaSubscriber.onSubscribe(LambdaSubscriber.java:119) ~[reactor-core-3.6.0.jar:3.6.0]
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onSubscribe(FluxMapFuseable.java:96) ~[reactor-core-3.6.0.jar:3.6.0]
at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:201) ~[reactor-core-3.6.0.jar:3.6.0]
at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:83) ~[reactor-core-3.6.0.jar:3.6.0]
at reactor.core.publisher.Flux.subscribe(Flux.java:8777) ~[reactor-core-3.6.0.jar:3.6.0]
at reactor.core.publisher.Flux.subscribeWith(Flux.java:8898) ~[reactor-core-3.6.0.jar:3.6.0]
at reactor.core.publisher.Flux.subscribe(Flux.java:8742) ~[reactor-core-3.6.0.jar:3.6.0]
at reactor.core.publisher.Flux.subscribe(Flux.java:8666) ~[reactor-core-3.6.0.jar:3.6.0]
at reactor.core.publisher.Flux.subscribe(Flux.java:8609) ~[reactor-core-3.6.0.jar:3.6.0]
at net.sf.dz3r.runtime.config.model.DirectorConfigurationParser.parse(DirectorConfigurationParser.java:27) ~[hcc-bootstrap-4.2.0-SNAPSHOT.jar:?]
at net.sf.dz3r.runtime.config.ConfigurationParser.parse(ConfigurationParser.java:136) ~[hcc-bootstrap-4.2.0-SNAPSHOT.jar:?]
at net.sf.dz3r.runtime.ApplicationBase.run(ApplicationBase.java:102) ~[hcc-bootstrap-4.2.0-SNAPSHOT.jar:?]
at net.sf.dz3r.runtime.springboot.HccApplication.run(HccApplication.java:52) ~[classes/:?]
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:771) ~[spring-boot-3.1.5.jar:3.1.5]
at org.springframework.boot.SpringApplication.lambda$callRunners$3(SpringApplication.java:755) ~[spring-boot-3.1.5.jar:3.1.5]
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) [?:?]
at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357) [?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510) [?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) [?:?]
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) [?:?]
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) [?:?]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) [?:?]
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) [?:?]
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:750) [spring-boot-3.1.5.jar:3.1.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:323) [spring-boot-3.1.5.jar:3.1.5]
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:150) [spring-boot-3.1.5.jar:3.1.5]
at net.sf.dz3r.runtime.springboot.HccApplication.main(HccApplication.java:36) [classes/:?]
Expected Behavior
current
value in a resource usage counter file set to0
, the system should understand itActual Behavior
A failure to parse
Duration
out of a value in the resource usage counter (literally,0
) renders the system unusable at startupRoot Cause
Exception traces below.
Additional Context
Observed as of rev. 757f781bb07a6a2f93626c0bba22b68a82833af1
1/2
2/2