Hello
I try to use the reformat component but I have an error “java.lang.ArrayIndexOutOfBoundsException”.
My Graph :
I had 1 DELIMITED_DATA_READER_NIO connected to a reformat component.
This component is followed by a DELIMITED_DATA_WRITER_NIO
the XML Code
<?xml version="1.0" encoding="UTF-8"?> import org.jetel.component.DataRecordTransform; import org.jetel.metadata.DataRecordMetadata; import org.jetel.data.\*; public class reformatDate extends DataRecordTransform{ public boolean transform(DataRecord\[\] source, DataRecord\[\] target){ target\[0\].getField(0).setValue(source\[0\].getField(0).getValue()); target\[0\].getField(1).setValue(source\[0\].getField(1).getValue()); target\[0\].getField(2).setValue(source\[0\].getField(2).getValue()); target\[0\].getField(3).setValue(source\[0\].getField(3).getValue()); target\[0\].getField(4).setValue(source\[0\].getField(4).getValue()); target\[0\].getField(5).setValue(source\[0\].getField(5).getValue()); return false; } }And I get this exceoption
INFO [WatchDog] - [Clover] phase: 0 initialized successfully.
INFO [WatchDog] - Starting up all nodes in phase [0]
DEBUG [WatchDog] - INPUT … started
DEBUG [WatchDog] - REFORMAT … started
DEBUG [WatchDog] - OUTPUT … started
INFO [WatchDog] - Sucessfully started all nodes in phase!
FATAL [WatchDog] - !!! Fatal Error !!! - graph execution is aborting
ERROR [WatchDog] - Node REFORMAT finished with fatal error: java.lang.ArrayIndexOutOfBoundsException : 1
WARN [WatchDog] - Interrupted node: INPUT
WARN [WatchDog] - Interrupted node: REFORMAT
WARN [WatchDog] - Interrupted node: OUTPUT
Does any one know why? Has anyone faced the same problem?
Any help is appreciated.
Thanks in advance.
Alex