Recorder fails to run

WindowTester allows you to easily create and run unit tests for every GUI they build. It can also be used to generate system level tests.

Moderators: gnebling, Eric Clayberg, Dan Rubel, keertip, Phil Quitslund

Recorder fails to run

Postby sbrech » Mon Feb 14, 2011 4:02 am

Our application fails to run in record mode with the following error (for details see attached error log):

java.lang.ExceptionInInitializerError
...
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'projectOps' is defined
...

The application is divided into 2 eclipse projects (gui, backend) and any reference from the gui project to the backend project fails with the above error (which works in the normal run mode).

Any help would be appreciated.

Thanks in advance,

Stefan
Attachments
log.txt
(27.92 KiB) Downloaded 8 times
sbrech
 
Posts: 4
Joined: Wed Feb 09, 2011 6:51 am

Re: Recorder fails to run

Postby keertip » Mon Feb 14, 2011 8:29 am

Is the project that contains 'projectOps' on the classpath?
keertip
Moderator
 
Posts: 221
Joined: Thu Mar 15, 2007 10:26 am

Re: Recorder fails to run

Postby sbrech » Tue Feb 15, 2011 4:08 am

Yes, it is (see attachment). As I mentioned, the application runs/debugs as expected normally.

Thanks,

Stefan
Attachments
classpath.jpg
classpath.jpg (80.04 KiB) Viewed 170 times
sbrech
 
Posts: 4
Joined: Wed Feb 09, 2011 6:51 am

Re: Recorder fails to run

Postby keertip » Tue Feb 15, 2011 8:30 am

What kind of application are you running?
keertip
Moderator
 
Posts: 221
Joined: Thu Mar 15, 2007 10:26 am

Re: Recorder fails to run

Postby sbrech » Tue Feb 15, 2011 9:07 am

Swing application that uses MS SQL Server as its DB engine.
sbrech
 
Posts: 4
Joined: Wed Feb 09, 2011 6:51 am

Re: Recorder fails to run

Postby keertip » Wed Feb 16, 2011 8:29 am

As an experiment, would you be able to build the backend project into a jar, drop it in the other project and then see if the recording works?
keertip
Moderator
 
Posts: 221
Joined: Thu Mar 15, 2007 10:26 am

Re: Recorder fails to run

Postby sbrech » Fri Feb 18, 2011 6:17 am

Finally got to the bottom of the issue - when running the application with WindowTester Recorder I needed to explicitly load the Spring application context files, wildcards that work in normal run mode don't work in recording mode. Specifically, ClassPathXmlApplicationContext can't find the context files/resolve the bean definitions if wildcard entries are used.

Any ideas why that is the case ?
sbrech
 
Posts: 4
Joined: Wed Feb 09, 2011 6:51 am

Re: Recorder fails to run

Postby keertip » Tue Feb 22, 2011 8:59 am

Well, WindowTester recorder launches the application in a different manner than the Java application launch. This might be the reason why it is not able to resolve these dependencies. Thanks for figuring it out. This is sure to help other folks too!
keertip
Moderator
 
Posts: 221
Joined: Thu Mar 15, 2007 10:26 am

Re: Recorder fails to run

Postby sazaju » Thu Apr 21, 2011 8:17 am

Hi,

I have a similar problem (recorder do not run) but not with the same result : I launch the record config but nothing happens (no console output, no app launched). My app is quite complex :
- SWT-based application, with a lot of custom widgets extending SWT widgets ;
- more than 20 projects with specific dependancies ;
- one project with all the libraries (including SWT JARs) ;
- one project with all the sources of the libraries.

To make the record config, I have just copied the run config :
Image
Image

I say it now : I do not want to try it on a fresh installation of a new Eclipse (I have done it and it works well, but there is no interest in this option as this is this app I want to test, and this version of Eclipse is completed with custom plugins).
sazaju
 
Posts: 7
Joined: Thu Apr 14, 2011 4:17 am

Re: Recorder fails to run

Postby gnebling » Thu Apr 21, 2011 1:42 pm

What's the exact error you're getting?
gnebling
Moderator
 
Posts: 243
Joined: Tue Aug 22, 2006 7:49 am

Re: Recorder fails to run

Postby sazaju » Thu Apr 21, 2011 10:17 pm

Well... as said nothing, I have absolutely nothing, that is the problem :
- I have installed WindowTester on a fresh installation ;
- I have tried it on the SWT official sample (given here) ;
- after a time on this forum I succeeded in running it, recording test and launching it (on the SWT sample) ;
- I have installed the plugin on my usual Eclipse (configured with the usual config of my company) ;
- I have created the recording config (see the printscreens above) ;
- I launch the recording, I see briefly the loading bar in the bottom-right-corner of Eclipse but then nothing happen, the record do not launch and no console is created.

If it can help :
- my app run on a Tomcat locally installed (in programing context) which is launched before the recording (like the classic app launching) ;
- this is a three-tier architecture (SWT GUI + Tomcat server + Oracle database) with an Hibernate layer between Tomcat and Oracle.
sazaju
 
Posts: 7
Joined: Thu Apr 14, 2011 4:17 am

Re: Recorder fails to run

Postby sazaju » Thu Apr 21, 2011 10:54 pm

First mistake corrected : I have just installed the wrong version of WindowTester and GEF (3.6 for an Eclipse 3.5). I have tried the SWT sample on my development Eclipse and it did not work too. Now I have the good installation, all run (sample and app).

But I have a new problem (which give the same result so I continue in this topic) :
Code: Select all
fr.infologic.core.exceptions.InfologicRuntimeException: URL de configuration (exemple http://adresse_du_serveur:8080/nom_du_module?GUID=guid_de_votre_poste)
est obligatoire en tant qu'argument
nom_du_module=le module (ex. ventes, stocks, etc.
)
   at fr.infologic.core.client.Application.verifArgs(Application.java:1305)
   at fr.infologic.achatsventes.client.VentesApp.main(VentesApp.java:29)
   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.windowtester.swt.bootstrap.SwtBootstrapApplication.run(SwtBootstrapApplication.java:39)
   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.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:574)
   at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
   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.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
   at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
   at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
   at org.eclipse.equinox.launcher.Main.main(Main.java:1287)


It occurs when I launch the recording. It simply says that the mandatory app argument (a URL) is not given. You can see the printscreens above which show the program arguments (http://127.0.0.1:9080/ventes?GUID=DEFAULT), this is the copy-paste of my run config, but it seems this argument is not transmitted to the app launched by the recorder. Is there a specific way to ask to the recorder to run the app giving specific args ?
sazaju
 
Posts: 7
Joined: Thu Apr 14, 2011 4:17 am

Re: Recorder fails to run

Postby gnebling » Tue Apr 26, 2011 1:24 pm

Unfortunately, WindowTester does not support Program Arguments. You'll have to pass arguments as a VM argument.
gnebling
Moderator
 
Posts: 243
Joined: Tue Aug 22, 2006 7:49 am


Return to Window Tester

Who is online

Users browsing this forum: No registered users and 1 guest

cron