You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@streampipes.apache.org by "Florian Micklich (Jira)" <ji...@apache.org> on 2020/05/12 09:23:00 UTC

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

Florian Micklich created STREAMPIPES-123:
--------------------------------------------

             Summary: 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
             Fix For: 0.67.0


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.3.4#803005)