I'm attempting to run a .bat file in Kettle using the "Shell" function. However, Pentaho is throwing an error, showing that I have an invalid environment variable name. I'm at a complete loss as to what to do to resolve this, hence my post.
I've provided the output log file text below:
2017/09/11 11:09:14 - Spoon - Starting job...
2017/09/11 11:09:14 - test_job - Start of job execution
2017/09/11 11:09:14 - test_job - Starting entry [test_batch.bat]
2017/09/11 11:09:14 - test_batch.bat - Running on platform : Windows 7
2017/09/11 11:09:14 - test_batch.bat - Executing command : cmd.exe /C "\Desktop\test_batch.bat"
2017/09/11 11:09:14 - test_batch.bat - ERROR (version 5.3.0.0-213, build 1 from 2015-02-02_12-17-08 by buildguy) : Unexpected error running shell [\Desktop\test_batch.bat] : java.lang.IllegalArgumentException: Invalid environment variable name: "
2017/09/11 11:09:14 - test_batch.bat - ERROR (version 5.3.0.0-213, build 1 from 2015-02-02_12-17-08 by buildguy) : java.lang.IllegalArgumentException: Invalid environment variable name: "
2017/09/11 11:09:14 - test_batch.bat - at java.lang.ProcessEnvironment.validateName(Unknown Source)
2017/09/11 11:09:14 - test_batch.bat - at java.lang.ProcessEnvironment.put(Unknown Source)
2017/09/11 11:09:14 - test_batch.bat - at java.lang.ProcessEnvironment.put(Unknown Source)
2017/09/11 11:09:14 - test_batch.bat - at org.pentaho.di.job.entries.shell.JobEntryShell.executeShell(JobEntryShell.java:568)
2017/09/11 11:09:14 - test_batch.bat - at org.pentaho.di.job.entries.shell.JobEntryShell.execute(JobEntryShell.java:416)
2017/09/11 11:09:14 - test_batch.bat - at org.pentaho.di.job.Job.execute(Job.java:716)
2017/09/11 11:09:14 - test_batch.bat - at org.pentaho.di.job.Job.execute(Job.java:859)
2017/09/11 11:09:14 - test_batch.bat - at org.pentaho.di.job.Job.execute(Job.java:532)
2017/09/11 11:09:14 - test_batch.bat - at org.pentaho.di.job.Job.run(Job.java:424)
2017/09/11 11:09:14 - test_job - Finished job entry [test_batch.bat] (result=[false])
2017/09/11 11:09:14 - test_job - Job execution finished
2017/09/11 11:09:14 - Spoon - Job has ended.
If anyone can advise on the above it'd be greatly appreciated!
Thanks
Execute Shell Scriptin a job. Did you used theInsert scriptor theScript file name? And is the Working directory valid? If, yes, the next possible error is your script, which uses willingly or not, a environment variable. - AlainD