Skip to content

ArrayIndexOutOfBoundsException error in CsvToSenMLParse Line 100 #4

@Farhood0011

Description

@Farhood0011

Hi,
There is a logical error in the code that cause ArrayIndexOutOfBoundsException error.
In the Line 100 of "CsvToSenMLParse" you are trying to set the basetime by doing:
finalSenML.put("bt", val[timestampField]);
where the val is a string array which only has a single element.
Because you do
m = (String) map.get("D");
String[] val = m.split(",");
The map that you pass to the "doTaskLogic" method from "CsvToSenMLParseBolt" only contains one pair of key and value!!
map.put(AbstractTask.DEFAULT_KEY, (String)input.getValueByField("OBSVAL"));

Could you please advice ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions