Selenium RC Plugin

ClassNotFoundException: grails.plugins.selenium.SeleniumManager

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Grails 1.2.0 and selenium-rc 0.2

Description

I am facing the following error:
Error executing script TestApp: java.lang.ClassNotFoundException: grails.plugins.selenium.SeleniumManager
gant.TargetExecutionException: java.lang.ClassNotFoundException: grails.plugins.selenium.SeleniumManager

I noticed that the file selenium-java-client-driver-1.0.1.jar is not being deployed in the folder
.grails\1.2.0\projects\<my proj>\plugins\selenium-rc-0.2\lib

If I put it there manually, the error disappears.

Activity

Hide
Robert Fletcher added a comment -

The SeleniumManager class is not part of the jar, it is part of the plugin itself. The jar is now included via Grails' new dependency resolution DSL, therefore you do not need to manually copy the jar.

The problem you saw appears to be the same as http://jira.codehaus.org/browse/GRAILSPLUGINS-1855 which is that the plugin's _Events.groovy refers to SeleniumManager which may not yet be compiled. This has been fixed however sometimes when upgrading a plugin Grails seems to not recompile all the scripts right away so the problem you're seeing may be down to an older version of the plugin's _Events script hanging around before being recompiled.

Could you please run 'grails clean' followed by 'grails test-app -functional' and let me know if you still see the same issue?

Show
Robert Fletcher added a comment - The SeleniumManager class is not part of the jar, it is part of the plugin itself. The jar is now included via Grails' new dependency resolution DSL, therefore you do not need to manually copy the jar. The problem you saw appears to be the same as http://jira.codehaus.org/browse/GRAILSPLUGINS-1855 which is that the plugin's _Events.groovy refers to SeleniumManager which may not yet be compiled. This has been fixed however sometimes when upgrading a plugin Grails seems to not recompile all the scripts right away so the problem you're seeing may be down to an older version of the plugin's _Events script hanging around before being recompiled. Could you please run 'grails clean' followed by 'grails test-app -functional' and let me know if you still see the same issue?
Hide
Franklin Dattein added a comment -

Hi Robert,

thanks for the advice. I have tried your suggestion, but it hasn't worked.

The dependencies still not being downloaded and the Class SeleniumManager is complaining about the lack of the class com.thoughtworks.selenium.Selenium, as you mentioned..

Any other hint?

Show
Franklin Dattein added a comment - Hi Robert, thanks for the advice. I have tried your suggestion, but it hasn't worked. The dependencies still not being downloaded and the Class SeleniumManager is complaining about the lack of the class com.thoughtworks.selenium.Selenium, as you mentioned.. Any other hint?
Hide
Robert Fletcher added a comment -

I really can't reproduce this. The steps I've tried are...

  • copied the test project from test/projects/selenium-test outside of the plugin
  • removed the inline plugin declaration in BuildConfig
  • deleted ~/.grails and ~/.ivy2/cache so that everything has to be compiled & resolved from scratch
  • run 'grails install-plugin selenium-rc'
  • run 'grails test-app functional:'

and it works fine.

Is there any way you can attach an example project that reproduces the problem?

Show
Robert Fletcher added a comment - I really can't reproduce this. The steps I've tried are...
  • copied the test project from test/projects/selenium-test outside of the plugin
  • removed the inline plugin declaration in BuildConfig
  • deleted ~/.grails and ~/.ivy2/cache so that everything has to be compiled & resolved from scratch
  • run 'grails install-plugin selenium-rc'
  • run 'grails test-app functional:'
and it works fine. Is there any way you can attach an example project that reproduces the problem?
Hide
Robert Fletcher added a comment -

I've had some other confirmation that this issue does occur intermittently. Accordingly I'm going to make some changes to the way that configuration is loaded so that the plugin does not need to do tricks to ensure that SeleniumManager is available - it will no longer used until after the time it is definitely compiled.

Show
Robert Fletcher added a comment - I've had some other confirmation that this issue does occur intermittently. Accordingly I'm going to make some changes to the way that configuration is loaded so that the plugin does not need to do tricks to ensure that SeleniumManager is available - it will no longer used until after the time it is definitely compiled.
Hide
Robert Fletcher added a comment -

Please do

grails install-plugin selenium-rc 1.0-SNAPSHOT

and let me know if this is now resolved.

Show
Robert Fletcher added a comment - Please do grails install-plugin selenium-rc 1.0-SNAPSHOT and let me know if this is now resolved.
Hide
Robert Fletcher added a comment -

worth noting you may need to delete the old version of the plugin's _Events script from your ~/.grails directory

Show
Robert Fletcher added a comment - worth noting you may need to delete the old version of the plugin's _Events script from your ~/.grails directory

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: