I am getting such error in my environment where the exception is encountered when using "Replace in String" step in PDI kettle. There is no variable or group name defined as GKTIMESTAMP in the transformation and regex based replacement is turned off, yet the field / group name GKTIMESTAMP appears in the exception message. The environment is of Linux 64 bit machine with PDI 5.0.1 stable version.


Another thing that I have noticed this time during the failure is, after the transformation name and step name in square brackets, the log message prints "null" (as highlighted in red as part of Failure log snipper) instead of the step name (as highlighted in green color in Successful log snippet), followed by processing status such as example "- Linenr 50000".


Failure log snippet:


2016-01-19 06:11:31,601 INFO [TaskHandlerJob IncrementalTask - Sorted Merge] null - Linenr 50000
2016-01-19 06:11:31,714 INFO [TaskHandlerJob IncrementalTask - Group byField] null - Linenr 50000
2016-01-19 06:11:32,341 INFO [TaskHandlerJob IncrementalTask - Sorted Merge] null - Linenr 100000
2016-01-19 06:11:32,455 INFO [TaskHandlerJob IncrementalTask - Group byField] null - Linenr 100000
2016-01-19 06:11:33,013 INFO [TaskHandlerJob IncrementalTask - Sorted Merge] null - Linenr 150000
2016-01-19 06:11:33,133 INFO [TaskHandlerJob IncrementalTask - Group byField] null - Linenr 150000
2016-01-19 06:11:33,875 ERROR [TaskHandlerJob IncrementalTask - replace_string] null - Unexpected error
2016-01-19 06:11:33,875 ERROR [TaskHandlerJob IncrementalTask - replace_string] null - java.lang.IllegalArgumentException: No group with name {GKTIMESTAMP}
at java.util.regex.Matcher.appendReplacement(Matcher.java:849)
at java.util.regex.Matcher.replaceAll(Matcher.java:955)
at org.pentaho.di.trans.steps.replacestring.ReplaceString.replaceString(ReplaceString.java:79)
at org.pentaho.di.trans.steps.replacestring.ReplaceString.getOneRow(ReplaceString.java:124)
at org.pentaho.di.trans.steps.replacestring.ReplaceString.processRow(ReplaceString.java:202)
at org.pentaho.di.trans.step.RunThread.run(RunThread.java:60)
at java.lang.Thread.run(Thread.java:745)




In ideal case or the case when the job ran successfully, the step name would appear instead of null as highlighted above. The corresponding log snippet is given below. Is there any reason why the above scenario has occurred ?


Successful log snippet:


2016-01-19 06:11:31,601 INFO [TaskHandlerJob IncrementalTask - Sorted Merge] Sorted Merge - Linenr 50000
2016-01-19 06:11:31,714 INFO [TaskHandlerJob IncrementalTask - Group byField] Group byField - Linenr 50000
2016-01-19 06:11:32,341 INFO [TaskHandlerJob IncrementalTask - Sorted Merge] Sorted Merge - Linenr 100000
2016-01-19 06:11:32,455 INFO [TaskHandlerJob IncrementalTask - Group byField] Group byField - Linenr 100000
2016-01-19 06:11:33,013 INFO [TaskHandlerJob IncrementalTask - Sorted Merge] Sorted Merge - Linenr 150000
2016-01-19 06:11:33,133 INFO [TaskHandlerJob IncrementalTask - Group byField] Group byField - Linenr 150000