Run fest after launching application using Java webstart

630 views
Skip to first unread message

Gino John

unread,
Feb 5, 2009, 1:26:58 PM2/5/09
to easyt...@googlegroups.com
Is there any way to launch the application using Java webstart and run the tests.

Gino

Alex Ruiz

unread,
Feb 5, 2009, 1:51:17 PM2/5/09
to easyt...@googlegroups.com
Not at this moment. Can you please file an issue? That way we can keep track of any progress on this front.

Thanks,
-Alex

homer

unread,
Feb 6, 2009, 11:42:16 AM2/6/09
to easytesting
I just found this

http://openjnlp.nanode.org/




On Feb 5, 1:51 pm, Alex Ruiz <alex.ruiz...@gmail.com> wrote:
> Not at this moment. Can you please file an issue? That way we can keep track
> of any progress on this front.
>
> Thanks,
> -Alex
>

Alex Ruiz

unread,
Feb 6, 2009, 8:23:53 PM2/6/09
to easyt...@googlegroups.com
Very interesting! I'll take a look at it and see if we can use it in FEST.

Thanks!
-Alex

homer

unread,
Feb 9, 2009, 12:35:14 AM2/9/09
to easytesting
I wrote a simple jnlp launcher using netx library. The jar is
attached to issue 304.

http://jnlp.sourceforge.net/netx/


On Feb 6, 8:23 pm, Alex Ruiz <alex.ruiz...@gmail.com> wrote:
> Very interesting! I'll take a look at it and see if we can use it in FEST.
>
> Thanks!
> -Alex
>

Alex Ruiz

unread,
Feb 9, 2009, 12:47:42 AM2/9/09
to easyt...@googlegroups.com
Many thanks Viet! I'll be reviewing the path shortly. I truly appreciate your contribution! :)

Sincerely,
-Alex.

Gino John

unread,
Feb 9, 2009, 1:55:54 PM2/9/09
to easyt...@googlegroups.com
The solution is good, but ran into the following issues

1. We are using the spec version 6.0 to launch the webstart it resulted in the following exception.

java.lang.RuntimeException: Error reading jnlp file at 'http://localhost:8080/test.jnlp'.  Please test launch the URL in your browser.
    at org.fest.swing.launcher.NetxJnlpLauncher.start(NetxJnlpLauncher.java:39)
    at com.extremenetworks.epicenter.funtionaltest.client.ClientFuntionalTestCase.setUp(ClientFuntionalTestCase.java:87)
    at junit.framework.TestCase.runBare(TestCase.java:128)
    at junit.framework.TestResult$1.protect(TestResult.java:106)
    at junit.framework.TestResult.runProtected(TestResult.java:124)
    at junit.framework.TestResult.run(TestResult.java:109)
    at junit.framework.TestCase.run(TestCase.java:120)
    at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: netx.jnlp.LaunchException: Fatal: Read Error: Could not read or parse the JNLP file.
    at netx.jnlp.Launcher.toFile(Launcher.java:280)
    at netx.jnlp.Launcher.launch(Launcher.java:170)
    at org.fest.swing.launcher.NetxJnlpLauncher.start(NetxJnlpLauncher.java:34)
    ... 12 more
Caused by: netx.jnlp.ParseException: Spec version not supported (supports 1.0)
    at netx.jnlp.Parser.<init>(Parser.java:139)
    at netx.jnlp.JNLPFile.parse(JNLPFile.java:482)
    at netx.jnlp.JNLPFile.<init>(JNLPFile.java:143)
    at netx.jnlp.Launcher.toFile(Launcher.java:264)
    ... 14 more


2. I changed the spec version to 1.0 and managed to launch the webstart application but it throws exception when webstart service look up is made.

            BasicService bs = (BasicService)ServiceManager.lookup("javax.jnlp.BasicService");

javax.jnlp.UnavailableServiceException: uninitialized
    at javax.jnlp.ServiceManager.lookup(ServiceManager.java:44)

Gino

homer

unread,
Feb 9, 2009, 4:32:36 PM2/9/09
to easytesting
Can you by pass my patch and launch the app directly?

http://jnlp.sourceforge.net/netx/using.html

There might be a bug in the library.
> On Sun, Feb 8, 2009 at 9:47 PM, Alex Ruiz <alex.ruiz...@gmail.com> wrote:
> > Many thanks Viet! I'll be reviewing the path shortly. I truly appreciate
> > your contribution! :)
>
> > Sincerely,
> > -Alex.
>

Gino John

unread,
Feb 9, 2009, 6:40:04 PM2/9/09
to easyt...@googlegroups.com
If I use the library directly it throws the following exception.

Exception in thread "test@localhost" java.lang.NoClassDefFoundError: javax/jnlp/SingleInstanceListener
        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$000(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 netx.jnlp.runtime.JNLPClassLoader.findClass(JNLPClassLoader.java:510)
        at netx.jnlp.runtime.JNLPClassLoader.loadClassExt(JNLPClassLoader.java:531)
        at netx.jnlp.runtime.JNLPClassLoader.loadClass(JNLPClassLoader.java:498)
        at netx.jnlp.Launcher.launchApplication(Launcher.java:297)
        at netx.jnlp.Launcher$TgThread.run(Launcher.java:466)
Caused by: java.lang.ClassNotFoundException: javax.jnlp.SingleInstanceListener
        at netx.jnlp.runtime.JNLPClassLoader.loadClassExt(JNLPClassLoader.java:541)
        at netx.jnlp.runtime.JNLPClassLoader.loadClass(JNLPClassLoader.java:498)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
        ... 13 more

homer

unread,
Feb 10, 2009, 10:31:29 AM2/10/09
to easytesting
Hmm... The missing class is part of jnlp API.

In addition to next.jar can you locate and add jnlp.jar and/or
javaws.jar to the classpath? They are in <jre_home>/lib if you're on
Windows.

Gino John

unread,
Feb 10, 2009, 2:12:42 PM2/10/09
to easyt...@googlegroups.com
No luck with javaws.jar in the classpath. It looks like the netx.jar already have the javax.jnlp.* classes and 'SingleInstanceListener' is added later into the java (java 5) and it is missing from the netx.jar.

Gino

homer

unread,
Feb 12, 2009, 10:10:18 AM2/12/09
to easytesting
SingleInstanceListener is in 1.5 javaws.jar
what jre are you using?
can you check where in application-under-test it implements
SingleInstanceListener interface and how the project resolves the
class.



On Feb 10, 2:12 pm, Gino John <ginoj...@gmail.com> wrote:
> No luck with javaws.jar in the classpath. It looks like the netx.jar already
> have the javax.jnlp.* classes and 'SingleInstanceListener' is added later
> into the java (java 5) and it is missing from the netx.jar.
>
> Gino
>

Gino John

unread,
Feb 12, 2009, 12:40:19 PM2/12/09
to easyt...@googlegroups.com
We are using 1.6u10. We have implemented SingeInstanceListener part of the main class to avoid multiple client launch. In the eclipse environment we have the javaws.jar part of the classpath. I could launch the UI using the webstart launcher provided, but the webstart services are not initialized. If I try to launch using directly using the netx.jar with javaws.jar in the classpath it throws class not found for SingleInstanceListener.

Gino
Reply all
Reply to author
Forward
0 new messages