0

This question is almost similar to pentaho: error (stderr) =256m""=="" was unexpected at this time. while calling kitchen command (dos command using shell script job entry) from job

But It differs in clarity as I am providing exact details and also that question is 3 years old which also brings in version issues. Also, that question isn't answered yet and there are no other solutions available on internet except few pages which only have unanswered question. Hence posting this again with more detail.

I am using pentaho 7.0.0 and in my kjb file, there is a shell script executor which calls another ktr (I know running a ktr can be accomplished by using Transformation executor but my requirements are a bit different, please co-operate). Here is my command in the batch file I am calling:

C:\pentahodi\6.1.0\data-integration\Pan.bat /file:"H:/newKtr.ktr" "/param:filePath=%filePath%" /level:Basic > H:/pentahoLog.log  

But, when I run this batch file from cmd, its runs smoothly and ktr is invoked and filePath parametere is passed to it.But when I use %filePath% (used to pass from parameter of kjb itself), I get this error:

ERROR (version 7.0.0.0-25, build 1 from 2016-11-05 15.35.36 by buildguy) : (stderr) =256m""=="" was unexpected at this time.

In one of the online resources, I got to know that this problem occurs in 64 bit Windows systems. Is this the case? I am running a 64 bit windows 7.

This has really blocked me on all my efforts. I am new to pentaho and have no idea how this can be resolved. Any hint would really be appreciated.

Please help. Thanks.

KCK
  • 2,015
  • 2
  • 17
  • 35
  • Could you be more specific about what kind of script this is? The `shell` tag is generally intended for POSIX-family shells, which cmd.exe (and PowerShell) very much isn't/aren't. Tagging for the specific shell at issue is going to help get this in front of the right people, as opposed to a bunch of UNIXy folks from the "shell" tag. :) – Charles Duffy Apr 18 '18 at 15:13
  • BTW, ideally, we want questions to include everything needed to reproduce a problem. That would mean actually opening up `pan.bat`, building a new script with the shortest subset thereof that can create the same error, and including that simplified script in the question as a [mcve]. For more guidance on building a simplified reproducer, see the "Tricks for Trimming" section of http://sscce.org/. – Charles Duffy Apr 18 '18 at 15:15
  • Di you try /param:"filePath=%filePath%" instead of "/param:filePath=%filePath%" ? – AlainD Apr 23 '18 at 07:08
  • @AlainD Tried that. Same error. Can you please explain why this even occurs? – KCK Apr 23 '18 at 07:42
  • @CharlesDuffy I have tagged it as shell and pentaho as the module that pentaho provides for running scripts is named "shell". There isn't any difference in shell when talking about pentaho for Unix or Windows. – KCK Apr 23 '18 at 07:42
  • @KCK, that's entirely untrue -- they're completely different shell languages, and the tag is for the POSIX family. See the last line of the mouse-over text for the tag. Per https://wiki.pentaho.com/display/EAI/Shell, Pentaho on Windows uses `CMD /C` to execute shell steps; this is *not* a POSIX-compliant interpreter. – Charles Duffy Apr 23 '18 at 15:14
  • Oh... Got you @CharlesDuffy .Changed... Thanks – KCK Apr 24 '18 at 06:13

1 Answers1

1

As a solution open the spoon.bat file and remove the "-XX:MaxPermSize=256m" from PENTAHO_DI_JAVA_OPTIONS.

Then call bat file from shell executor or process a file step