You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampipes.apache.org by "Dominik Riemer (Jira)" <ji...@apache.org> on 2022/11/26 12:51:00 UTC

[jira] [Commented] (STREAMPIPES-123) using specific runtame name leads to exception during extraction

    [ https://issues.apache.org/jira/browse/STREAMPIPES-123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17638961#comment-17638961 ] 

Dominik Riemer commented on STREAMPIPES-123:
--------------------------------------------

This issue has been migrated to https://github.com/apache/streampipes/issues/277

> using specific runtame name leads to exception during extraction
> ----------------------------------------------------------------
>
>                 Key: STREAMPIPES-123
>                 URL: https://issues.apache.org/jira/browse/STREAMPIPES-123
>             Project: StreamPipes
>          Issue Type: Bug
>    Affects Versions: 0.67.0
>            Reporter: Florian Micklich
>            Priority: Major
>             Fix For: 0.67.0
>
>         Attachments: Auswahl_119.png, Auswahl_120.png
>
>
> Using in SetEPSG.java [1] following runtime name in the addField method
>  
> {code:java}
> in.addField("epsg-key", epsg);
> {code}
>  
> I get an exceptions:
> {code:java}
> Exception in thread "Thread-5" java.lang.IllegalArgumentException: Key not found
> {code}
> in the next PE if I want to extract the EPSG Code from the required stream.
> You can reproduce the error with the ISS Adapter, using the EPSG PE and adding 4326. Then use the LatLngToGeo and try to create a JTS Point.
> The exception will be thrown in the LatLngToGeo.java [2]:
>  
> {code:java}
> Integer epsg = in.getFieldBySelector(epsg_code).getAsPrimitive().getAsInt();
> {code}
>  
> Everything is working fine if I change the runtime name as followed
> {code:java}
> in.addField("epsg", epsg);
> {code}
>  
>  
> [1] [https://github.com/apache/incubator-streampipes-extensions/blob/dev/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEPSG.java]
> [2] [https://github.com/apache/incubator-streampipes-extensions/blob/dev/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeo.java]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)