Uploaded java jar file won't work.
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Uploaded java jar file won't work.
Hi.
I have tried to upload a java selenium jar file to create a new monitor.
But I can't get it to work.
I have created a runnable jar file and tested it on a Linux server that don't have the selenium libraries installed.
And that worked.
The messages I get when I try to run start the monitor "on demand" are:
Test stopped due to error
Selenium script could not be started. Possible reasons:
- The JAR file is not runnable (does not contain a manifest with Main-Class).
- The JAR file does not have Selenium libraries or other required libraries embedded in it.
- The script uses an unsupported browser. AlertSite only supports Firefox and Chrome browsers. Selenium 1.0 and Selenium Grid are not supported.
I manage to run the jar file on a linux box without selenium installed. That should cover the first 2 points.
And I use chromedriver, because that was recommended in the docs.
So now I'm stuck with my problems. I'm not a java wizard, so it is most likely something that I have missed.
Do anyone have an idea on what could be wrong?
--
rloseth
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello rloseth!
From your description it sounds like you might not have prepared the JAR file to run on the AlertSite locations.
You would need to add main() and some import definitions, and then export as a runnable JAR.
Please see the documentation here:
http://doc.alertsite.com/Default.htm#synthetic/monitors/selenium/selenium-monitoring.htm#jar
Thanks,
JKobert
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi rloseth,
How do you set the Chrome driver path? Do you use the PATH environment variable or set the system property "webdriver.chrome.driver" from your code? If the latter, try wrapping the assignment as follows:
if (System.getProperty("webdriver.chrome.driver") == null) { System.setProperty("webdriver.chrome.driver", "/path/to/chromedriver"); }
Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi.
I have gone through the info and prepared the jar according to the documentation.
I have used the example in the documentation for the main() method and exported as runnable jar.
The jar runs like it should on a local Ubuntu box.
Still no luck on AlertSite.
--
rloseth
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi.
I use the PATH environment variable.
--
rloseth
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello rloseth,
Customer Care would like to help you resolve your Selenium monitoring issue. Would you please open a support case with the account name and the device name here:
https://support.smartbear.com/message/?prod=Alertsite
Thank you!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi.
Thank you for all the replies.
I found my solution.
When creating the monitor I chose only one location (Copenhagen - Denmark). And when I tried to do a on demand run to get the monitor enabled, it always failed.
After a hole lot of clicking around I changed my location to Amsterdam, and that worked. I even tried to use my first jar upload and that worked too.
So the problem is solved.
There may be some strange things in the location system in AlertSite, but my problem is solved for now.
Once again, thanx for all the suggestions. 🙂
--
rloseth
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There does indeed seem to be an issue in Copenhagen which is being worked on now. Will post again when it's fixed.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Copenhagen issues resolved
