Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.3.1.1 fails to run FirefoxDriver #176

Merged
merged 1 commit into from
Apr 27, 2013
Merged

Conversation

klieber
Copy link
Collaborator

@klieber klieber commented Apr 27, 2013

when I run 1.3.1.1 with a configuration of <webDriverClassName>org.openqa.selenium.firefox.FirefoxDriver</webDriverClassName> it breaks with the following exception. I found https://code.google.com/p/selenium/issues/detail?id=5470 discussing a similar stacktrace but I was unable to resolve it by adding selenium 2.32 as the dependency of jasmine-maven-plugin using this code:

            <plugin>
                <groupId>com.github.searls</groupId>
                <artifactId>jasmine-maven-plugin</artifactId>
                <version>1.3.1.1</version>
                <!-- ... SNIP... -->
                <dependencies>
                    <dependency>
                        <groupId>org.seleniumhq.selenium</groupId>
                        <artifactId>selenium-java</artifactId>
                        <version>2.32.0</version>
                    </dependency>
                </dependencies>
            </plugin>

This is the error printed by maven when running install or jasmine:test

[ERROR] Failed to execute goal com.github.searls:jasmine-maven-plugin:1.3.1.1:test (default) on project myproject: The jasmine-maven-plugin encountered an exception:
    [ERROR] java.lang.reflect.InvocationTargetException
    [ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    [ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    [ERROR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    [ERROR] at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
    [ERROR] at com.github.searls.jasmine.driver.WebDriverFactory.createCustomWebDriver(WebDriverFactory.java:67)
    [ERROR] at com.github.searls.jasmine.driver.WebDriverFactory.createWebDriver(WebDriverFactory.java:47)
    [ERROR] at com.github.searls.jasmine.mojo.TestMojo.createDriver(TestMojo.java:92)
    [ERROR] at com.github.searls.jasmine.mojo.TestMojo.executeSpecs(TestMojo.java:77)
    [ERROR] at com.github.searls.jasmine.mojo.TestMojo.run(TestMojo.java:43)
    [ERROR] at com.github.searls.jasmine.mojo.AbstractJasmineMojo.execute(AbstractJasmineMojo.java:387)
    [ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    [ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    [ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
    [ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    [ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    [ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    [ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    [ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [ERROR] at java.lang.reflect.Method.invoke(Method.java:601)
    [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
    [ERROR] Caused by: java.lang.NoSuchMethodError: org.openqa.selenium.io.IOUtils.closeQuietly(Ljava/io/Closeable;)V
    [ERROR] at org.openqa.selenium.firefox.FirefoxProfile.updateUserPrefs(FirefoxProfile.java:333)
    [ERROR] at org.openqa.selenium.firefox.FirefoxProfile.layoutOnDisk(FirefoxProfile.java:450)
    [ERROR] at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:77)
    [ERROR] at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:244)
    [ERROR] at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:110)
    [ERROR] at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:188)
    [ERROR] at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:183)
    [ERROR] at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:100)
    [ERROR] ... 31 more
    [ERROR] -> [Help 1]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.searls:jasmine-maven-plugin:1.3.1.1:test (default) on project myproject: The jasmine-maven-plugin encountered an exception: 
    java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
        at com.github.searls.jasmine.driver.WebDriverFactory.createCustomWebDriver(WebDriverFactory.java:67)
        at com.github.searls.jasmine.driver.WebDriverFactory.createWebDriver(WebDriverFactory.java:47)
        at com.github.searls.jasmine.mojo.TestMojo.createDriver(TestMojo.java:92)
        at com.github.searls.jasmine.mojo.TestMojo.executeSpecs(TestMojo.java:77)
        at com.github.searls.jasmine.mojo.TestMojo.run(TestMojo.java:43)
        at com.github.searls.jasmine.mojo.AbstractJasmineMojo.execute(AbstractJasmineMojo.java:387)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        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:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        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)
    Caused by: java.lang.NoSuchMethodError: org.openqa.selenium.io.IOUtils.closeQuietly(Ljava/io/Closeable;)V
        at org.openqa.selenium.firefox.FirefoxProfile.updateUserPrefs(FirefoxProfile.java:333)
        at org.openqa.selenium.firefox.FirefoxProfile.layoutOnDisk(FirefoxProfile.java:450)
        at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:77)
        at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:244)
        at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:110)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:188)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:183)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:100)
        ... 31 more

        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:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        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)
    Caused by: org.apache.maven.plugin.MojoExecutionException: The jasmine-maven-plugin encountered an exception: 
    java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
        at com.github.searls.jasmine.driver.WebDriverFactory.createCustomWebDriver(WebDriverFactory.java:67)
        at com.github.searls.jasmine.driver.WebDriverFactory.createWebDriver(WebDriverFactory.java:47)
        at com.github.searls.jasmine.mojo.TestMojo.createDriver(TestMojo.java:92)
        at com.github.searls.jasmine.mojo.TestMojo.executeSpecs(TestMojo.java:77)
        at com.github.searls.jasmine.mojo.TestMojo.run(TestMojo.java:43)
        at com.github.searls.jasmine.mojo.AbstractJasmineMojo.execute(AbstractJasmineMojo.java:387)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        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:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        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)
    Caused by: java.lang.NoSuchMethodError: org.openqa.selenium.io.IOUtils.closeQuietly(Ljava/io/Closeable;)V
        at org.openqa.selenium.firefox.FirefoxProfile.updateUserPrefs(FirefoxProfile.java:333)
        at org.openqa.selenium.firefox.FirefoxProfile.layoutOnDisk(FirefoxProfile.java:450)
        at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:77)
        at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:244)
        at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:110)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:188)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:183)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:100)
        ... 31 more

        at com.github.searls.jasmine.mojo.AbstractJasmineMojo.execute(AbstractJasmineMojo.java:391)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 19 more
    Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
        at com.github.searls.jasmine.driver.WebDriverFactory.createCustomWebDriver(WebDriverFactory.java:67)
        at com.github.searls.jasmine.driver.WebDriverFactory.createWebDriver(WebDriverFactory.java:47)
        at com.github.searls.jasmine.mojo.TestMojo.createDriver(TestMojo.java:92)
        at com.github.searls.jasmine.mojo.TestMojo.executeSpecs(TestMojo.java:77)
        at com.github.searls.jasmine.mojo.TestMojo.run(TestMojo.java:43)
        at com.github.searls.jasmine.mojo.AbstractJasmineMojo.execute(AbstractJasmineMojo.java:387)
        ... 21 more
    Caused by: java.lang.NoSuchMethodError: org.openqa.selenium.io.IOUtils.closeQuietly(Ljava/io/Closeable;)V
        at org.openqa.selenium.firefox.FirefoxProfile.updateUserPrefs(FirefoxProfile.java:333)
        at org.openqa.selenium.firefox.FirefoxProfile.layoutOnDisk(FirefoxProfile.java:450)
        at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:77)
        at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:244)
        at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:110)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:188)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:183)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:100)
        ... 31 more
    [ERROR] 
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR] 
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

@ghost ghost assigned klieber Apr 27, 2013
klieber added a commit that referenced this pull request Apr 27, 2013
1.3.1.1 fails to run FirefoxDriver
@klieber klieber merged commit 5759e6f into searls:master Apr 27, 2013
@klieber
Copy link
Collaborator

klieber commented Apr 27, 2013

@patrick-a-cavanaugh I've deployed a snapshot that includes a fix to this. Would you be able to validate the snapshot for me? Then I will try to get it released.

Just use the following configuration to consume the snapshot:

  <pluginRepositories>
    <pluginRepository>
      <id>oss-sonatype</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </pluginRepository>
  </pluginRepositories>

  <build>
    <plugins>
      <plugin>
        <groupId>com.github.searls</groupId>
        <artifactId>jasmine-maven-plugin</artifactId>
        <version>1.3.1.2-SNAPSHOT</version>
        <!-- your configuration here -->
      </plugin>
    </plugins>
  </build>

@patrick-a-cavanaugh
Copy link
Author

@klieber I added the snapshot to my POM and confirmed - I can run jasmine:test successfully now either with the FirefoxDriver or with the PhantomJSDriver - both work.

Thanks!

@klieber klieber deleted the topic/issue176 branch February 18, 2014 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants