wmq-fte precall java failed - websphere-mq-fte

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 am not quite sure if I have understood the question. Assuming your aim is to invoke Java class before the transfer begins, you can use MFT exits to achieve that. Here is a link to WMQ MFT v7.5 sample source end user exit.
HTH

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

Related

How can I solve this error in OMNest 5.5.1?

I get the following error:
Exception occurred executing command line.
Cannot run program "C:/OMNEST-5.5.1/samples/enera/lteAdvanced/enera.exe" (in directory "C:\OMNEST-5.5.1\samples\enera\lte"): CreateProcess error=2, The System cannot find the file.
I already built the project many times. I have tried to make a simplier already given example from omnet just to check if this is working. It is working. But if I copy this example in my Project it also doesn't work, so there is sth wrong with my Project file. But it seems to be correct. I just have one Connection and kept it really really simple. But it doesn't work. I have installed Omnest and inet correctly.
The most likely cause is that the EXE file cannot find the omnet++ dynamic libraries it tries the load. And the most likely reason is that you are trying to execute the executable from a CMD prompt instead of from the shell provided by the mingwenv.cmd script.
Everything you do in OMNeT++ (including starting the simulations) must be run from the mingwenv shell.

Running Robot Framework tests with VirtualBox and IE11

I'm a Linux user, but I have a need to run my Robot Framework tests with IE11. I have set up Virtual Box with Win7 + IE11. I set up system and run below test there:
*** Settings ***
Library Selenium2Library
*** Test Cases ***
Run a browser
Open Browser http://www.google.com ie None http://192.168.56.101:4444/wd/hub
Now in virtual machine IE is opened and www.google.com page is opened. So this simple test is working fine.
I'm just wondering, what would be best way for me to run actual tests in virtual machine. I have a lot of tests. Can I somehow give address http://192.168.56.101:4444/wd/hub to command line somehow with start command?
Or do I have to make special keyword to check, how to start testing.
Any suggestions? How have you solve this issue?
When you are using robot framework, you can declare this information in the command line using the appropriate arguments. An example of this could be formatted like:
robot --include smoke --variable HOST:[host_IP] path/to/tests/
This information can be found in more detail here:
http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#id142

Running SonarQube analysis scan - SonarSource build-wrapper

I'm new to running SonarQube scans and I get this error message in the log in Jenkins:
16:17:39 16:17:36.926 ERROR - The only way to get an accurate analysis of your C/C++/Objective-C project is by using the SonarSource build-wrapper. If for any reason, the use of the build-wrapper is not possible on your project, you can bypass it with the help of the "sonar.cfamily.build-wrapper-output.bypass=true" property. By using that property, you'll switch to an "at best" mode that could result in false-positives and false-negatives.
Can someone please advise where I can find and run this SonarSource build-wrapper?
Thanks a lot for your help!
To solve this issue, download the Build Wrapper directly from your SonarQube Server, so that its version perfectly matches your version of the plugin:
Build Wrapper for Linux can be downloaded from URL
http://localhost:9000/static/cpp/build-wrapper-linux-x86.zip
Unzip the downloaded Build Wrapper,
Configure it in your PATH because it's just more convenient
export PATH=$PATH:/path/where/you/unzip
Once done, Run below commands.
build-wrapper-linux-x86-64 --out-dir <dir-name> <build-command>
build-wrapper-linux-x86-64 --out-dir build_output make clean all
Once all this done, you have to modify your sonar-project.properties file with following line. Note the dir-name is same directory which we defined in previous command.
sonar.cfamily.build-wrapper-output=<dir-name>
and then you can run the sonar scanner command.
sonar-scanner
this will do the analysis against your code. For more details, you can check this link.
Contacted support, turns out this was caused by missing the argument sonar.cfamily.build-wrapper-output in the scanner begin command.
Build wrapper downloads:
Linux: https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
macOS: https://sonarcloud.io/static/cpp/build-wrapper-macosx-x86.zip
Windows: https://sonarcloud.io/static/cpp/build-wrapper-win-x86.zip
Some links covering how to run the build wrapper:
https://docs.sonarqube.org/latest/analysis/languages/cfamily/
https://blog.sonarsource.com/with-great-power-comes-great-configuration/

How to start Jetty embedded HelloWorld with jetty-all.jar

I am creating a Jetty project, as a learning experience. I'm 15 and just exploring the programming world and looking to find something I like, and taking in as much information as I can along the way.
I have just started creating my Jetty server following this tutorial, http://wiki.eclipse.org/Jetty/Tutorial/Jetty_HelloWorld
I have reached the final step and am trying to start my server with
java -cp jetty-all.jar:servlet-api-2.5.jar HelloWorld
I am trying to run it on a Mac and this is my error message
Error: Could not find or load main class HelloWorld
Does anyone know what could be causing this? I have already compiled the HelloWorld.java file and used
javac -cp servlet-api-2.5.jar:jetty-all.jar HelloWorld.java
Can anyone help with this issue?
Thanks in advance. I just need to be pointed in the right direction here. :)
-Henry Harris
If you did the javac command as the tutorial, try this command line...
java -cp jetty-all.jar:servlet-api-2.5.jar:. HelloWorld
Notice the extra :. piece, that will also use the current directory to find the HelloWorld.class file.

coburtura link with marathon

I am newbie in coburtura and marathon. I have few doubts regarding integration of coburtura with marathon. Using ant I tried to run the coburtura using the jar file which is used in marathon. cobutura.ser file is not updated when marathon automation testing completed. Kindly let me know how to connect .ser file into marathon?
Marathon aborts the AUT, rather than exiting it. I suspect that is the issue with the 'ser' file not being written. One option is to include the exit actions in the script.