Maven Test does not open Chrome browser with Selenium Webdriver - google-chrome

I have created a Maven Project with TestNG for selenium webdriver (Chrome Browser). I run a basic test with TestNG and Chrome browser is successfully opened. Buf if I run the same test with "Maven Test" command and I get an error message.
Could you please help? I have tried many solutions like suggested by Stack Overflow but still unsuccessful :(
I run "Maven Test" for a basic test "Hello World" and the build is successful >>> Evidence that "Maven Test" creates a successful build
I run TestNG test with the command to open Chrome Browser and it works >>> evidence that TestNG works successfully
I run "Maven Test" with the command to open Chrome Browser and it does NOT work >>> getting frustrated with this, tried all solutions appeared in StackOverflow but unsuccesful
I have created testng.xml file
I have used different versions for Selenium-Java and Selenium-Server dependencies as well as for Chromedriver and SureFire plugin but the problem is still there, now I am using the latest for all of them (see POM file below for more details).
I have uninstalled and reinstalled Google Chrome and now I have latest version 73
I have no firewall on my machine
POM file appears below
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>MavenProject</groupId>
<artifactId>MavenProject</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>3.141.59</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
</plugins>
</build>
</project>
testng.xml file appears below:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite">
<test thread-count="5" name="Test">
<classes>
<class name="MavenPackage.NewTest"/>
</classes>
</test> <!-- Test -->
My code is below:
public class NewTest {
WebDriver driver;
#Test
public void MyFunction() {
try {
System.setProperty("webdriver.chrome.driver", "C:\\Selenium\\chromedriver\\chromedriver.exe");
driver = new ChromeDriver();
driver.manage().deleteAllCookies();
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.manage().timeouts().pageLoadTimeout(30, TimeUnit.SECONDS);
driver.get("http://www.ebay.com");
Thread.sleep(3000);
driver.quit();
System.out.println("Test passed");
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
Error message
Starting ChromeDriver 73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72) on port 49053
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 23.798 s <<< FAILURE! - in TestSuite
[ERROR] MyFunction(MavenPackage.NewTest) Time elapsed: 21.874 s <<< FAILURE!
org.openqa.selenium.WebDriverException:
Timed out waiting for driver server to start.
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'DESKTOP-DV883K3', ip: '192.168.1.109', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_201'
Driver info: driver.version: ChromeDriver
at MavenPackage.NewTest.MyFunction(NewTest.java:20)
Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:49053/status] to be available after 20008 ms
at MavenPackage.NewTest.MyFunction(NewTest.java:20)
Caused by: java.util.concurrent.TimeoutException
at MavenPackage.NewTest.MyFunction(NewTest.java:20)
[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] NewTest.MyFunction:20 » WebDriver Timed out waiting for driver server to start...
[INFO]
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 28.467 s
[INFO] Finished at: 2019-03-30T23:32:42Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M3:test (default-test) on project MavenProject: There are test failures.

Welcome to SO.
org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
This indicates that ChromeDriver is unable to initiate new chrome browser session.
Please update your java to latest version (as per message we can see the you are running java.version: '1.8.0_201' which is older,consider updating to latest java version 11.0)
The possible reasons:
older chrome driver (consider update to the latest chromedriver https://chromedriver.storage.googleapis.com/index.html?path=73.0.3683.68/)
Chrome browser version mismatch (check the browser version and chromedriver compatibility at https://sites.google.com/a/chromium.org/chromedriver/downloads/version-selection)
Consider executing a single #Test directly to make sure the environment is good, then use the testng.xml for further executions.

Related

org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process Test mechanism null

When i am executing the tests through git bash i am getting build failure even after all tests are passing with the following error:
Git bash command - mvn clean install -B -Pdev -Dcucumber.options=-m -Dtest=EndToEndTestSuite
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project acceptance-test: There are test failures.
Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
There was an error in the forked process
Test mechanism :: null
org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
Test mechanism :: null
at org.apache.maven.plugin.surefire
.booterclient.ForkStarter.fork(ForkStarter.java:656)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:282)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1183)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1011)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:857)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
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:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
My surefire configurations in the pom.xml looks like this
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version>
<configuration>
<parallel>classes</parallel>
<threadCount>2</threadCount>
<useSystemClassLoader>false</useSystemClassLoader>
</configuration>
</plugin>
Also, i am using junit version - 4.12
My intent here is to run tests parallelly so as to reduce build time.

Primefaces 5.1 and Wildfly does not deploy

I'm migrating my Glassfish app to Wildfly and there seems to be a compatibility error with Primefaces 5.1 JSF and Wildfly's bundled version. When I go to deploy, I get the following error:
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.VerifyError: (class: org/primefaces/component/api/UIData, method: getDataModel signature: )Ljavax/faces/model/DataModel;) Incompatible argument to function
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:219)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:87)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:72)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
... 3 more
Has anyone else gotten this error? Any help is greatly appreciated.
The real answer was the JSF API/Impl wasn't included as a dependency in the jboss-deployment-structure. This caused all sorts of linkage errors. Once I added the following to my deployment/subdeployments in the file, the application bootstrapped.
<dependencies>
<module name="javax.faces.api" />
<module name="com.sun.jsf-impl" />
</dependencies>

Junit test cases running some test cases parallel and some sequentially [duplicate]

I'm using JUnit 4.4 and Maven and I have a large number of long-running integration tests.
When it comes to parallelizing test suites there are a few solutions that allow me to run each test method in a single test-class in parallel. But all of these require that I change the tests in one way or another.
I really think it would be a much cleaner solution to run X different test classes in X threads in parallel. I have hundreds of tests so I don't really care about threading individual test-classes.
Is there any way to do this?
Use maven plugin:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7.1</version>
<configuration>
<parallel>classes</parallel>
<threadCount>5</threadCount>
</configuration>
</plugin>
</plugins>
</build>
From junit 4.7 it's now possible to run tests in parallel without using TestNG. Actually it has been possible since 4.6, but there are a number of fixes being made in 4.7 that will make it a viable option. You may also run parallel tests with spring, which you can read about here
Inspired by JUnit's experimental ParallelComputer runner I've built my own ParallelSuite and ParallelParameterized runners. Using these runners one can easily parallelize test suites and parameterized tests.
ParallelSuite.java
public class ParallelSuite extends Suite {
public ParallelSuite(Class<?> klass, RunnerBuilder builder) throws InitializationError {
super(klass, builder);
setScheduler(new RunnerScheduler() {
private final ExecutorService service = Executors.newFixedThreadPool(4);
public void schedule(Runnable childStatement) {
service.submit(childStatement);
}
public void finished() {
try {
service.shutdown();
service.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS);
} catch (InterruptedException e) {
e.printStackTrace(System.err);
}
}
});
}
}
ParallelParameterized.java
public class ParallelParameterized extends Parameterized {
public ParallelParameterized(Class<?> arg0) throws Throwable {
super(arg0);
setScheduler(new RunnerScheduler() {
private final ExecutorService service = Executors.newFixedThreadPool(8);
public void schedule(Runnable childStatement) {
service.submit(childStatement);
}
public void finished() {
try {
service.shutdown();
service.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS);
} catch (InterruptedException e) {
e.printStackTrace(System.err);
}
}
});
}
}
Usage is simple. Just change #RunWith annotations value to one of these Parallel* classes.
#RunWith(ParallelSuite.class)
#SuiteClasses({ATest.class, BTest.class, CTest.class})
public class ABCSuite {}
tempus-fugit offers something similar, check the docs for details. It relies on JUnit 4.7 and you just mark your test to #RunWith(ConcurrentTestRunner).
Cheers
You can check out the open source library - Test Load Balancer. It does exactly what you ask for - run different test classes in parallel. This integrates at the ant-junit level so that you do not have to change your tests in anyway. I am one of the authors of the library.
Also, think about not running them in threads as you may need a process level sandbox. For example, if you are hitting a DB in your integration tests, you do not want one test to fail because another test added some data in a different thread. Most of the times, tests are not written with this in mind.
Finally, how have solved this problem till now?
You can run the tests in parallel using ParallelComputer provided by Junit itself. Here's a small snippet to get you started.
Class[] cls = { TestCase1.class, TestCase2.class };
Result result = JUnitCore.runClasses(ParallelComputer.classes(), cls);
List<Failure> failures = result.getFailures();
This will help when you need to run tests from code as it has no dependencies on Maven or any other build management tools.
Please note that, this will run all test cases in parallel, if you have any dependencies between different test cases it might result in false positives. You SHOULD NOT have interdependent tests anyway.
TestNG can do that (this was my first reflex - then I saw you're already having a lot of testcases).
For JUnit, look at parallel-junit.
Another choice: Punner, a new parallel junit runner and maven plugin. You don't have to change your code, copy it to your pom.xml:
<!-- Disable default surefire based testing -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>com.github.marks-yag</groupId>
<artifactId>punner-maven-plugin</artifactId>
<version>${version}</version>
<configuration>
</configuration>
<executions>
<execution>
<id>test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
Punner can run test methods in parallel, can keep test outputs separately and clean.
Punner will reduce your mvn console outputs, like this:
[INFO] --- punner-maven-plugin:0.9.13:test (test) # ipc ---
[INFO] Punner report directory: /Users/guile/workspace/ipc/target/punner-reports
[INFO]
[INFO] com.github.yag.ipc.IPCTest.testConnectionHandler.............. PASSED
[INFO] com.github.yag.ipc.IPCTest.testSequence....................... PASSED
[INFO] com.github.yag.ipc.IPCTest.testPartialContent................. PASSED
[INFO] com.github.yag.ipc.IPCTest.testResponseContent................ PASSED
[INFO] com.github.yag.ipc.IPCTest.testPingPong....................... PASSED
[INFO] com.github.yag.ipc.IPCTest.testServerClose.................... PASSED
[INFO] com.github.yag.ipc.IPCTest.testServerSideHeartbeatTimeout..... PASSED
[INFO] com.github.yag.ipc.IPCTest.testClientSideHeartbeatTimeout..... PASSED
[INFO] com.github.yag.ipc.IPCTest.testClientSideHeartbeat............ PASSED
[INFO] com.github.yag.ipc.IPCTest.testClientReconnect................ PASSED
[INFO]
[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 10.952 sec, Time saved: 25.919 sec.
Punner produce surefire compatible outputs, you can also get raw log data and a markdown format report from reports directory:
➜ ipc git:(develop) ll target/punner-reports
total 104
-rw-r--r-- 1 guile staff 11K Oct 15 23:07 TEST-com.github.yag.ipc.IPCTest.xml
-rw-r--r-- 1 guile staff 298B Oct 15 23:07 com.github.yag.ipc.IPCTest.txt
drwxr-xr-x 12 guile staff 384B Oct 8 00:50 logs
-rw-r--r-- 1 guile staff 33K Oct 15 23:07 report.md
Punner is my personal project, I written Punner to speed up unit test phase of some other projects such as IPC framework, fine-grained locking, journal service, distributed workflow engine, etc. It saved a lot of my waiting time.
Punner don't support some advanced feature yet. I'm very glad if you could try it and give me some feedback.
You can change your test to be TestNg test in a minute (you just need to change imports), TestNG is the best in parallel testing.
You could try Gridgain that lets you run distribute your tests across a compute grid.

OpenShift, JBoss EAP 6 - how to re-add MySQL driver

I have a Java EE 6 application on OpenShift / JBoss EAP 6, which runs out of space regularly due to big server logs.
Recently, the EAP got broken somehow. It can't find the MySQL driver anymore.
The driver is installed when adding the MySQL cartridge (rhc cartridge add mysql-5.1 -a MyApp).
Restarting everything doesn't help.
Deleting the MySQL cartridge and adding it again doesn't help.
Is there a way to add the EAP module without dropping the database?
Why the deployment-scanner subsystem is not found?
This is the related config on OpenShift (standard)
<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">
<deployment-scanner path="deployments"
relative-to="jboss.server.base.dir" scan-interval="5000"
deployment-timeout="300" />
</subsystem>
2013/08/31 21:03:09,044 ERROR [org.jboss.as.controller.management-operation]
(management-handler-thread - 4) JBAS014613: Operation ("read-resource") failed
- address: ([("subsystem" => "deployment-scanner")])
- failure description: "JBAS014807: Management resource
'[(\"subsystem\" => \"deployment-scanner\")]' not found"
2013/08/31 21:03:09,224 INFO [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016005: Starting Services for CDI deployment: ROOT.war
2013/08/31 21:03:09,888 INFO [org.jboss.weld.Version] (MSC service thread 1-1) WELD-000900 1.1.8 (redhat)
2013/08/31 21:03:10,139 INFO [org.jboss.as.osgi] (MSC service thread 1-3) JBAS011907: Register module: Module "deployment.ROOT.war:main" from Service Module Loader
2013/08/31 21:03:10,881 INFO [org.jboss.as.server] (ServerService Thread Pool -- 35) JBAS018559: Deployed "ROOT.war"
2013/08/31 21:03:10,887 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.jdbc-driver.mysql (missing) dependents:
[service jboss.data-source.java:jboss/datasources/MysqlDS]
2013/08/31 21:03:11,079 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.8.207.1:9990
2013/08/31 21:03:11,079 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss EAP 6.0.0.GA (AS 7.1.2.Final-redhat-1) started (with errors) in 33174ms - Started 240 of 412 services (38 services failed or missing dependencies, 131 services are passive or on-demand)
Solved. The JDBC driver module has to be in git repo under .openshift/config/modules/. It wasn't there before and the web worked, so I wonder if something changed in OpenShift.
.openshift/config/modules/com/mysql/jdbc/main/mysql-connector-java-5.1.26-bin.jar
And
.openshift/config/modules/com/mysql/jdbc/main/module.xml
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="com.mysql.jdbc">
<resources>
<resource-root path="mysql-connector-java-5.1.26-bin.jar"/>
</resources>
<dependencies>
<module name="javax.api" />
<module name="javax.transaction.api" />
</dependencies>
</module>

I observe the following stack trace when I try to start my jboss server (from both eclipse IDE and the standalone.sh from my unix terminal):)

I observe the following stack trace when I try to start my jboss server (from both eclipse IDE and the standalone.sh from my unix terminal). Could anybody please tell why?:
JAVA_OPTS: -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml
=========================================================================
16:41:48,878 INFO [org.jboss.modules] JBoss Modules version 1.1.1.GA
16:41:49,025 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
16:41:49,066 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
16:41:49,289 ERROR [org.jboss.as.server] JBAS015956: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: JBAS014676: Failed to parse configuration
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:141) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.server.ServerService.boot(ServerService.java:266) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:155) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_05-icedtea]
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [1,0]
at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:677)
at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2104)
at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2010)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1102)
at com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1125)
at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:67) [staxmapper-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:133) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
... 3 more
16:41:49,295 FATAL [org.jboss.as.server] JBAS015957: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
16:41:49,301 INFO [org.jboss.as] JBAS015950: JBoss AS 7.1.1.Final "Brontes" stopped in 1ms
This means that there is some problem with your Standalone.xml. Take a fresh one, it should work.
Here are the relevant lines
JBAS014676: Failed to parse configuration
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
Looks like you're missing a configuration file (or more likely it's empty).
I just came across the same problem and found out that standalone.xml was empty.
I don't know what could have caused this though... U can find back up of ur standalone.xml in ${AS7_installation}/standalone/configuration/standalone_xml_history