Integrating third party libraries

102 views
Skip to first unread message

Roger Schlachter

unread,
Apr 20, 2012, 5:20:35 PM4/20/12
to jangaro...@googlegroups.com
I'm trying to include Kaltura's ActionScript(Flex) client library for their APIs (http://www.kaltura.com/api_v3/testme/client-libs.php) into an application. The application uses Maven for dependency management. Using IntelliJ 11.1, I referenced the library folder as an external library in the project structure and was able to get IntelliJ to recognize the classes and provide code completion.  When I went to build via Maven, I received an error stating that it couldn't find the class from the Kaltura library. I'm assuming this is because I'm referencing it as an external library and not as a Maven dependency.  The other thing I'm wondering about is that I assume Jangaroo will need to convert the AS files to JS.  Should I be using the JS library in some way? Has anyone had any experience with a similar situation?  Or anyone think they can shed a little light on the situation? 

Frank

unread,
Apr 21, 2012, 3:20:22 AM4/21/12
to Jangaroo Users
Hi Roger,

concerning IDEA, Maven and Jangaroo: There is a Jangaroo
IDEA Plugin called "Jangaroo 0.9", which can be installed
from the central IDEA plugin repository as usual.
The plugin takes care of importing Maven POMs using
Jangaroo packaging correctly by creating the corresponding
external libraries in IDEA.
However, you cannot use the original Kaltura Maven artifact
as-is, but you will have to produce a Jangaroo version of
Kaltura like follows.

Generally, there are two ways to create a new Jangaroo
library: either recompile the AS3 source code of an AS3
library, or produce an AS3 API and use a JavaScript
library. In both cases, you have to create a Maven POM
to package the library for Jangaroo.

Since you seem to be in the optimal situation that there is an
AS3 *and* a JavaScript version of the Kaltura library, you
can use the approach that works better.

When trying to recompile original AS3 code, you ofter
run into problems which Flash APIs not being available
in Jangaroo or not fully implemented. If you are lucky,
you can recompile the Kaltura AS3 library and it simply
works.

If there are problems running the recompiled version, you
will have to grab the AS3 API from the AS3 version and
the implementation from the JavaScript version.
For this solution, only keep the method signatures of the
classes and make everything "native". Have a look at
our Ext AS API for Ext JS at
https://github.com/CoreMedia/jangaroo-libs/tree/master/ext-as
The original JavaScript code has to be Jangaroo-packaged, too,
like we did for ext-js:
https://github.com/CoreMedia/jangaroo-libs/tree/master/ext-js
The script net.jangaroo.ext-as-aliases.js
https://github.com/CoreMedia/jangaroo-libs/blob/master/ext-as/src/main/joo-js/joo/net.jangaroo.ext-as-aliases.js
takes care of the differences between the AS3 API and the
JavaScript implementation (it is loaded by ext-as.module.js).
For example, we wanted package names to be lower-case in
AS3, but the JavaScript top level namespace of Ext JS is "Ext".
For further hints, consult the following thread:
http://groups.google.com/group/jangaroo-users/browse_thread/thread/4aa0b43d22223e79
And feel free to ask if you are stuck!
Greetings,
-Frank-
Message has been deleted
Message has been deleted

Roger Schlachter

unread,
May 8, 2012, 3:50:04 PM5/8/12
to jangaro...@googlegroups.com
One more correction below :P

Sorry. Part of that last post was a little vague. I've updated it below.

Hi Frank,

Thanks for the direction. I tried recompiling the AS3 library, but as you mentioned, I ran into problems.  Going the other route, I could take the the AS3 library and gut it and use the JS library for implementation, but this seems to defeat the purpose a little. When an updated version of the client libraries are released, we would need to download the new JS library and the new AS3 library and 
either gut it again or maintain our gutted version on top of updating any existing code with changes.  I suppose we could write the AS3 side for just the functions we need to hit the JS library, but that's still a little less than ideal. Jangaroo seems to have made it difficult to use AS3 or JS libraries unless I'm missing something here (and feel free to correct me if I am! I'm new to Jangaroo).  How are you guys keeping things updated if a new version of ext-js comes out? 

Kaltura does seem to offer the option of generating a client library, which may or may not prove useful if there would be a way to maybe generate the AS3 library minus the Flash dependencies or something.

-Roger


Frank

unread,
May 9, 2012, 3:44:19 AM5/9/12
to jangaro...@googlegroups.com
Hi Roger,

How are you guys keeping things updated if a new version of ext-js comes out?
we have tweaked the tool ext-doc, now called ext-doc-to-as, to generate AS3 APIs from (Ext-specific) JSDoc annotations.
However, in your case, you already have an AS3 API and a JavaScript implementation.
What I'd suggest is the following.

1. Package Kaltura JS library as Jangaroo Maven module kaltura-js
In analogy to jangaroo-libs' ext-js module, package the Kaltura JavaScript library as a Jangaroo Maven module.

2. Compile the Kaltura AS3 library with Jangaroo

I tried recompiling the AS3 library, but as you mentioned, I ran into problems.
Did you run into problems during compilation, or did it just not work at runtime?
Compiling should be possible, since we have the complete Flash 10 API for Jangaroo (only the implementation is quite incomplete). If compilation fails, let's find a solution! Please post the compiler error or, even better, your Jangaroo project, and I'm sure we can find a workaround or update the compiler so that at least compilation of the original Kaltura ActionScript code works.
What you need to know now is that the Jangaroo compiler, when compiling AS3 source code, generates two types of output: The JavaScript code needed at runtime, and the AS3 API (AS3 source code stripped down to API only) needed for compilation (under META-INF/joo-api). The latter allows the artifact to leave out the source code and speeds up compilation time when an existing module is used during compilation, since at compile time, the client code is only interested in the method signatures, not their implementation.
You can take advantage of this feature and use the Jangaroo compiler to extract the API of the Kalture AS3 library automatically! If the compiler documentation does not suffice, feel free to ask for directions.

3.Create a JavaScript adapter
In analogy to net.jangaroo.ext-as-aliases.js mentioned above, create a small script that maps the AS3 package- and class-names to the corresponding JavaScript objects, and, if needed, deviating AS3 method names to the corresponding JS method names.

4. Package kaltura-as Jangaroo module
In analogy to jangaroo-libs' ext-as module, package the generated Kaltura AS3 API stubs under src/main/joo-api, a module loader script src/main/joo-js/joo/kaltura-as.module.js (see ext-as.module.js), and the script with your aliases as a new Jangaroo Maven module.


When an updated version of the client libraries are released, we would need to download the new JS library and the new AS3 library and either gut it again or maintain our gutted version on top of updating any existing code with changes.

When an update of Kaltura is released, you only need to repeat part of this process, namely
  1. Update Kaltura JS library: simply repackage the JavaScript library into the kaltura-js Jangaroo module, update its version and release it (if you want)
  2. Recompile Kaltura AS library to update Jangaroo Kaltura AS library (also update version and release if you want to)
The adapter/aliases script will usually not have to be updated, unless new classes or methods have been added to Kaltura's API that have different names in JavaScript.


Jangaroo seems to have made it difficult to use AS3 or JS libraries unless I'm missing something here (and feel free to correct me if I am! I'm new to Jangaroo).
To use JS libraries is really easy, since you can simply access any (global) JavaScript object in an untyped fasion (window['foobar']). The complicated part is to provide an AS3 API for a library that is actually implemented in JavaScript, or to compile and let run the original AS3 source code, which means providing full compatibility with the complete Flash library, which is kind of utopian.
I think measured by the value that is gained by having a statically typed library and the corresponding IDE support to use the JavaScript Kaltura library from ActionScript, the process described above is worth the effort, and I don't really have an idea how this could be made any easier. Note that the process has some initial overhead and a bit of work for every Kaltura update, but everybody who wants to use Kaltura from ActionScript/Jangaroo could then do so really simple. Especially if we added the two modules to jangaroo-libs and deployed them to Maven Central, so that anyone can download and use them by simply adding a Maven dependency to a Jangaroo project!

Again, if you get stuck, feel free to ask for help at any time!

Greetings,
-Frank-

Roger Schlachter

unread,
May 9, 2012, 4:11:46 PM5/9/12
to jangaro...@googlegroups.com
Thanks Frank. Very helpful and very informative. 

I'm trying to compile the AS library. I just dropped the Kaltura Library files into the helloWorld example just to get started. I've attached the project. When compiling, I get the following:

[INFO] --- jangaroo-maven-plugin:0.8.1:compile (default) @ hello-world ---
[info] Compiling 1500 joo source files to /Users/rschlachter/projects/helloWorld/target/jangaroo-output/joo/classes
/Users/rschlachter/projects/helloWorld/src/main/joo/com/kaltura/commands/QueuedRequest.as(39): Error: in column 27: Syntax error: '<'
/Users/rschlachter/projects/helloWorld/src/main/joo/com/kaltura/delegates/thumbParams/ThumbParamsGetByConversionProfileIdDelegate.as(30): Error: in column 61: Syntax error: ';'
/Users/rschlachter/projects/helloWorld/src/main/joo/com/kaltura/delegates/flavorAsset/FlavorAssetGetWebPlayableByEntryIdDelegate.as(30): Error: in column 61: Syntax error: ';'
/Users/rschlachter/projects/helloWorld/src/main/joo/com/kaltura/delegates/flavorAsset/FlavorAssetGetByEntryIdDelegate.as(30): Error: in column 61: Syntax error: ';'
/Users/rschlachter/projects/helloWorld/src/main/joo/com/kaltura/delegates/flavorAsset/FlavorAssetGetFlavorAssetsWithParamsDelegate.as(30): Error: in column 81: Syntax error: ';'
/Users/rschlachter/projects/helloWorld/src/main/joo/com/kaltura/delegates/baseEntry/BaseEntryGetByIdsDelegate.as(30): Error: in column 57: Syntax error: ';'
/Users/rschlachter/projects/helloWorld/src/main/joo/com/kaltura/delegates/playlist/PlaylistExecuteFromFiltersDelegate.as(30): Error: in column 57: Syntax error: ';'
/Users/rschlachter/projects/helloWorld/src/main/joo/com/kaltura/delegates/uiConf/UiConfGetAvailableTypesDelegate.as(30): Error: in column 67: Syntax error: ';'
/Users/rschlachter/projects/helloWorld/src/main/joo/com/kaltura/delegates/thumbAsset/ThumbAssetGetByEntryIdDelegate.as(30): Error: in column 59: Syntax error: ';'
/Users/rschlachter/projects/helloWorld/src/main/joo/com/kaltura/utils/ObjectUtil.as(60): Error: in column 38: Syntax error: '.'
/Users/rschlachter/projects/helloWorld/src/main/joo/com/kaltura/delegates/playlist/PlaylistExecuteDelegate.as(30): Error: in column 57: Syntax error: ';'
/Users/rschlachter/projects/helloWorld/src/main/joo/com/kaltura/delegates/flavorParams/FlavorParamsGetByConversionProfileIdDelegate.as(30): Error: in column 63: Syntax error: ';'
/Users/rschlachter/projects/helloWorld/src/main/joo/com/kaltura/delegates/mixing/MixingGetReadyMediaEntriesDelegate.as(30): Error: in column 59: Syntax error: ';'
/Users/rschlachter/projects/helloWorld/src/main/joo/com/kaltura/delegates/playlist/PlaylistExecuteFromContentDelegate.as(30): Error: in column 57: Syntax error: ';'
/Users/rschlachter/projects/helloWorld/src/main/joo/com/kaltura/delegates/report/ReportGetGraphsDelegate.as(30): Error: in column 61: Syntax error: ';'
/Users/rschlachter/projects/helloWorld/src/main/joo/com/kaltura/delegates/mixing/MixingGetMixesByMediaIdDelegate.as(30): Error: in column 55: Syntax error: ';'
/Users/rschlachter/projects/helloWorld/src/main/joo/com/kaltura/net/KalturaCall.as(37): Error: in column 2: cannot find source for flash.events.EventDispatcher
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[INFO] 0error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.815s
[INFO] Finished at: Wed May 09 14:57:48 CDT 2012
[INFO] Final Memory: 244M/1011M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal net.jangaroo:jangaroo-maven-plugin:0.8.1:compile (default) on project hello-world: Compilation failed -> [Help 1]

I believe I can fix up the syntax errors manually if need be, but the "cannot find source for flash.events.EventDispatcher" seems to be the one causing it to fail.
helloWorld.zip

Frank

unread,
May 10, 2012, 3:46:43 AM5/10/12
to Jangaroo Users
After having had a closer look at Kaltura's AS and JS client library,
I am
a bit confused. I can't really get the connection between the AS and
JS
API.

At least I got the AS library to compile with Jangaroo 0.9.15 with
only a few
changes:

* remove double semicolons (";;"). Jangaroo compiler does not like
these
at some locations.
* import com.acme.Foo;Foo;
I guess this makes FlashPlayer initialize the imported class
immediately
(execute static code). This syntax is not yet implemented in
Jangaroo,
but it works when you simply move the "invocation" of the class into
the
class declaration, like so:
import com.acme.Foo;
public class Bar {
Foo;
...
}
* E4X-specific syntax, here the ".." operator, is not supported.
Simply
comment-out line or remove one "." (of course changing the meaning,
but we just want to get it compiled)
* usage of external, non-Flash-library classes:
* mx.util.UIDUtil => just used flash.utils.UIDUtil, which seems
compatible
* ru.inspirit.net.MultipartURLLoader and
ru.inspirit.net.events.MultipartURLLoaderEvent => copied them from
public source repository

After these changes, everything compiles and generates JS code as well
as AS API stubs (under target/classes/META-INF/joo-api/). When I tried
to run the JS code, I had to implement flash.net.URLVariables in
JooFlash,
and after that, the KalturaClientSample actually loads, runs and
produces
the following POST:
http://www.kaltura.com//api_v3/index.php?service=session&action=start&kalsig=27707f4105e5fe303e3fe1818287128f

The reason there is no response is probably that you need to add
your API_SECRET and KALTURA_PARTNER_ID (which I don't have).

As said above, I then tried to match the original Kaltura JavaScript
client
library with the AS API, but couldn't figure out how they relate.
It seems all Kaltura client libraries are (partially) generated code?

So currently, it seems to me that it is easier to actually compile the
AS client with Jangaroo than to follow the plan sketched in my last
post.
I could put the project I have so far on github.
What do you think?

Greetings,
-Frank-

Frank

unread,
May 10, 2012, 3:52:42 AM5/10/12
to Jangaroo Users
Sorry, I only saw your reply after my own latest post.

To make the Jangaroo compiler understand Vector syntax,
you have to update the Jangaroo compiler version; the latest
version is 0.9.15. Please also update the jangaroo-libs version
to 0.9.15.

What you need to use the Flash API is a dependency on
the jooflash library in your pom.xml, like so:

<dependency>
<groupId>net.jangaroo</groupId>
<artifactId>jooflash</artifactId>
<version>0.9.15</version>
<type>jangaroo</type>
</dependency>

On May 9, 10:11 pm, Roger Schlachter <roger.schlach...@gmail.com>
wrote:
>  helloWorld.zip
> 3383KViewDownload

Roger Schlachter

unread,
May 10, 2012, 9:27:31 AM5/10/12
to jangaro...@googlegroups.com
What did you do for the mx.utils.ObjectProxy? That seems to be my current hold up in two spots. 
    [error] /Users/rschlachter/projects/helloWorld/src/main/joo/com/kaltura/utils/ObjectUtil.as(60): Error: in column 47: Syntax error: '('
    [error] /Users/rschlachter/projects/helloWorld/src/main/joo/com/kaltura/vo/BaseFlexVo.as(30): Error: in column 2: unable to resolve import of mx.utils.ObjectProxy

The first error is a spot where I removed one . from a ..

If you don't mind putting your project up on Github that would be great as well. 

I assume that the code is partially generated as well. They have some documentation about writing your own client library generator http://www.kaltura.org/api-client-library-generator-guide
I'm wondering if I could do something with this to generate a more Jangaroo friendly version of the library although it may be too time consuming. 

My end goal was to be able to more or less replace our current custom code for working with the Kaltura API with something that we wouldn't have to maintain.  Right now, we've been adding calls to the Kaltura API to our custom code as we need to and it's working fine, but we've got a bunch more things we want to use the Kaltura API for and it seemed like if we could get one of their many libraries working it would have saved us some time and been a little cleaner, but now I'm not so sure. 

Thanks for all of your help so far!

Frank

unread,
May 10, 2012, 9:44:49 AM5/10/12
to Jangaroo Users
Oh yeah, forgot to mention that I commented-out "extends ObjectProxy".
This depends on flash.util.Proxy and allows to do strange
things (rather meta-programming) which I'm afraid are not possible
with JavaScript (e.g. a "catch-all-unknown-properties" method).

I'll see what I can do to get my project on github.

Thanks for your efforts so far, too, Roger, since adding another
jangaroo-lib for a "most wanted" library would be a great achievment!

Greetings
-Frank-

On May 10, 3:27 pm, Roger Schlachter <roger.schlach...@gmail.com>
wrote:
> What did you do for the mx.utils.ObjectProxy? That seems to be my current
> hold up in two spots.
>     [error]
> /Users/rschlachter/projects/helloWorld/src/main/joo/com/kaltura/utils/ObjectUtil.as(60):
> Error: in column 47: Syntax error: '('
>     [error]
> /Users/rschlachter/projects/helloWorld/src/main/joo/com/kaltura/vo/BaseFlexVo.as(30):
> Error: in column 2: unable to resolve import of mx.utils.ObjectProxy
>
> The first error is a spot where I removed one . from a ..
>
> If you don't mind putting your project up on Github that would be great as
> well.
>
> I assume that the code is partially generated as well. They have some
> documentation about writing your own client library
> generatorhttp://www.kaltura.org/api-client-library-generator-guide

Roger Schlachter

unread,
May 10, 2012, 2:06:40 PM5/10/12
to jangaro...@googlegroups.com
Do you think it would be more beneficial to use the JS library for implementation and write our own AS API for whatever we need? At least we would have the JS implementation and wouldn't have to worry about changing URLs if they change (which we would have to change now if they were to change). The biggest headache would be if they decided to change a call all together which seems like it would be a headache in either system.  

Frank

unread,
May 11, 2012, 7:58:15 AM5/11/12
to Jangaroo Users
I really can't tell. The Kaltura JavaScript API does not really
provide useful
JSDoc annotations to automate converting it to an ActionScript API.
And it seems to be quite different from the original Kaltura AS API.
I also don't know how large a part of the Kaltura client API you are
actually using.

On the other hand, I got further in compiling and running the original
Kaltura AS3 API, but there still some severe problems to solve.

So, as always... it depends.

On May 10, 8:06 pm, Roger Schlachter <roger.schlach...@gmail.com>
wrote:
> Do you think it would be more beneficial to use the JS library for
> implementation and write our own AS API for whatever we need? At least we
> would have the JS implementation and wouldn't have to worry about changing
> URLs if they change (which we would have to change now if they were to
> change). The biggest headache would be if they decided to change a call all
> together which seems like it would be a headache in either system.

To succeed in getting to run Kaltura's ActionScript client (alas, 1500
classes!), I made a few changes to Jangaroo Tools and Libs:
* made int.MAX_VALUE etc. real constants in jangaroo-runtime
to avoid compiler errors when they are used as parameter
initializers
* added "XML" to build-in functions/types which have to be
treated a bit differently
* implemented flash.net.URLVariables in JooFlash
* fixed URLLoader to support ContentType and POST body

So I have to use SNAPSHOT dependencies on the latest
jangaroo-tools and jangaroo-libs versions, and have to accept that
it will only work in Firefox, since only Firefox supports the
JavaScript
XML function (part of E4X). :-(

Then, I ran into the good old cross-domain request problem and had to
set up a proxy to www.kaltura.com/api_v3.

But believe it or not, after all these fixes and workarounds, I got
a Kaltura session established by the KalturaClientSample!

Btw., I pushed the Kaltura-Jangaroo-project to github:
https://github.com/fwienber/kaltura

As said above, it uses that latest Jangaroo SNAPSHOTS, and
these are not deployed, so you'd have to clone jangaroo-tools
and jangaroo-libs, too, and build the SNAPSHOT
versions locally before building kaltura-flex.

Good luck!

Roger Schlachter

unread,
May 14, 2012, 3:50:47 PM5/14/12
to jangaro...@googlegroups.com
Thanks! I've managed to pull down jangaroo-tools and jangaroo-libs and building the SNAPSHOT versions locally. I forked your kaltura project, but when I go to build it, I'm running into the following Selenium error:

    [ERROR] Failed to execute goal net.jangaroo:jangaroo-maven-plugin:0.9.16-SNAPSHOT:test (default-test) on project kaltura-flex: Selenium setup failure: Timed out after 30000ms -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal net.jangaroo:jangaroo-maven-plugin:0.9.16-SNAPSHOT:test (default-test) on project kaltura-flex: Selenium setup failure
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: org.apache.maven.plugin.MojoExecutionException: Selenium setup failure
at net.jangaroo.jooc.mvnplugin.test.JooTestMojo.executeSelenium(JooTestMojo.java:290)
at net.jangaroo.jooc.mvnplugin.test.JooTestMojo.execute(JooTestMojo.java:233)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 25 more
Caused by: com.thoughtworks.selenium.SeleniumException: Timed out after 30000ms
at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:112)
at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:106)
at com.thoughtworks.selenium.DefaultSelenium.waitForCondition(DefaultSelenium.java:663)
at net.jangaroo.jooc.mvnplugin.test.JooTestMojo.executeSelenium(JooTestMojo.java:273)
... 28 more

It looks like a test is timing out? Or I haven't set something up correctly. I'm new to Selenium. I just downloaded the jar and ran it. 

Frank

unread,
May 14, 2012, 6:59:56 PM5/14/12
to jangaro...@googlegroups.com
Hi Roger,

never mind the time-out, the complete web-app has already been assembled.
If you have installed any local web-server, you can either set your document
root to include target/test-classes or copy everything under that folder into
your web document root. Then, open
  http://localhost/<...whatever, maybe empty...>/target/test-classes/tests.html,

Usually, you would set up a second project using the library and building as
a web-app, but I took the fast lane and told Maven that KalturaClientSample.as
is test code. Then Maven + Jangaroo build a test web-app and try to run it
using Selenium, but I just wanted to run and debug it in the browser "manually".

As said, you can ignore the time-out and open tests.html manually in Firefox.
However, if you want Jangaroo tests to run automatically, you would have to
download Selenium 1 remote control (I think 1.0.3 is the latest version) and start
its "server" with
   java -jar selenium-server.jar
Then, the Jangaroo test, instead of timing out, should contact this Selenium
server, which in turn fires up Firefox (or your default browser) to run "tests.html".
Alternatively, you can install phantomjs, and the test should run there
(without starting any browser).

Have fun,
-Frank-

Thanks! I've managed to pull down jangaroo-tools and jangaroo-libs and building the SNAPSHOT versions locally. I forked your kaltura project, but when I go to build it, I'm running into the following Selenium error:
...
Reply all
Reply to author
Forward
0 new messages