So I finally broke down and did something intelligent - I downloaded the source and ran ant. The unit tests all passed, but the integration tests all failed.
integration-test-windows:
[echo] Integration Tests for Embedded Web Container
[junit] Running com.thoughtworks.selenium.embedded.jetty.RealDealIntegrationTest
[junit] Tests run: 2, Failures: 0, Errors: 2, Time elapsed: 76.234 sec
[junit] Test com.thoughtworks.selenium.embedded.jetty.RealDealIntegrationTest FAILED
[echo] Integration Tests for Outbedded Web Container, including those that require Tomcat installed and CATALINA_HOME set.
[junit] Running com.thoughtworks.selenium.outbedded.OutbeddedTomcatIntegrationTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 38.75 sec
[junit] TEST com.thoughtworks.selenium.outbedded.EmbeddedJettyIntegrationTest FAILED
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 63.234 sec
[junit] TEST com.thoughtworks.selenium.outbedded.OutbeddedTomcatIntegrationTest FAILED
[junit] Tests FAILED
System.err for the embedded jetty integration test:
[echo] Integration Tests for Embedded Web Container
[junit] Running com.thoughtworks.selenium.embedded.jetty.RealDealIntegrationTest
[junit] Tests run: 2, Failures: 0, Errors: 2, Time elapsed: 76.234 sec
[junit] Test com.thoughtworks.selenium.embedded.jetty.RealDealIntegrationTest FAILED
[echo] Integration Tests for Outbedded Web Container, including those that require Tomcat installed and CATALINA_HOME set.
[junit] Running com.thoughtworks.selenium.outbedded.OutbeddedTomcatIntegrationTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 38.75 sec
[junit] TEST com.thoughtworks.selenium.outbedded.EmbeddedJettyIntegrationTest FAILED
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 63.234 sec
[junit] TEST com.thoughtworks.selenium.outbedded.OutbeddedTomcatIntegrationTest FAILED
[junit] Tests FAILED
System.err for the embedded jetty integration test:
23:42:32.259 EVENT Starting Jetty/4.2.9
23:42:32.290 EVENT Started [EMAIL PROTECTED]
23:42: 32.305 EVENT Checking Resource aliases
23:42:32.399 EVENT Started WebApplicationContext[/selenium-driver,C:\lib\selenium-0.5.0-java-src\java\..\_javascript_]
23:42:32.446 EVENT jsp: init
23:42:32.462 EVENT Internal Error: File /WEB-INF/web.xml not found
23:42:32.524 EVENT default: init
23:42:32.524 EVENT invoker: init
23:42:32.540 EVENT Started WebApplicationContext[/,C:\lib\selenium-0.5.0-java-src\java\..\_javascript_\tests\html]
23:42:32.540 EVENT jsp: init
23:42:32.555 EVENT Internal Error: File /WEB-INF/web.xml not found
23:42:32.555 EVENT default: init
23:42:32.555 EVENT invoker: init
23:42:32.649 EVENT Started WebApplicationContext[/selenium-driver/driver,Selenese Servlet]
23:42:32.649 EVENT jsp: init
23:42:32.727 EVENT default: init
23:42:32.727 EVENT invoker: init
23:42:32.743 EVENT Started SocketListener on 127.0.0.1:8080
23:42:32.743 EVENT Started [EMAIL PROTECTED]
23:42:32.977 EVENT SeleneseServletSpike: init
23:43:08.477 WARN!! Exception for /selenium-driver/driver?commandRequest=%7Copen%7C%2Ftest_click_page1.html%7C%7C
com.thoughtworks.selenium.SeleniumCommandTimedOutException
at com.thoughtworks.selenium.SingleEntryAsyncQueue.get(SingleEntryAsyncQueue.java:37)
at com.thoughtworks.selenium.SeleneseQueue.doCommand(SeleneseQueue.java :32)
at com.thoughtworks.selenium.outbedded.CommandBridge.serviceServletConnectorCommandRequest(CommandBridge.java:64)
at com.thoughtworks.selenium.outbedded.CommandBridge.service(CommandBridge.java:52)
at javax.servlet.http.HttpServlet.service (HttpServlet.java:853)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
at org.mortbay.jetty.servlet.ServletHandler.handle (ServletHandler.java:558)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507)
at org.mortbay.http.HttpContext.handle (HttpContext.java:1664)
at org.mortbay.http.HttpServer.service(HttpServer.java:863)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:775)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java :939)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java :289)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)
23:42:32.290 EVENT Started [EMAIL PROTECTED]
23:42: 32.305 EVENT Checking Resource aliases
23:42:32.399 EVENT Started WebApplicationContext[/selenium-driver,C:\lib\selenium-0.5.0-java-src\java\..\_javascript_]
23:42:32.446 EVENT jsp: init
23:42:32.462 EVENT Internal Error: File /WEB-INF/web.xml not found
23:42:32.524 EVENT default: init
23:42:32.524 EVENT invoker: init
23:42:32.540 EVENT Started WebApplicationContext[/,C:\lib\selenium-0.5.0-java-src\java\..\_javascript_\tests\html]
23:42:32.540 EVENT jsp: init
23:42:32.555 EVENT Internal Error: File /WEB-INF/web.xml not found
23:42:32.555 EVENT default: init
23:42:32.555 EVENT invoker: init
23:42:32.649 EVENT Started WebApplicationContext[/selenium-driver/driver,Selenese Servlet]
23:42:32.649 EVENT jsp: init
23:42:32.727 EVENT default: init
23:42:32.727 EVENT invoker: init
23:42:32.743 EVENT Started SocketListener on 127.0.0.1:8080
23:42:32.743 EVENT Started [EMAIL PROTECTED]
23:42:32.977 EVENT SeleneseServletSpike: init
23:43:08.477 WARN!! Exception for /selenium-driver/driver?commandRequest=%7Copen%7C%2Ftest_click_page1.html%7C%7C
com.thoughtworks.selenium.SeleniumCommandTimedOutException
at com.thoughtworks.selenium.SingleEntryAsyncQueue.get(SingleEntryAsyncQueue.java:37)
at com.thoughtworks.selenium.SeleneseQueue.doCommand(SeleneseQueue.java :32)
at com.thoughtworks.selenium.outbedded.CommandBridge.serviceServletConnectorCommandRequest(CommandBridge.java:64)
at com.thoughtworks.selenium.outbedded.CommandBridge.service(CommandBridge.java:52)
at javax.servlet.http.HttpServlet.service (HttpServlet.java:853)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
at org.mortbay.jetty.servlet.ServletHandler.handle (ServletHandler.java:558)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507)
at org.mortbay.http.HttpContext.handle (HttpContext.java:1664)
at org.mortbay.http.HttpServer.service(HttpServer.java:863)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:775)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java :939)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java :289)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)
And some of my system properties (I also tried it on java 1.4 with the same results):
| java.awt.graphicsenv | sun.awt.Win32GraphicsEnvironment |
| java.awt.printerjob | sun.awt.windows.WPrinterJob |
| java.class.path | C:\lib\selenium- 0.5.0-java-src\java\lib\ant-1.5.4.jar;C:\lib\selenium-0.5.0-java-src\java\lib\cargo-0.4.jar;C:\lib\selenium-0.5.0-java-src\java\lib\commons-logging-1.0.3.jar;C:\lib\selenium-0.5.0-java-src\java\lib\jacob.dll;C:\lib\selenium- 0.5.0-java-src\java\lib\jacob.jar;C:\lib\selenium-0.5.0-java-src\java\lib\jasper-compiler-4.0.4.jar;C:\lib\selenium-0.5.0-java-src\java\lib\jasper-runtime-4.0.4.jar;C:\lib\selenium-0.5.0-java-src\java\lib\jetty-4.2.9.jar;C:\lib\selenium- 0.5.0-java-src\java\lib\jmock-1.0.1.jar;C:\lib\selenium-0.5.0-java-src\java\lib\junit-3.8.1.jar;C:\lib\selenium-0.5.0-java-src\java\lib\log4j-1.2.8.jar;C:\lib\selenium-0.5.0-java-src\java\lib\report\bcel-5.1.jar;C:\lib\selenium- 0.5.0-java-src\java\lib\report\checkstyle-all-3.5.jar;C:\lib\selenium-0.5.0-java-src\java\lib\report\jakarta-oro-2.0.7.jar;C:\lib\selenium-0.5.0-java-src\java\lib\report\jamaica-tools-1.jar;C:\lib\selenium-0.5.0-java-src\java\lib\report\java-getopt-1.0.9.jar ;C:\lib\selenium-0.5.0-java-src\java\lib\report\jcoverage.jar;C:\lib\selenium-0.5.0-java-src\java\lib\report\log4j-1.2.8.jar;C:\lib\selenium-0.5.0-java-src\java\lib\report\simian-2_1_3.jar;C:\lib\selenium-0.5.0-java-src\java\lib\servletapi-2.3.jar ;C:\lib\selenium-0.5.0-java-src\java\target\instrumented-classes;C:\lib\selenium-0.5.0-java-src\java\target\test-classes;C:\lib\selenium-0.5.0-java-src\java\target\integration-test-classes;C:\apache-ant-1.6.2\lib;C:\apache- ant-1.6.2\lib\junit.jar;C:\apache-ant-1.6.2\lib\ant-launcher.jar;C:\apache-ant-1.6.2\lib\ant.jar;C:\apache-ant-1.6.2\lib\ant-junit.jar |
| java.class.version | 49 |
| java.endorsed.dirs | C:\Program Files\Java\jdk1.5.0_01\jre\lib\endorsed |
| java.ext.dirs | C:\Program Files\Java\jdk1.5.0_01\jre\lib\ext |
| java.home | C:\Program Files\Java\jdk1.5.0_01\jre |
| java.io.tmpdir | C:\DOCUME~1\rex\LOCALS~1\Temp\ |
| java.library.path | C:\Program Files\Java\jdk1.5.0_01\jre\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Mail Enable\BIN;c:\cygwin\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\UPS\Common\SuppAsst\lib;C:\Program Files\Symantec\pcAnywhere;C:\apache- ant-1.6.2\bin;C:\j2sdk1.4.0_03\bin;c:\mysql\bin;C:\lib\jikes-1.18\bin;c:\code\devtools;C:\lib\maven-1.0-beta-6\bin;C:\Program Files\Symantec\pcAnywhere\;;;;;C:\Program Files\cvsnt;C:\Program Files\Subversion\bin;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\; |
| java.runtime.name | Java(TM) 2 Runtime Environment, Standard Edition |
| java.runtime.version | 1.5.0_01-b08 |
| java.specification.name | Java Platform API Specification |
| java.specification.vendor | Sun Microsystems Inc. |
| java.specification.version | 1.5 |
| java.vendor | Sun Microsystems Inc. |
| java.vendor.url | http://java.sun.com/ |
| java.vendor.url.bug | http://java.sun.com/cgi-bin/bugreport.cgi |
| java.version | 1.5.0_01 |
| java.vm.info | mixed mode |
| java.vm.name | Java HotSpot(TM) Client VM |
| java.vm.specification.name | Java Virtual Machine Specification |
| java.vm.specification.vendor | Sun Microsystems Inc. |
| java.vm.specification.version | 1 |
| java.vm.vendor | Sun Microsystems Inc. |
| java.vm.version | 1.5.0_01-b08 |
| jcoverage.reports.dir | C:\lib\selenium- 0.5.0-java-src\java\target\reports\jcoverage |
| lib.dir | C:\lib\selenium- 0.5.0-java-src\java\lib |
| line.separator | |
| main.dir | C:\lib\selenium- 0.5.0-java-src\java\main |
| os.arch | x86 |
| os.name | Windows XP |
| os.version | 5.1 |
On 6/28/05, Rex Madden <[EMAIL PROTECTED]> wrote:
Hi,I'm trying to run Selenium using the java driven api using jetty 5.1.4. Here's my code, which I lifted from http://www.paulhammant.com/ (it's more helpful that the driven docs).public void run(){String codeRoot = "c:/cyrusinnovation/dev/myWebapp";Selenium selenium = new DefaultSelenium(new JettyCommandProcessor(new File(codeRoot), DefaultSelenium.DEFAULT_SELENIUM_CONTEXT,
new DirectoryStaticContentHandler(new File(codeRoot, "selenium"))),
new SystemDefaultBrowserLauncher());
selenium.start();
selenium.open("/");
selenium.verifyTextPresent("Hello world");}Unfortunately, I end up with this stack trace on the open command (after about 25 seconds, of course). The weird part is, the browser opens with the http://localhost:8080/selenium-driver/SeleneseRunner.html, and I see my page get opened. But I guess that the driven code is not getting a response from Jetty?com.thoughtworks.selenium.SeleniumCommandTimedOutException
at com.thoughtworks.selenium.SingleEntryAsyncQueue.get(SingleEntryAsyncQueue.java:37)
at com.thoughtworks.selenium.SeleneseQueue.doCommand (SeleneseQueue.java:32)
at com.thoughtworks.selenium.embedded.jetty.SeleneseJettyResourceHandler.doCommand(SeleneseJettyResourceHandler.java:45)
at com.thoughtworks.selenium.embedded.jetty.JettyCommandProcessor.doCommand (JettyCommandProcessor.java:97)
at com.thoughtworks.selenium.DefaultSelenium.open(DefaultSelenium.java:55)
So then I rolled back to the version of Jetty that came with the selenium dist (jetty 4.2.9)Now when I run it, I get a problem with Commons Logging (1.0.4). I'm guessing my log4j is getting loaded by my test codes classloader and jetty's classloader. Has anyone else run into that?java.lang.ExceptionInInitializerError at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at java.lang.Class.newInstance0(Class.java:350) at java.lang.Class.newInstance(Class.java:303) at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:176) at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:215) at org.mortbay.jetty.servlet.ServletHandler.initializeServlets (ServletHandler.java:436) at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplicationHandler.java:150) at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext.java:442) at org.mortbay.http.HttpServer.start (HttpServer.java:647) at com.thoughtworks.selenium.embedded.jetty.JettyCommandProcessor.start(JettyCommandProcessor.java:102) at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:287) at com.pureform.moover.fit.block.BlockEditorFixture.startTomcat (BlockEditorFixture.java:57) 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:585) at fit.MethodTarget.invoke(MethodTarget.java:95) at fit.MethodTarget.invoke(MethodTarget.java:106) at fit.MethodTarget.invokeAndWrap (MethodTarget.java:231) at fit.DoFixture.interpretCells(DoFixture.java:244) at fit.FlowFixture.interpretTable(FlowFixture.java:35) at fit.FlowFixture.interpretTables(FlowFixture.java:24) at fit.Fixture.doTables(Fixture.java :58) at fit.runner.HtmlRunner.runTable(HtmlRunner.java:59) at fit.runner.HtmlRunner.runInSuite(HtmlRunner.java:39) at fit.runner.FolderRunner.runFile(FolderRunner.java:161) at fit.runner.FolderRunner.runDiry(FolderRunner.java :136) at fit.runner.FolderRunner.runDiry(FolderRunner.java:132) at fit.runner.FolderRunner.runDiry(FolderRunner.java:132) at fit.runner.FolderRunner.run(FolderRunner.java:104) at fit.runner.FolderRunner.run(FolderRunner.java :205) at fit.runner.FolderRunner.main(FolderRunner.java:49) Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException : Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of ' org.apache.commons.logging.Log' visible, which is not allowed.) (Caused by org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of ' org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log ' visible, which is not allowed.)) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance (LogFactoryImpl.java:209) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351) at org.apache.jasper.servlet.JspServlet.(JspServlet.java:57) ... 35 more Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.) at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529) ... 39 more Caused by: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:385) ... 40 more
--
Rex Madden
Director of Technology
Cyrus Innovation
IT Consulting and Agile Software Development
New York City, New York
http://www.cyrusinnovation.com
[EMAIL PROTECTED]
--
Rex Madden
Director of Technology
Cyrus Innovation
IT Consulting and Agile Software Development
New York City, New York
http://www.cyrusinnovation.com
[EMAIL PROTECTED]
_______________________________________________ Selenium-users mailing list [EMAIL PROTECTED] http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users
