VEuPathDB / EdaDataService

Apache License 2.0
2 stars 0 forks source link

Fix categorical map marker overlay NPE #303

Closed dmgaldi closed 1 year ago

dmgaldi commented 1 year ago

Currently, missing data results in a an NPE for the categorical map overlays due to a missing null check in the QualitativeOverlayAggregator.

dmgaldi commented 1 year ago
ESC[mESC[36m2023-08-14 12:25:08.520 [rid:c94c7d5207884128b1f32dde54516960] DEBUG PrometheusFilter:136 - Request end: POST /apps/standalone-map/visualizations/map-markers 200
ESC[mESC[33m2023-08-14 12:25:08.520 [rid:     ] WARN  ErrorMapper:70 - Caught Exception:
ESC[m java.lang.NumberFormatException: empty String
        at jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1842) ~[?:?]
        at jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110) ~[?:?]
        at java.lang.Double.parseDouble(Double.java:651) ~[?:?]
        at org.veupathdb.service.eda.ds.plugin.standalonemap.markers.OverlaySpecification.lambda$new$0(OverlaySpecification.java:45) ~[service.jar:3.0.0]
        at org.veupathdb.service.eda.ds.plugin.standalonemap.markers.QualitativeOverlayAggregator.addValue(QualitativeOverlayAggregator.java:24) ~[service.jar:3.0.0]
        at org.veupathdb.service.eda.ds.plugin.standalonemap.markers.MarkerData.addRow(MarkerData.java:59) ~[service.jar:3.0.0]
        at org.veupathdb.service.eda.ds.plugin.standalonemap.markers.MapMarkerRowProcessor.process(MapMarkerRowProcessor.java:47) ~[service.jar:3.0.0]
        at org.veupathdb.service.eda.ds.plugin.standalonemap.StandaloneMapMarkersPlugin.writeResults(StandaloneMapMarkersPlugin.java:121) ~[service.jar:3.0.0]
        at org.veupathdb.service.eda.ds.plugin.AbstractPlugin.lambda$accept$5(AbstractPlugin.java:192) ~[service.jar:3.0.0]
        at org.gusdb.fgputil.functional.Functions.lambda$cSwallow$4(Functions.java:293) ~[service.jar:3.0.0]
        at org.veupathdb.service.eda.common.client.StreamingDataClient.buildAndProcessStreams(StreamingDataClient.java:46) ~[service.jar:3.0.0]
        at org.veupathdb.service.eda.ds.plugin.AbstractPlugin.accept(AbstractPlugin.java:198) ~[service.jar:3.0.0]
        at org.veupathdb.service.eda.ds.plugin.AbstractPlugin.accept(AbstractPlugin.java:53) ~[service.jar:3.0.0]
        at org.veupathdb.service.eda.generated.model.StandaloneMapMarkersPostResponseStream.write(StandaloneMapMarkersPostResponseStream.java:21) ~[service.jar:3.0.0]
        at org.glassfish.jersey.message.internal.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:55) ~[service.jar:3.0.0]
        at org.glassfish.jersey.message.internal.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:37) ~[service.jar:3.0.0]
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:242) ~[service.jar:3.0.0]
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:227) ~[service.jar:3.0.0]
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139) ~[service.jar:3.0.0]
        at org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:85) ~[service.jar:3.0.0]
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139) ~[service.jar:3.0.0]
        at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:61) ~[service.jar:3.0.0]
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139) ~[service.jar:3.0.0]
        at org.veupathdb.lib.container.jaxrs.server.middleware.PrometheusFilter.aroundWriteTo(PrometheusFilter.java:111) ~[service.jar:3.0.0]
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139) ~[service.jar:3.0.0]
        at org.veupathdb.lib.container.jaxrs.server.middleware.RequestIdFilter.aroundWriteTo(RequestIdFilter.java:70) ~[service.jar:3.0.0]
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139) ~[service.jar:3.0.0]
        at org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1116) ~[service.jar:3.0.0]
        at org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:677) [service.jar:3.0.0]
        at org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:385) [service.jar:3.0.0]
        at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:375) [service.jar:3.0.0]
        at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:264) [service.jar:3.0.0]
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248) [service.jar:3.0.0]
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244) [service.jar:3.0.0]
        at org.glassfish.jersey.internal.Errors.process(Errors.java:292) [service.jar:3.0.0]
        at org.glassfish.jersey.internal.Errors.process(Errors.java:274) [service.jar:3.0.0]
        at org.glassfish.jersey.internal.Errors.process(Errors.java:244) [service.jar:3.0.0]
        at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265) [service.jar:3.0.0]
        at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:240) [service.jar:3.0.0]
        at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:697) [service.jar:3.0.0]
        at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:367) [service.jar:3.0.0]
        at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:190) [service.jar:3.0.0]
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:535) [service.jar:3.0.0]
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:515) [service.jar:3.0.0]
        at java.lang.Thread.run(Thread.java:831) [?:?]
dmgaldi commented 1 year ago
ESC[mESC[33m2023-08-04 12:22:23.935 [rid:     ] WARN  ErrorMapper:70 - Caught Exception:
ESC[m java.lang.NumberFormatException: For input string: "2022-02-13T00:00:00"
        at jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054) ~[?:?]
        at jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110) ~[?:?]
        at java.lang.Double.parseDouble(Double.java:651) ~[?:?]
        at org.veupathdb.service.eda.ds.plugin.standalonemap.markers.ContinuousAggregators$2.addValue(ContinuousAggregators.java:49) ~[service.jar:3.0.0]
        at org.veupathdb.service.eda.ds.plugin.standalonemap.BubbleMapMarkersLegendPlugin.writeResults(BubbleMapMarkersLegendPlugin.java:131) ~[service.jar:3.0.0]
        at org.veupathdb.service.eda.ds.plugin.AbstractPlugin.lambda$accept$5(AbstractPlugin.java:192) ~[service.jar:3.0.0]
        at org.gusdb.fgputil.functional.Functions.lambda$cSwallow$4(Functions.java:293) ~[service.jar:3.0.0]
        at org.veupathdb.service.eda.common.client.StreamingDataClient.buildAndProcessStreams(StreamingDataClient.java:46) ~[service.jar:3.0.0]
        at org.veupathdb.service.eda.ds.plugin.AbstractPlugin.accept(AbstractPlugin.java:198) ~[service.jar:3.0.0]
        at org.veupathdb.service.eda.ds.plugin.AbstractPlugin.accept(AbstractPlugin.java:53) ~[service.jar:3.0.0]
        at org.veupathdb.service.eda.generated.model.StandaloneMapBubblesLegendPostResponseStream.write(StandaloneMapBubblesLegendPostResponseStream.java:21) ~[service.jar:3.0.0]
        at org.glassfish.jersey.message.internal.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:55) ~[service.jar:3.0.0]
        at org.glassfish.jersey.message.internal.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:37) ~[service.jar:3.0.0]
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:242) ~[service.jar:3.0.0]
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:227) ~[service.jar:3.0.0]
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139) ~[service.jar:3.0.0]
        at org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:85) ~[service.jar:3.0.0]
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139) ~[service.jar:3.0.0]
        at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:61) ~[service.jar:3.0.0]
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139) ~[service.jar:3.0.0]
        at org.veupathdb.lib.container.jaxrs.server.middleware.PrometheusFilter.aroundWriteTo(PrometheusFilter.java:111) ~[service.jar:3.0.0]
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139) ~[service.jar:3.0.0]
        at org.veupathdb.lib.container.jaxrs.server.middleware.RequestIdFilter.aroundWriteTo(RequestIdFilter.java:70) ~[service.jar:3.0.0]

I'm going to move this to another issue: https://github.com/VEuPathDB/EdaDataService/issues/304

dmgaldi commented 1 year ago
Error: Unexpected backend type(s) encountered: Invalid value `undefined` supplied to overlayValue (type: number) of 1 (type: { overlayValue: number }) of 5 (type: ({ geoAggregateValue: string, entityCount: number, avgLat: number, avgLon: number, minLat: number, minLon: number, maxLat: number, maxLon: number } & { overlayValue: number })) of mapElements (type: Array<({ geoAggregateValue: string, entityCount: number, avgLat: number, avgLon: number, minLat: number, minLon: number, maxLat: number, maxLon: number } & { overlayValue: number })>) of [root] (type: { mapElements: Array<({ geoAggregateValue: string, entityCount: number, avgLat: number, avgLon: number, minLat: number, minLon: number, maxLat: number, maxLon: number } & { overlayValue: number })> }) Invalid value `undefined` supplied to overlayValue (type: number) of 1 (type: { overlayValue: number }) of 6 (type: ({ geoAggregateValue: string, entityCount: number, avgLat: number, avgLon: number, minLat: number, minLon: number, maxLat: number, maxLon: number } & { overlayValue: number })) of mapElements (type: Array<({ geoAggregateValue: string, entityCount: number, avgLat: number, avgLon: number, minLat: number, minLon: number, maxLat: number, maxLon: number } & { overlayValue: number })>) of [root] (type: { mapElements: Array<({ geoAggregateValue: string, entityCount: number, avgLat: number, avgLon: number, minLat: number, minLon: number, maxLat: number, maxLon: number } & { overlayValue: number })> })
dmgaldi commented 1 year ago

In eda_alpha data on fir

2023-08-15 10:47:27.165 [rid:3bed6688e51149a18bbe9d8f806a2590] DEBUG PrometheusFilter:136 - Request end: POST /apps/standalone-map/visualizations/map-markers/bubbles/legend 200
2023-08-15 10:47:27.165 [rid:   ] WARN ErrorMapper:70 - Caught Exception: 
 java.lang.NullPointerException: null
    at java.util.Objects.requireNonNull(Objects.java:208) ~[?:?]
    at java.util.Optional.of(Optional.java:113) ~[?:?]
    at java.util.stream.ReduceOps$2ReducingSink.get(ReduceOps.java:129) ~[?:?]