Let me paste the CODE and console log here:
CODE:
File file = new File("D:/programfiles");
ServerArguments serverArguments = new ServerArguments();
serverArguments.setArgument("--address","127.0.0.1");
serverArguments.setArgument("--chromedriver-port", 9516);
serverArguments.setArgument("--bootstrap-port", 4725);
serverArguments.setArgument("--no-reset", true);
serverArguments.setArgument("--local-timezone", true);
AppiumServer appiumServer = new AppiumServer(file, serverArguments);
appiumServer.stopServer();
Thread.sleep(5000);
appiumServer.startServer();
System.out.println("Appium server is started");
System.out.println("Android Desired Capabilities Setup is loading...");
DesiredCapabilities androidCapabilities = new DesiredCapabilities();
androidCapabilities.setCapability("avd","AutoInsurance");
androidCapabilities.setCapability(MobileCapabilityType.DEVICE_NAME,ExcelUtils.readExcel(fileDefPath,metadataFileName,Constants.executionSheet,7,2));
androidCapabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION,ExcelUtils.readExcel(fileDefPath,metadataFileName,Constants.executionSheet,8,2));
androidCapabilities.setCapability(MobileCapabilityType.PLATFORM_NAME,ExcelUtils.readExcel(fileDefPath,metadataFileName,Constants.executionSheet,9,2));
androidCapabilities.setCapability(MobileCapabilityType.APP,ExcelUtils.readExcel(fileDefPath,metadataFileName,Constants.executionSheet,10,2));
driver = new AndroidDriver(new URL(ExcelUtils.readExcel(fileDefPath,metadataFileName,Constants.executionSheet,11,2)), androidCapabilities);
System.out.println("Appium SetUp for Android is successful and Appium Driver is launched successfully");
CONSOLE LOG:
ERROR: The process “node.exe” not found.
Appium server is starting
Aug 13, 2015 1:34:59 PM com.github.genium_framework.appium.support.server.AppiumServer startServer
INFO: Server is starting…
Aug 13, 2015 1:35:00 PM com.github.genium_framework.appium.support.server.AppiumServer startServer
INFO: Server has not started yet. Trying again in one second…
Aug 13, 2015 1:35:01 PM com.github.genium_framework.appium.support.server.AppiumServer startServer
INFO: Server has not started yet. Trying again in one second…
Aug 13, 2015 1:35:02 PM com.github.genium_framework.appium.support.server.AppiumServer startServer
INFO: Server has not started yet. Trying again in one second…
Aug 13, 2015 1:35:03 PM com.github.genium_framework.appium.support.server.AppiumServer startServer
INFO: Server has not started yet. Trying again in one second…
Aug 13, 2015 1:35:04 PM com.github.genium_framework.appium.support.server.AppiumServer startServer
INFO: Server has not started yet. Trying again in one second…
Aug 13, 2015 1:35:05 PM com.github.genium_framework.appium.support.server.AppiumServer startServer
INFO: Server has not started yet. Trying again in one second…
Aug 13, 2015 1:35:06 PM com.github.genium_framework.appium.support.server.AppiumServer startServer
INFO: Server has not started yet. Trying again in one second…
Aug 13, 2015 1:35:07 PM com.github.genium_framework.appium.support.server.AppiumServer startServer
INFO: Server has not started yet. Trying again in one second…
Aug 13, 2015 1:35:08 PM com.github.genium_framework.appium.support.server.AppiumServer startServer
INFO: Server has not started yet. Trying again in one second…
Aug 13, 2015 1:35:10 PM com.github.genium_framework.appium.support.server.AppiumServer startServer
INFO: Server has not started yet. Trying again in one second…
Aug 13, 2015 1:35:11 PM com.github.genium_framework.appium.support.server.AppiumServer startServer
INFO: Server has not started yet. Trying again in one second…
Aug 13, 2015 1:35:12 PM com.github.genium_framework.appium.support.server.AppiumServer startServer
INFO: Server has not started yet. Trying again in one second…
Aug 13, 2015 1:35:13 PM com.github.genium_framework.appium.support.server.AppiumServer startServer
INFO: Server has not started yet. Trying again in one second…
Aug 13, 2015 1:35:14 PM com.github.genium_framework.appium.support.server.AppiumServer startServer
INFO: Server has not started yet. Trying again in one second…
Aug 13, 2015 1:35:15 PM com.github.genium_framework.appium.support.server.AppiumServer startServer
INFO: Server has not started yet. Trying again in one second…
Aug 13, 2015 1:35:16 PM com.github.genium_framework.appium.support.server.AppiumServer startServer
INFO: Server has not started yet. Trying again in one second…
Aug 13, 2015 1:35:17 PM com.github.genium_framework.appium.support.server.AppiumServer startServer
INFO: Server has not started yet. Trying again in one second…
Aug 13, 2015 1:35:18 PM com.github.genium_framework.appium.support.server.AppiumServer startServer
INFO: Server has not started yet. Trying again in one second…
Aug 13, 2015 1:35:20 PM com.github.genium_framework.appium.support.server.AppiumServer startServer
INFO: Server has not started yet. Trying again in one second…
Aug 13, 2015 1:35:21 PM com.github.genium_framework.appium.support.server.AppiumServer startServer
INFO: Server has not started yet. Trying again in one second…
Aug 13, 2015 1:35:22 PM com.github.genium_framework.appium.support.server.AppiumServer startServer
INFO: Server has not started yet. Trying again in one second…
Aug 13, 2015 1:35:23 PM com.github.genium_framework.appium.support.server.AppiumServer startServer
INFO: Server has not started yet. Trying again in one second…
Appium server is started
Appium settings completed and ready to launch!
Android Desired Capabilities Setup is loading…
log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See Apache log4j 1.2 - Frequently Asked Technical Questions for more info.
Exception in thread “main” org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: ‘2.46.0’, revision: ‘87c69e2’, time: ‘2015-06-04 16:17:10’
System info: host: ‘IMPC1388’, ip: ‘172.16.11.2’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.7.0_51’
Driver info: driver.version: AndroidDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:27)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:242)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:128)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:155)
at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:22)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:202)
at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:50)
at appium.AppiumConfiguration.appiumstartup(AppiumConfiguration.java:89)
at executionEngine.DriverScript.main(DriverScript.java:39)
Caused by: org.apache.http.conn.HttpHostConnectException: Connect to 127.0.0.1:4725 [/127.0.0.1] failed: Connection refused: connect
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:151)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:143)
at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:89)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:134)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:578)
… 11 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:74)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134)
… 24 more