Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a QlikView document which executes an external program (Java), then reads in the output file that it created, does some transformation and stores the results to a QVD. This works fine in development and I can log onto the server as the service account and it works runs fine when I run it as the service account on the server. However, when I try and run it through the QEMC as a task it does not work correctly. It does not fail but clearly does not execute the Java command line because the timestamp on the output file from the Java call does not change, but the stored QVD timestamp does, it is like it just ignores this step completely
I have managed to schedule a number of other QlikView documents which execute standard external command line executableslike "copy" without any issues. I have the "Can Execute External Programs" box checked in the application and I believe the publisher is setup correctly.
I've also tried setting up bat files and executing the bat file in QlikView instead of Java directly and it doesn't work or make any difference.
Anybody been able to setup/schedule a QlikView document to call Java or some other custom executable from Publisher?
Thanks,
Matt
You have to specify the path of the java bin folder in your batch file, otherwise the "java" command won't be found when executed in the QMC.
For instance, if you need to execute "example.jar" located in "C:\ExamplePath", you have to create a "example.bat" file in the same path with the following content:
SET filepath=C:\ExamplePath
SET java_path=C:\Program Files\Java\jre7\bin :: <your java bin folder>
C:
CD %filepath%
"%java_path%\java.exe" -jar "example.jar"
Then in your QV script:
EXECUTE cmd.exe /C "C:\ExamplePath\example.bat";
Hi Matthew,
Not all macros can be excuted when run thru QlikView Server.
Do you try to execute the command direct in QMC´s command line or do you call a batch file that is running the operation?
You have to specify the path of the java bin folder in your batch file, otherwise the "java" command won't be found when executed in the QMC.
For instance, if you need to execute "example.jar" located in "C:\ExamplePath", you have to create a "example.bat" file in the same path with the following content:
SET filepath=C:\ExamplePath
SET java_path=C:\Program Files\Java\jre7\bin :: <your java bin folder>
C:
CD %filepath%
"%java_path%\java.exe" -jar "example.jar"
Then in your QV script:
EXECUTE cmd.exe /C "C:\ExamplePath\example.bat";
Thank you, that seems to have done the trick - I still find this a bit strange because I set the whole Java environment up using the QMC service account and System Variables (JAVA_HOME, CLASSPATH etc..).
Anyway, putting the same variables and values in the batch file as suggested did the trick, so many thanks!