Soa is crashing while run the Exension File
I am using a extension tool where I am running java script .This script contains winium driver and sikuli apis ,when ever I am running this script.My soa crashed and showing the Error ,as you can see in the attached screenshot .I tried every possibility like add the eclipse ini file add both -vm and mention the javaw.exe file path as research in google but still its failing .set the jdk also in env variable .This extension as I said used winium driver and sikuli to run the desktop application .In eclipse i tried the same code its working fine .but when I merge the code in Pasasoft Soa ,its crashing .Please check and update.I am using 9.10.0 .
0
Comments
attached screenshot ,you can check my profile.
The dialog says "Java was started but returned exit code=1". Did your extension invoke code that is calling java.lang.System.exit(1)?
You could also start SOAtest (Eclipse) with the -consolelog argument, in case whatever called System.exit() printed a message to the STDOUT/STDERR stream before telling the JVM to exit.
You could also try commenting out parts of the code in your script until you isolate the offending line that results in the JVM exiting.
Hi Benken ,
Thanks for the reply .No I am not calling java.lang.System.exit(1).Below is my code I am running in my extension file .Apart from every extension when I run is working fine .The same code I am running in eclipseIDE is working fine .I am running winium server cmd that is pointing to localhost:9999
You could also start SOAtest (Eclipse) with the -consolelog argument, in case whatever called System.exit() printed a message to the STDOUT/STDERR stream before telling the JVM to exit.
For the above comment how should i do that .there is total 7 extension is there ,All should run at a time .Please update
I am not suggesting your script called this directly but that you might be calling some other API in your script that is doing this. It wouldn't necessarily be obvious, but I'm just saying the error suggests that something in the JVM may have called System.exit(1).
I'm saying, start SOAtest with the -consolelog argument as in "soatest.exe -consolelog". If you are on Windows, this will open a separate Window that captures the STDOUT/STDERR streams. Look for any extra errors or messages there.
You can also look for any "hs_err_pid" (java crash dump) files in the SOAtest installation directory in case some native library crashed the JVM.
You need to do this part as well. You should be able to determine which line in your script is causing the JVM to exit. This way, you would be able to isolate and track down the offending piece of code without guessing. For example, did the JVM exit on the line where you instantiated DesktopOptions() or on the line where you instantiated WiniumDriver() or on a line where you called findElement() or somewhere else?
Can you share some links so that I can follow and do this
Are you using Windows? In Windows, you right click on the shortcut (the SOAtest icon in this case), click Properties, then edit the Target box where you see the path to soatest.exe. You would just add a space followed by -consolelog at the very end of the Target field. You are just passing an extra command line argument.
Even without doing that, look if there are any "hs_err_pid" (java crash dump) files and also check which line of your script triggers the JVM exit.
Can't you simply do the following from the Command Prompt in Windows?
cd "c:\Program Files\Parasoft\SOAtest\9.10"
soatest.exe -consolelog
I'm not sure what you mean. I'm just saying to look for files beginning with this name in the SOAtest installation directory (c:\Program Files\Parasoft\SOAtest\9.10). If the JVM crashed (as opposed to existing) then this will provide detail.
I'm happy to make suggestions. However, you still do not know what is causing the JVM to exit. Did you isolate which line in your script causes this? This is the first step. For example, if the JVM exist when you invoke a method from the "sikuli" jar then the next step would be to look at what that method is doing, like if it is calling System.exit().
Yes before crashing I got below Errors ,After that cmd promt closed .
As I said Earlier the same code working fine fine in Eclipse IDE ,In SOA its crashing .How should I found problem with needed dependent libraries as mention above
I'm not questioning this.
Running a small piece of code separate process is much different than running Extension Tool which is running in same process as the entire IDE. If something calls System.exit() from an external process it wouldn't be as noticeable as if it happened in the same process as your IDE where the IDE itself would shut down.
Looks like you isolated the problem! The offending code is here:
https://github.com/RaiMan/SikuliX1/blob/master/API/src/main/java/org/sikuli/script/support/RunTime.java
Notice you see this class printing "problem with native library" followed by a call to its "terminate" method which then calls System.exit which results in entire JVM shutting down
So, this library likes to kill the entire JVM on problems, unfortunately. There may be two separate problems.
You might try searching for this error on Google or in the docs or website for this "SikuliX" library. One result I found suggested it had to do with running with 32-bit java vs 64-bit java. If the dll is 32-bit then you can't be running with a 64-bit java, like the one SOAtest might be running with, for example.
Another error is this:
This means that something is trying to load the library twice. For example, perhaps you run one script with this "SikuliX" library and then run a second script. If the second script tries to load the dll a second time then you might run into this issue.
This "SikuliX" library might just not be written robustly enough to use it the way you want, from a script interpreter (Extension Tool) inside of a larger application (SOAtest in this case). Instead, you may consider running your code using SOAtest External tool instead. This will launch whatever command you choose (java, groovy, python, etc.) in a separate process.
https://docs.parasoft.com/display/SOA9108/External
I got one solution below for the above Error ,Could you please tell how should I use this ,Should I download the OpenCv jar or opencv-4.2.0-vc14_vc15.exe and extract this and set in environment variable
VisionProoxy.dll needs the OpenCV 2 libraries
what is this mean .Can you please ellaborate more on this .I am not understanding the steps So.I have the extension tool where I am giving the package name ,so its calling the Java class .
One more solution I got i.e,Using the Maven dependency for Sikuli-API works perfectly on all the platforms I've tried (Windows 7 64b, Mac OS 10.8, Ubuntu 12.4) without any hassle.
Can you please share me the steps How can I download the Maven here coz in eclipse what is working fine ,I am using the Maven dependency and in SOA ,I am using Sikuli Jar file .Share me the steps how should run the code in maven dependency this extension tool
I have no idea what solution you found and I can't provide help with "SikuliX" library as I'm not familiar with it at all. It sounds like you think you have a missing jar, but the error suggests something wrong with a dll. So, not sure why you think a missing jar might be the issue.
You mention "code working fine fine in Eclipse IDE". If you already have a java "main" that you can run from Eclipse then my best suggestion is for you to run that same java "main" by using SOAtest's External tool to tell java.exe to run that.
You configure SOAtest's External tool with the path to java.exe and the arguments to java.exe. I already provided you with link to SOAtest docs for the External tool. You can find command line usage for java.exe elsewhere. Java command line looks something like: java -cp java_classpath NameOfClassWithMainMethod. So, you really need to know how java command works, and how java class path works.
Since you mentioned Maven, you can also invoke Maven from an External Tool if you have a maven project that is already working and is able to run the code in question, like maybe from a unit test in the project. In your SOAtest External tool you would configure it to run something like "cmd.exe /C path_to_maven/bin/mvn.cmd -f path_to_your_maven_project/pom.xml clean test".