LaunchMode.COMMAND_LINE error

83 views
Skip to first unread message

Garrett Leeson

unread,
Nov 7, 2019, 4:22:39 PM11/7/19
to Marathon Java GUI Testing
Hey All,

I'm using the following launch configs:
JavaProfile profile = new JavaProfile(LaunchMode.COMMAND_LINE);
profile.setCommand("C:\\Users\\me\\Desktop\\AppStartShellScript.ps1");
profile.setLaunchType(LaunchType.SWING_APPLICATION);
profile.setStartWindowTitle("App Window Title");
JavaDriver driver = new JavaDriver(profile);

And I'm getting the following error:
org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'XXXXXXXXX', ip: 'XXX.XXX.XXX.XXX', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '13'
Driver info: driver.version: JavaDriver

If I enter the command into my Command Prompt, it launches my app successfully but fails when using the JavaDriver. Is the LaunchMode.COMMAND_LINE unable to handle Shell Scripts executions?

Thanks,
Garrett

Aditya Chandrasekhar Karra

unread,
Nov 8, 2019, 7:51:08 AM11/8/19
to marathon...@googlegroups.com
Hi Garrett

Sorry for my late reply. To launch the application Marathon needs either '.bat' or '.sh' files.

1. Marathon supports only jdk 1.8. Currently we don't support JDK 9 and later.

For any further queries on marathon open source please put your question on Marathon testing group  https://groups.google.com/forum/#!forum/marathon-testing or Stackover flow with [marathontesting] tag.

Have a great day .. Happy testing..!!
Thanks & Regards
Aditya Karra
Jalian Systems Pvt. Ltd.

Jalian Systems Pvt. Ltd.
#457, 5th Main, 3rd Cross, 5th Block, 1st Stage, H B R Layout,
Bengaluru 560043, INDIA


--
Looking for professional help with your Marathon projects?
Go visit: http://marathontesting.com
---
You received this message because you are subscribed to the Google Groups "Marathon Java GUI Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to marathon-testi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/marathon-testing/5c4d4129-b5c9-4b8e-b00b-6905b6ba538c%40googlegroups.com.

Garrett Leeson

unread,
Nov 21, 2019, 1:45:16 PM11/21/19
to Marathon Java GUI Testing
Thanks for your help. I've rewrote my power shell script as a batch script and converted my solution to build off of java jdk 1.8. That said, I'm still unable to launch my AUT. I'm getting the following error. Is this because my AUT runs in a JRE 1.5 environment? Any advice on getting this to run?

java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(Unknown Source)
Picked up JAVA_TOOL_OPTIONS: -DkeepLog=false -Dmarathon.launch.mode=commandline -Dmarathon.mode=playing -javaagent:"C:\Users\me\.m2\repository\com\jaliansystems\marathon-java-agent\5.2.5.0\marathon-java-agent-5.2.5.0.jar"=58421
Exception in thread "main" Nov 21, 2019 9:47:30 AM net.sourceforge.marathon.javadriver.JavaDriverCommandExecutor start
WARNING: Unable to estabilsh connection with the application(timeout): [C:\Users\me\Desktop\App_Start.bat][ {JAVA_TOOL_OPTIONS=-DkeepLog=false -Dmarathon.launch.mode=commandline -Dmarathon.mode=playing -javaagent:"C:\Users\me\.m2\repository\com\jaliansystems\marathon-java-agent\5.2.5.0\marathon-java-agent-5.2.5.0.jar"=58421}]
org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: '#########', ip: '###.###.###.###', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_231'
Driver info: driver.version: JavaDriver

On Friday, November 8, 2019 at 7:51:08 AM UTC-5, Aditya Chandrasekhar Karra wrote:
Hi Garrett

Sorry for my late reply. To launch the application Marathon needs either '.bat' or '.sh' files.

1. Marathon supports only jdk 1.8. Currently we don't support JDK 9 and later.

For any further queries on marathon open source please put your question on Marathon testing group  https://groups.google.com/forum/#!forum/marathon-testing or Stackover flow with [marathontesting] tag.

Have a great day .. Happy testing..!!
Thanks & Regards
Aditya Karra
Jalian Systems Pvt. Ltd.

Jalian Systems Pvt. Ltd.
#457, 5th Main, 3rd Cross, 5th Block, 1st Stage, H B R Layout,
Bengaluru 560043, INDIA


On Fri, Nov 8, 2019 at 2:52 AM Garrett Leeson <garret...@gmail.com> wrote:
Hey All,

I'm using the following launch configs:
JavaProfile profile = new JavaProfile(LaunchMode.COMMAND_LINE);
profile.setCommand("C:\\Users\\me\\Desktop\\AppStartShellScript.ps1");
profile.setLaunchType(LaunchType.SWING_APPLICATION);
profile.setStartWindowTitle("App Window Title");
JavaDriver driver = new JavaDriver(profile);

And I'm getting the following error:
org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'XXXXXXXXX', ip: 'XXX.XXX.XXX.XXX', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '13'
Driver info: driver.version: JavaDriver

If I enter the command into my Command Prompt, it launches my app successfully but fails when using the JavaDriver. Is the LaunchMode.COMMAND_LINE unable to handle Shell Scripts executions?

Thanks,
Garrett

--
Looking for professional help with your Marathon projects?
Go visit: http://marathontesting.com
---
You received this message because you are subscribed to the Google Groups "Marathon Java GUI Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to marathon...@googlegroups.com.

Martin-Pierre Roy

unread,
Nov 26, 2019, 2:50:00 PM11/26/19
to Marathon Java GUI Testing
Hello Garrett,
      Based on what I an see in the code the agent requires Java 6 minimally. My 2 cents, If you can install Java 6 and you application is build for Java 1.5, it will be able to run your app (as a Java 1.5 app) and load the agent. Is that something possible for you?

        I also see that you are using version 5.2.5.0, I recommend if your looking into using a remote driver, to use version 5.2.6.0, since the version your are running had issues with remote connection. 

Cheers,
MP
Reply all
Reply to author
Forward
0 new messages