Selenium error to launch firefox24 - java

I have this problem with selenium. I can't launch a test because this problem :
PHPUnit_Framework_Error :
Response from Selenium RC server for getNewBrowserSession(*firefox C:\Firefox24\firefox.exe, /).
Failed to start new browser session: org.openqa.selenium.server.RemoteCommandException: Error while launching browser.
Version :
λ java -version
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
selenium : selenium-server-standalone-2.47.1
I need help, thank you :)
Full error :
java -jar "C:\selenium\selenium-server-standalone-2.47.1.jar" -singleWindow -browserSessionReuse
15:02:46.717 INFO - Launching a standalone Selenium Server
15:02:47.363 INFO - Java: Oracle Corporation 25.51-b03
15:02:47.364 INFO - OS: Windows 7 6.1 amd64
15:02:47.372 INFO - v2.47.1, with Core v2.47.1. Built from revision 411b314
15:02:47.372 INFO - Will recycle browser sessions when possible.
15:02:47.428 INFO - Driver class not found: com.opera.core.systems.OperaDriver
15:02:47.428 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
15:02:47.610 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
15:02:47.611 INFO - Selenium Server is up and running
15:03:00.087 INFO - Command request: getNewBrowserSession[*firefox C:\Firefox24\firefox.exe, /] on session null
15:03:00.089 INFO - grabbing available session...
15:03:00.090 INFO - creating new remote session
15:03:00.147 INFO - Allocated session 8d5c66b5a2d841819be7fcb7202bc4d8 for /, launching...
15:03:00.149 ERROR - Failed to start new browser session, shutdown browser and clear all session data
java.lang.RuntimeException: java.net.MalformedURLException: no protocol: /
at org.openqa.selenium.net.Urls.toProtocolHostAndPort(Urls.java:47)
at org.openqa.selenium.server.browserlaunchers.LauncherUtils.getDefaultRemoteSessionUrl(LauncherUtils.java:133)
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launchRemoteSession(FirefoxChromeLauncher.java:320)
at org.openqa.selenium.server.browserlaunchers.FirefoxLauncher.launchRemoteSession(FirefoxLauncher.java:102)
at org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:400)
at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:144)
at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:105)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:818)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:435)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:405)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:151)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1526)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1479)
at org.openqa.jetty.http.HttpServer.service(HttpServer.java:920)
at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820)
at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986)
at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837)
at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243)
at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:358)
at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:537)
Caused by: java.net.MalformedURLException: no protocol: /
at java.net.URL.<init>(URL.java:586)
at java.net.URL.<init>(URL.java:483)
at java.net.URL.<init>(URL.java:432)
at org.openqa.selenium.net.Urls.toProtocolHostAndPort(Urls.java:37)
... 19 more

I've had this problem with newer versions of Firefox. Use Firefox 34.0.5 and it should work fine.

Related

soapui window disappears after few sec

I have installed SoapUI 5.5.0 in rhel 7.8 server and trying to open it via MobaXterm on windows 10 local desktop.
When i run soapui.sh, soapui window opens up and display below messages on server,
#./soapui.sh
================================
=
= SOAPUI_HOME = /opt/SoapUI-5.5.0
=
================================
Configuring log4j from [/opt/SoapUI-5.5.0/bin/soapui-log4j.xml]
16:52:38,534 INFO [DefaultSoapUICore] Creating new settings at [/root/soapui-settings.xml]
16:52:39,328 INFO [PluginManager] 0 plugins loaded in 2 ms
16:52:39,328 INFO [DefaultSoapUICore] All plugins loaded
Configuring log4j from [/opt/SoapUI-5.5.0/bin/soapui-log4j.xml]
16:52:39,556 INFO [DefaultSoapUICore] Creating new settings at [/root/soapui-settings.xml]
16:52:39,601 INFO [PluginManager] 0 plugins loaded in 11 ms
16:52:39,601 INFO [DefaultSoapUICore] All plugins loaded
16:52:39,844 INFO [SoapUI] Used java version: 1.8.0_221
It opens another window called as 'Stay Tuned!'. As soon as i click on 'Yes, I want to know' or 'skip' button it gives below error on linux server and soapui window disappears.
Exception in thread "Thread-12" sun.reflect.generics.reflectiveObjects.NotImplementedException
at com.smartbear.analytics.impl.SoapUIOSMixpanelProvider.trackError(SoapUIOSMixpanelProvider.java:53)
at com.smartbear.analytics.AnalyticsManager$1.run(AnalyticsManager.java:55)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
Prism-ES2 Error : GL_VERSION (major.minor) = 1.4
java.lang.UnsupportedOperationException: Internal Error
at com.sun.glass.ui.gtk.GtkApplication.lambda$new$5(GtkApplication.java:158)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.glass.ui.gtk.GtkApplication.<init>(GtkApplication.java:140)
at com.sun.glass.ui.gtk.GtkPlatformFactory.createApplication(GtkPlatformFactory.java:41)
at com.sun.glass.ui.Application.run(Application.java:146)
at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:278)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:211)
at javafx.embed.swing.JFXPanel.lambda$initFx$2(JFXPanel.java:232)
at java.lang.Thread.run(Thread.java:748)
Its a vm on vmware platform and have driver as below.
00:0f.0 VGA compatible controller: VMware SVGA II Adapter (prog-if 00 [VGA controller])
Subsystem: VMware SVGA II Adapter
Flags: bus master, medium devsel, latency 64, IRQ 16
I/O ports at 1070 [size=16]
Memory at e8000000 (32-bit, prefetchable) [size=128M]
Memory at fe000000 (32-bit, non-prefetchable) [size=8M]
[virtual] Expansion ROM at c0400000 [disabled] [size=32K]
Capabilities: [40] Vendor Specific Information: Len=00 <?>
Capabilities: [44] PCI Advanced Features
Kernel driver in use: vmwgfx
Kernel modules: vmwgfx
I have below libgl related packages installed on server.
# rpm -qa |grep -i libGL
libglvnd-1.0.1-0.8.git5baa1e5.el7.x86_64
libglvnd-opengl-1.0.1-0.8.git5baa1e5.el7.x86_64
mesa-libGL-18.3.4-10.el7.x86_64
mesa-libglapi-18.3.4-10.el7.x86_64
libglvnd-glx-1.0.1-0.8.git5baa1e5.el7.x86_64
libglvnd-egl-1.0.1-0.8.git5baa1e5.el7.x86_64
libglvnd-gles-1.0.1-0.8.git5baa1e5.el7.x86_64
libglvnd-core-devel-1.0.1-0.8.git5baa1e5.el7.x86_64
mesa-libGLU-devel-9.0.0-4.el7.x86_64
libglvnd-devel-1.0.1-0.8.git5baa1e5.el7.x86_64
mesa-libGL-devel-18.3.4-10.el7.x86_64
mesa-libGLU-9.0.0-4.el7.x86_64
Can you please let me know how to fix this issue?
Thanks,
The below line in /opt/SoapUI-5.5.0/bin/soapui.sh was uncommented to disable the browser component. After his, the SoapUI was no longer crashing as before.
#uncomment to disable browser component
JAVA_OPTS="$JAVA_OPTS -Dsoapui.browser.disabled=true"

Selenium RC: I am unable run test suite in firefox or any other browser

I am newbie with Selenium. I recently encountered with one failure that I could not overcome.
I am trying to run next suite in firefox or chrome:
C:\auto_tools>java -jar selenium-server-standalone-2.46.0.jar -htmlSuite "*googlechrome C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "http://google.com" "D:\Selenium_2.0\Selenium_tests\Selenium_IDE&Selenium Builder\Selenium_start\test_suit.html" "D:\Selenium_2.0\Selenium_tests\Selenium_IDE&Selenium Builder\Selenium_start\results.html"
As answer I am see chrome browser with:
http://google.com/selenium-server/core/TestRunner.html?auto=true&multiWindow=true&defaultLogLevel=info&baseUrl=http%3A%2F%2Fgoogle.com&resultsUrl=../postResults&test=http%3A%2F%2Fgoogle.com%2Fselenium-server%2Ftests%2Ftest_suit.html
and
23:02:46.698 INFO - Launching a standalone Selenium Server
23:02:46.825 INFO - Java: Oracle Corporation 25.45-b02 23:02:46.826
INFO - OS: Windows 7 6.1 amd64 23:02:46.838 INFO - v2.46.0, with Core
v2.46.0. Built from revision 87c69e2 23:02:46.897 INFO - Driver class
not found:com.opera.core.systems.OperaDriver 23:02:46.897 INFO -
Driver provider com.opera.core.systems.OperaDriver is not registered
23:02:47.096 INFO - Launching Google Chrome...
with *firefox path/to/firefox.exe - same issue...
Can anyone help please?
Yesterday I found out that the reason was that my antivirus blocked connection to localhost including port 4444 - thats why I could not run test suit.

Selenium RC doesn't run the test suite by BAT file

I've tried to run my test suite by Selenium RC through a BAT file.
Actually it worked OK until yesterday morning and it stopped to run my test suite.
Probably because I've added user-extensions.js and since that I can't run my test suite by the selenium RC.
How can I add this script to my test suite?
I'm using Selenium IDE for to write my test cases, so I guess that make this more complex problem..
This is the console log of the BAT file during the execution:
>
C:\automation>cd C:\automation\screenshots\
C:\automation\screenshots>del *.png
Could Not Find C:\automation\screenshots\*.png
10:46:38.926 INFO - Launching a standalone server
10:46:39.098 INFO - Java: Oracle Corporation 25.25-b02
10:46:39.098 INFO - OS: Windows 8.1 6.3 amd64
10:46:39.113 INFO - v2.44.0, with Core v2.44.0. Built from revision 76d78cf
10:46:39.238 INFO - RemoteWebDriver instances should connect to: http://127.0.0.
1:4444/wd/hub
10:46:39.238 INFO - Version Jetty/5.1.x
10:46:39.238 INFO - Started HttpContext[/selenium-server,/selenium-server]
10:46:39.379 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler#6e3c1e
69
10:46:39.379 INFO - Started HttpContext[/wd,/wd]
10:46:39.379 INFO - Started HttpContext[/selenium-server/driver,/selenium-server
/driver]
10:46:39.379 INFO - Started HttpContext[/,/]
10:46:39.379 INFO - Started SocketListener on 0.0.0.0:4444
10:46:39.379 INFO - Started org.openqa.jetty.jetty.Server#b1bc7ed
jar:file:/C:/automation/selenium-server-standalone-2.44.0.jar!/customProfileDirC
USTFFCHROME
10:46:39.535 INFO - Preparing Firefox profile...
10:46:42.666 INFO - Launching Firefox...
10:46:44.245 INFO - Checking Resource aliases
This is the code line from the BAT file:
java -jar C:\automation\selenium-server-standalone-2.44.0.jar -htmlSuite "*firefox C:\Program Files (x86)\Mozilla Firefox\firefox.exe" "https://www.mywebsite.com" "C:\automation\emailSanity.html" "C:\automation\testing_results.html" -port 4444
This is the screenshot of the actual result of the Selenium RC in action:
http://i57.tinypic.com/28u71jl.png
Please your help!
Thanks a lot.
Considering your app is at the splash screen, I can only assume that you forgot to put in your URL to initially open.
Since you are using RC, then your first statement of your test script should be:
selenium.open("http://example.com"); // where example.com is the app is your SUT.

java.net.BindException: Address already in use: bind - when stating tomcatx with jdk1.8 (not in debug mode)

While setting up an environment for a tomcat project I ran into the exception
java.net.BindException: Address already in use: bind
The message is clear: the port is already used by some other process. So to troubleshoot I ran the following command
netstat -aon | find "<port>"
which returned nothing and thus suggests that the port is free for use by a new process.
Here is my statup script for tomcat, note here the use of the jdk 1.8 as JAVA_HOME
#ECHO OFF
#SET JAVA_HOME=C:\Oracle\java\jdk1.8
#SET CATALINA_HOME=C:\<project>\apache-tomcat-8.0
#SET JAVA_OPTS=-Xmx512m -XX:MaxPermSize=128m
#CALL %CATALINA_HOME%\bin\catalina.bat run
At first I though it was an issue with tomcat8, so I have tryied with 7 and 6 too. Same issue.
After that, I stated to suspect the jdk, so I changed to 1.7
#SET JAVA_HOME=C:\Oracle\java\jdk1.7
and the problem was gone, with the same port numbers and the three tomcats.
So I checked my version of the jdk
Cmd-$> %JAVA_HOME%\bin\java.exe -version
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
and did an update (uninstall+install) to the latest version (at posting time)
Cmd-$> %JAVA_HOME%\bin\java.exe -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
So my questions are:
Am I mistaken somewhere and is there anything else I could check?
Is this a bug in the oracle's jdk 1.8, and if yes is there a workaound for this?
If there is any other informations I should provide, please comment.
EIDT
Running the sample code in the bug report referenced by #StephenC fails on the first time with jdk 1.8 and behaves as one would expect with my actual jdk version of 1.7.
Cmd-$> %JAVA_HOME%\bin\java.exe -version
java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
i.e. the first run is ok and the server responds correctly, the second fails with the expected BindExcxeption.
The 1.7 jdk which presumably reproduces the bug according to the bug report is
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)
Running Tomcat 7 from eclipse using the Sysdeo Eclipse Tomcat Launcher plugin gave no BindException, here are my setting for the plugin
I noticed though that the plugin runs javaw.exe not java.exe. I can't tell whether it makes a difference of not.
Note that the tomxcat is ran in debug mode (the checkbox Don't run Tomcat in debug mode is not checked). If not ran in debug mode the exception comes.
Also runnig tomcat from the script in debug mode using the jpda switch
#CALL %CATALINA_HOME%\bin\catalina.bat jpda run
seems to work around this issue.
UPDATE
Test on a 32 bit machine (+ 32 bit jdk and tomcat) were all successful with both jdk 1.8 and 1.7. Also the test class from the bug report behaves normally, i.e. BindException on second run.
UPDATE 2
The issue has survived a computer restart. Here is the output of the start process including the stacktrace, all other ports (AJP on 10009 and the server itself on 10005) are bound correctly:
Cmd-$> starttc.bat
Using CATALINA_BASE: "C:\<project>\apache-tomcat-8.0"
Using CATALINA_HOME: "C:\<project>\apache-tomcat-8.0"
Using CATALINA_TMPDIR: "C:\<project>\apache-tomcat-8.0\temp"
Using JRE_HOME: "C:\workspaces\Oracle\jdk1.8"
Using CLASSPATH: "C:\<project>\apache-tomcat-8.0\bin\bootstrap.jar;C:\<project>\apache-tomcat-8.0\bin\tomcat-juli.jar"
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
05-May-2014 09:16:08.043 INFO [main] org.apache.catalina.core.AprLifecycleListener.init The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\workspaces\Oracle\jdk1.8\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\workspaces\Oracle\jdk1.6\bin;C:\oracle\product\11.2.0\dbhome_1\bin;C:\workspaces\Databases\oracle\product\11.2.0\dbhome_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Window
s\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Novell\ZENworks\bin;C:\Program Files\SlikSvn\bin;C:\Program Files\TortoiseSVN\bin;C:\bin;C:\Program Files\SlikSvn\bin;C:\private\bin;C:\Oracle\jdk1.6\bin;C:\MinGW\bin;C:\Misc\c_c++\process builder;C:\Apache\apache-maven-3\bin;C:\tools\database\sqlite\bin;.
05-May-2014 09:16:08.374 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-10090"]
05-May-2014 09:16:08.399 SEVERE [main] org.apache.coyote.AbstractProtocol.init Failed to initialize end point associated with ProtocolHandler ["http-nio-10090"]
java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:414)
at sun.nio.ch.Net.bind(Net.java:406)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:351)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:683)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:456)
at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:120)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:960)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:567)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:826)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.startup.Catalina.load(Catalina.java:605)
at org.apache.catalina.startup.Catalina.load(Catalina.java:630)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484)
05-May-2014 09:16:08.402 SEVERE [main] org.apache.catalina.core.StandardService.initInternal Failed to initialize connector [Connector[HTTP/1.1-10090]]
org.apache.catalina.LifecycleException: Failed to initialize component [Connector[HTTP/1.1-10090]]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:567)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:826)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.startup.Catalina.load(Catalina.java:605)
at org.apache.catalina.startup.Catalina.load(Catalina.java:630)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484)
Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed
at org.apache.catalina.connector.Connector.initInternal(Connector.java:962)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
... 12 more
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:414)
at sun.nio.ch.Net.bind(Net.java:406)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:351)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:683)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:456)
at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:120)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:960)
... 13 more
05-May-2014 09:16:08.404 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-10009"]
05-May-2014 09:16:08.453 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
05-May-2014 09:16:08.456 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 797 ms
05-May-2014 09:16:08.484 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
05-May-2014 09:16:08.484 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.5
05-May-2014 09:16:08.494 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\<project>\apache-tomcat-8.0\webapps\docs
05-May-2014 09:16:08.951 INFO [localhost-startStop-1] org.apache.catalina.util.SessionIdGenerator.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [151] milliseconds.
05-May-2014 09:16:08.985 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\<project>\apache-tomcat-8.0\webapps\examples
05-May-2014 09:16:09.786 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\<project>\apache-tomcat-8.0\webapps\host-manager
05-May-2014 09:16:09.828 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\<project>\apache-tomcat-8.0\webapps\manager
05-May-2014 09:16:09.883 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\<project>\apache-tomcat-8.0\webapps\ROOT
05-May-2014 09:16:09.916 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-10009"]
05-May-2014 09:16:09.937 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 1489 ms
05-May-2014 09:17:30.430 INFO [Thread-5] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-10090"]
05-May-2014 09:17:30.431 INFO [Thread-5] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-10009"]
05-May-2014 09:17:30.498 INFO [Thread-5] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
05-May-2014 09:17:30.551 INFO [Thread-5] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-10009"]
05-May-2014 09:17:30.589 INFO [Thread-5] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-10090"]
05-May-2014 09:17:30.589 INFO [Thread-5] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-10090"]
05-May-2014 09:17:30.590 INFO [Thread-5] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-10009"]
I think you have been bitten by a Java 8 bug fix!
http://bugs.java.com/bugdatabase/view_bug.do?bug_id=7179799
Java on Linux and other (non-Windows) operating systems has always thrown an exception if you attempt to bind to a port that is already bound. For some reason, this was allowed in Java 6 and 7 on some Windows platforms. Oracle have deemed this to be a bug, and fixed it.
Presumably, you were running 3 instances of Tomcat all listening on the same port as a "poor man's" load balancer. You are going to need to find another, more reliable way to do this.
UPDATE
Just to make it clear, you should not attempt to run two Tomcat instances on the same port. Especially a production server and a test server.
If you do manage to get it "working", then it will be uncertain which instance will get requests sent to the IP/port. Some may go to the production server, and some to the test server. In short, your test server will interfere with your production server.
A much better idea is to configure your test Tomcat instance to listen on a different port and/or IP address to the production instance.
I have the impression that find does not work as expected. Try:
netstat -aon | findstr "80"
or just
netstat -aon
to make sure that port 80 is free
Tomcat uses more than one port. You're just assuming that port 80 is the problem. Have a look through server.xml and check all the ports mentioned. Your Tomcat may be running on port 8080 for example, or it may be the shutdown port, which is normally 8005, or the HTTPS port (443 or 8443), ...

How to run selenium using other browsers?

I've configured the Selenium 2.0 IDE in Firefox and I execute my Project using this IDE.
Execute the Project using IDE.
And i Play back the executed screens.
Saved those Test case in HTML and Java format. (For Java: I used Jnit/Webdriver)
Then i open the java file using eclipse to change for Chrome Driver
After that i append this code into that System.setProperty();
Then i executed the Chromewebdriver using Command Prompt java -Dwebdriver.chrome.driver=/path/to/chromedriver -jar selenium-server-standalone-2.7.0.jar
Then i got the error as
C:\Program Files\Java\jdk1.6.0\bin>java -Dwebdriver.chrome.driver=c:/Users/FSP/D
ownloads/chromedriver.exe -jar selenium-server-standalone-2.39.0.jar
Unable to access jarfile selenium-server-standalone-2.39.0.jar
C:\Program Files\Java\jdk1.6.0\bin>java -Dwebdriver.chrome.driver=c:/Users/FSP/D
ownloads/chromedriver.exe -jar c:/Users/FSP/Downloads/selenium-server-standalone
-2.39.0.jar
Feb 22, 2014 6:48:37 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
18:48:39.395 INFO - Java: Sun Microsystems Inc. 1.6.0-b105
18:48:39.405 INFO - OS: Windows Vista 6.1 x86
18:48:39.618 INFO - v2.39.0, with Core v2.39.0. Built from revision ff23eac
18:48:40.440 INFO - Default driver org.openqa.selenium.iphone.IPhoneDriver regis
tration is skipped: registration capabilities Capabilities [{platform=MAC, brows
erName=iPhone, version=}] does not match with current platform: VISTA
18:48:40.500 INFO - Default driver org.openqa.selenium.iphone.IPhoneDriver regis
tration is skipped: registration capabilities Capabilities [{platform=MAC, brows
erName=iPad, version=}] does not match with current platform: VISTA
18:48:41.089 INFO - RemoteWebDriver instances should connect to:
18:48:41.091 INFO - Version Jetty/5.1.x
18:48:41.122 INFO - Started HttpContext[/selenium-server/driver,/selenium-server
/driver]
18:48:41.124 INFO - Started HttpContext[/selenium-server,/selenium-server]
18:48:41.125 INFO - Started HttpContext[/,/]
18:48:41.772 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler#1db4f6
f
18:48:41.772 INFO - Started HttpContext[/wd,/wd]
18:48:41.799 WARN - Failed to start: SocketListener0#0.0.0.0:4444
Exception in thread "main" org.openqa.jetty.util.MultiException[java.net.SocketE
xception: Unrecognized Windows Sockets error: 0: JVM_Bind]
at org.openqa.jetty.http.HttpServer.doStart(HttpServer.java:696)
at org.openqa.jetty.util.Container.start(Container.java:72)
at org.openqa.selenium.server.SeleniumServer.start(SeleniumServer.java:4
88)
at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:30
0)
at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:24
5)
at org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:96)
java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at org.openqa.jetty.util.ThreadedServe`enter code here`r.newServerSocket(ThreadedServer.j
ava:392)
at org.openqa.jetty.util.ThreadedServer.open(ThreadedServer.java:478)
at org.openqa.jetty.util.ThreadedServer.start(ThreadedServer.java:504)
at org.openqa.jetty.http.SocketListener.start(SocketListener.java:202)
at org.openqa.jetty.http.HttpServer.doStart(HttpServer.java:726)
at org.openqa.jetty.util.Container.start(Container.java:72)
at org.openqa.selenium.server.SeleniumServer.start(SeleniumServer.java:4
88)
at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:30
0)
at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:24
5)
at org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:96)
C:\Program Files\Java\jdk1.6.0\bin>
How to solve this? So please try to configure and run the script through other browsers using webdriver concept.
It might be classpath issue....
Download the latest version of selenium, say 2.39.0 from the seleniumHQ.org site.
Place it in C:\ drive. Goto the environment variables and add java -jar selenium-server-standalone-2.39.0.jar to the classpath

Categories

Resources