I am implementing a FTE network using Websphere MQ 7.5.
I have developped a java program to be ran as a precall transfert. here is my procedure : I have updated the agent.properties file with path to java.exe restart my agent create a new transfert In the call panel, I configure a precall : program : java argument : -jar c:\PATH\TO\MY\JAR\myJar.jar myArgument
the transfert fails and the error shown is like java does not receive any argument.
When I test my command in a windows prompt it works.
In addition, my first attempt was to run a batch script containing the java command but it did not work either.
I do not want to use an exit as the program is specific to a transfer.
Edit : I have test a simple java -version command and it works.
<preSourceCall>
<command name="java" retryCount="0" retryWait="0" successRC="0" type="executable">
<argument>-jar C:\mqfteTest\ExitsJava.jar C:\mqfteTest\userExitTest\FileRef_20121023.txt</argument>
</command>
</preSourceCall>
Error returned :
<callResult outcome="failure" retries="0">
<result outcome="failure" returnCode="1" time="2012-10-24T12:39:52.419Z">
<stdout>
<line/>
<line>Syntaxe : java [-options] class [args...]</line>
<line> (pour l'ex‚cution d'une classe)</line>
<line> ou java [-jar] [-options] jarfile [args...]</line>
...
<line>JVMJ9VM007E Option de ligne de commande non identifiee : -jar C:\mqfteTest\ExitsJava.jar C:\mqfteTest\userExitTest\FileRef_20121023.txt</line>
<line>Could not create the Java virtual machine.</line>
</stderr>
Best Regards
I finally managed to execute my precall:
for the windows platform, I used a batch script and i put the script and the jar in a folder without space in the path.
I did not manage to use the java command and will open a PMR to understand why.
edit :
Finally I have understood why!! In fact the so called "argumentS" (in the precall conf) are in fact just one argument.
I have also manage to deploy my precall on iseries as400.
the command line is the same but the declaration of shell MUST be
#!/QOpenSys/usr/bin/sh
with #!/bin/sh wmq-fte does not manage to catch the exit of the program
Everything works great now.
I also found a strange behaviour (which will aim to another PMR) :
when the files to send are in a subdirectory of the command path, the transfert fail.
Hope this will help some one.
Regards