Maven can't connect to remote standalone Selenium server - java

I am working on creating a test suite for a project at work, where we will be testing our application on several operating systems from a central box (all vms). The box with the tests on is a CentOS server utilizing apache-maven for the tests. I am trying to test against a Windows 10 box running selenium-standalone-server but have had no luck so far. Here is the configuration for each box:
CentOS
Apache Maven
IP address - 192.168.4.62
Subnet mask - 255.255.255.0
Sample Test
package com.netsweeper.browsertests;
import static org.junit.Assert.assertEquals;
import java.net.URL;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.*;
import org.openqa.selenium.firefox.*;
import org.openqa.selenium.safari.*;
import org.openqa.selenium.chrome.*;
import org.openqa.selenium.support.ui.*;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
public class ReadyTest {
#Test
public void accessChrome() {
try {
WebDriver driver = new RemoteWebDriver(new URL("http://192.168.4.60:4444/wd/hub"), DesiredCapabilities.chrome());
driver.get("http://google.com");
assertEquals("The page title should equal Google at the start of the test", "Google", driver.getTitle());
driver.close();
driver.quit();
}
catch ( java.net.MalformedURLException e) {
System.out.println("Broken");
}
}
}
Test Output
[root#62 browser_tests]# mvn -Dtest=ReadyTest test
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Browser Tests 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # browsertests ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /src/client_filter/browser_tests/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # browsertests ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # browsertests ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /src/client_filter/browser_tests/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # browsertests ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # browsertests ---
[INFO] Surefire report directory: /src/client_filter/browser_tests/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.netsweeper.browsertests.ReadyTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.392 sec <<< FAILURE!
accessChrome(com.netsweeper.browsertests.ReadyTest) Time elapsed: 1.325 sec <<< ERROR!
org.openqa.selenium.WebDriverException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html
Command duration or timeout: 732 milliseconds
Build info: version: '2.47.1', revision: 'unknown', time: '2015-07-30 11:02:44'
System info: host: '62.4.168.192.in-addr.arpa.support', ip: '192.168.4.62', os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32-642.1.1.el6.x86_64', java.version: '1.8.0_91'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:595)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:242)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:155)
at com.netsweeper.browsertests.ReadyTest.accessChrome(ReadyTest.java:20)
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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
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.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html
at com.google.common.base.Preconditions.checkState(Preconditions.java:199)
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:109)
at org.openqa.selenium.chrome.ChromeDriverService.access$0(ChromeDriverService.java:1)
at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:137)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:296)
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:88)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:138)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.server.DefaultDriverProvider.callConstructor(DefaultDriverProvider.java:103)
at org.openqa.selenium.remote.server.DefaultDriverProvider.newInstance(DefaultDriverProvider.java:97)
at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:60)
at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:222)
at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:1)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Results :
Tests in error:
accessChrome(com.netsweeper.browsertests.ReadyTest): The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html(..)
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.391 s
[INFO] Finished at: 2016-06-16T11:17:21-04:00
[INFO] Final Memory: 16M/168M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project browsertests: There are test failures.
[ERROR]
[ERROR] Please refer to /src/client_filter/browser_tests/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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/MojoFailureException
[root#62 browser_tests]#
Windows 10
Selenium Standalone Server
Placed in C:\Users\------\Documents\client_filter\selenium-server-standalone-2.53.0
Started with java -jar selenium-server-standalone-2.53.0 from said directory
Correctly starts running
Chrome Driver
Downloaded and placed in C:\Windows\System32
Starting it from command line works correctly, so it is in $PATH
C:\Users\Kendall Roth\Documents\client_filter> chromedriver.exe
IP address - 192.168.4.60
Netmask - 255.255.255.0
However, the error above seems to indicate that the chromedriver is not in the right place to be found, even though it can be found from anywhere (due to being in path). The error was also displayed in the Windows console, and said the same thing.
I have looked around, but can't find anything that deals with a remote install of the Selenium standalone server. This link unfortunately did not work, but was similar to my issue (albeit on a local scale):
selenium-2-chrome-driver

As it turns out, it was a rather simple fix. Although C:\Windows\ is not in the system path this was where the chromedriver.exe was supposed to go. Placing it here instead of in C:\Windows\System32\ appears to solve the problem. I'm not sure if this is a remote server only thing or if it extends to local standalone instances as well, but this solution worked for us.

I've found that including the chromedriver.exe in the resources folder within the project to be a workable fail-safe so I don't have to rely on a new user or remote server having the executable in the right location within their file system.

Related

Error parsing POM File using Maven in Jenkins

So I've been trying to run my Selenium tests using Jenkins.
I created a Maven project, and set the correct POM.xlm pathfile (At least it's what I'm almost certain)
And I continue to get an error at parsing the POM file saying the file is not present in the file path.
The project does work if maven run it from console or eclipse ide.
Here's the stacktrace of the error given by Jenknins.
Building in workspace /Users/Shared/Jenkins/Home/workspace/Pagode
Parsing POMs
Discovered a new module com.hugomonteiro:PagodeAutomatedTests PagodeAutomatedTests
Modules changed, recalculating dependency graph
Established TCP socket on 50661
[PagodeAutomatedTests] $ /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/bin/java -cp /Users/Shared/Jenkins/Home/plugins/maven-plugin/WEB-INF/lib/maven35-agent-1.12-alpha-1.jar:/usr/local/Cellar/maven/3.5.4/libexec/boot/plexus-classworlds-2.5.2.jar:/usr/local/Cellar/maven/3.5.4/libexec/conf/logging jenkins.maven3.agent.Maven35Main /usr/local/Cellar/maven/3.5.4/libexec /Users/Shared/Jenkins/Home/war/WEB-INF/lib/remoting-3.25.jar /Users/Shared/Jenkins/Home/plugins/maven-plugin/WEB-INF/lib/maven35-interceptor-1.12-alpha-1.jar /Users/Shared/Jenkins/Home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.12-alpha-1.jar 50661
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f /Users/hugomonteiro/eclipse-workspace/PagodeAutomatedTests/pom.xml test
[INFO] Scanning for projects...
[HUDSON] Collecting dependencies info
[INFO]
[INFO] ---------------< com.hugomonteiro:PagodeAutomatedTests >----------------
[INFO] Building PagodeAutomatedTests 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for org.testng:testng:jar:5.14.3 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.beust:jcommander:jar:1.66 is missing, no dependency information available
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # PagodeAutomatedTests ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # PagodeAutomatedTests ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # PagodeAutomatedTests ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # PagodeAutomatedTests ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) # PagodeAutomatedTests ---
[INFO] Surefire report directory: /Users/hugomonteiro/eclipse-workspace/PagodeAutomatedTests/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestSuite
Starting ChromeDriver 2.42.591059 (a3d9684d10d61aa0c45f6723b327283be1ebaad8) on port 21561
Only local connections are allowed.
Oct 12, 2018 5:26:39 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 15.043 sec <<< FAILURE! - in TestSuite
doLoginTest(testcases.LoginTest) Time elapsed: 10.681 sec <<< FAILURE!
org.openqa.selenium.TimeoutException: Expected condition failed: waiting for visibility of [[ChromeDriver: chrome on MAC (6cf1ac936bdb4be38c29d55651ee5c6b)] -> css selector: [class='fa fa-fw fa-caret-down']] (tried for 10 second(s) with 500 milliseconds interval)
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'Hugos-MacBook-Pro.local', ip: 'fe80:0:0:0:858:ef39:e614:659a%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '1.8.0_181'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.42.591059 (a3d9684d10d61a..., userDataDir: /var/folders/9l/55xyqdlx7gl...}, cssSelectorsEnabled: true, databaseEnabled: false, goog:chromeOptions: {debuggerAddress: localhost:50670}, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: MAC, platformName: MAC, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 69.0.3497.100, webStorageEnabled: true}
Session ID: 6cf1ac936bdb4be38c29d55651ee5c6b
at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:113)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:283)
at pages.actions.LoginActions.selectLanguage(LoginActions.java:40)
at pages.actions.LoginActions.doLogin(LoginActions.java:26)
at testcases.LoginTest.doLoginTest(LoginTest.java:21)
Results :
Failed tests:
LoginTest.doLoginTest:21 » Timeout Expected condition failed: waiting for visi...
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
[JENKINS] Recording test results
[WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.SurefireArchiver$2; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.MavenArtifactArchiver$2; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[WARNING] Attempt to (de-)serialize anonymous class org.jfrog.hudson.maven2.MavenDependenciesRecorder$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.MavenFingerprinter$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.760 s
[INFO] Finished at: 2018-10-12T17:26:54+01:00
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project PagodeAutomatedTests: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/hugomonteiro/eclipse-workspace/PagodeAutomatedTests/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[JENKINS] Archiving /Users/hugomonteiro/eclipse-workspace/PagodeAutomatedTests/pom.xml to com.hugomonteiro/PagodeAutomatedTests/0.0.1-SNAPSHOT/PagodeAutomatedTests-0.0.1-SNAPSHOT.pom
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
/Users/hugomonteiro/eclipse-workspace/PagodeAutomatedTests/pom.xml is not inside /Users/Shared/Jenkins/Home/workspace/Pagode/Users/hugomonteiro/eclipse-workspace/PagodeAutomatedTests/; will archive in a separate pass
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
ERROR: Failed to parse POMs
java.nio.file.NoSuchFileException: /Users/Shared/Jenkins/Home/workspace/Pagode/Users/hugomonteiro/eclipse-workspace/PagodeAutomatedTests/pom.xml
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
at java.nio.file.Files.newByteChannel(Files.java:361)
at java.nio.file.Files.newByteChannel(Files.java:407)
at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384)
at java.nio.file.Files.newInputStream(Files.java:152)
at hudson.FilePath.read(FilePath.java:1973)
at jenkins.plugins.maveninfo.extractor.properties.PomPropertiesFinder.findProperties(PomPropertiesFinder.java:50)
at jenkins.plugins.maveninfo.extractor.MavenInfoExtractor.extract(MavenInfoExtractor.java:58)
at jenkins.plugins.maveninfo.extractor.MavenInfoEnvironment.tearDown(MavenInfoEnvironment.java:42)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:908)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
at hudson.model.Run.execute(Run.java:1819)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
channel stopped
Finished: FAILURE
Any help would be excelent.
Thanks in advance !
Ok so the problem was :
I was hardcoding the pom file from the eclipse workspace directly to the Jenkins pom file path and this is wrong.
How I fixed with chrylis help :
Moved the project folder to the Jenkins workspace and gave the path from that directory and it worked just fine.

Cannot execute a simple maven project through jenkins

I'm using Linux - Ubuntu 14.04.
I've installed Jenkins 2.7.2.
I created a maven project in Eclipse and followed the instructions provided in this link http://www.guru99.com/maven-jenkins-with-selenium-complete-tutorial.html.
After completing the project setup, I executed it as Maven Project and the build was successful.
Then I installed Jenkins, installed Maven Integration Plugin, created a Maven Project and added the Root POM location and in 'Goals and options' field, I gave 'test' as input and executed the Build, but the Build was a failure.
The console output is as follows:
Started by user QA Admin
Building in workspace /var/lib/jenkins/workspace/WebDriverTest2
Parsing POMs
Established TCP socket on 58065
[WebdriverTest] $ java -Xms1024m -Xmx4096m -XX:PermSize=1024m -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven32-agent-1.7.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven/boot/plexus-classworlds-2.5.2.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven/conf/logging jenkins.maven3.agent.Maven32Main /var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven /var/cache/jenkins/war/WEB-INF/lib/remoting-2.60.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven32-interceptor-1.7.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.7.jar 58065
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=1024m; support was removed in 8.0
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f /home/admin/workspace/WebdriverTest/pom.xml test
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building WebdriverTest 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # WebdriverTest ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) # WebdriverTest ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # WebdriverTest ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) # WebdriverTest ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) # WebdriverTest ---
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[JENKINS] Recording test results
hudson.AbortException: Test reports were found but none of them are new. Did tests run?
For example, /home/admin/workspace/WebdriverTest/target/surefire-reports/TEST-TestSuite.xml is 23 min old
at hudson.tasks.junit.TestResult.parse(TestResult.java:228)
at hudson.maven.reporters.SurefireArchiver.postExecute(SurefireArchiver.java:148)
at hudson.maven.Maven3Builder$MavenExecutionListener.recordMojoEnded(Maven3Builder.java:634)
at hudson.maven.Maven3Builder$MavenExecutionListener.mojoFailed(Maven3Builder.java:667)
at hudson.maven.Maven3Builder$JenkinsEventSpy.onEvent(Maven3Builder.java:311)
at org.apache.maven.eventspy.internal.EventSpyDispatcher.onEvent(EventSpyDispatcher.java:104)
at org.apache.maven.eventspy.internal.EventSpyExecutionListener.mojoFailed(EventSpyExecutionListener.java:138)
at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:90)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:219)
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:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.jvnet.hudson.maven3.launcher.Maven32Launcher.main(Maven32Launcher.java:132)
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.launchStandard(Launcher.java:330)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at jenkins.maven3.agent.Maven32Main.launch(Maven32Main.java:186)
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 hudson.maven.Maven3Builder.call(Maven3Builder.java:136)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)
at hudson.remoting.UserRequest.perform(UserRequest.java:153)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:332)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.097 s
[INFO] Finished at: 2016-08-25T17:16:17+05:30
[INFO] Final Memory: 18M/981M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project WebdriverTest: Error creating properties files for forking: No such file or directory -> [Help 1]
[JENKINS] Archiving /home/admin/workspace/WebdriverTest/pom.xml to WebdriverTest/WebdriverTest/0.0.1-SNAPSHOT/WebdriverTest-0.0.1-SNAPSHOT.pom
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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/MojoFailureException
/home/admin/workspace/WebdriverTest/pom.xml is not inside /var/lib/jenkins/workspace/WebDriverTest2/home/admin/workspace/WebdriverTest/; will archive in a separate pass
channel stopped
Finished: FAILURE
Any help is greatly appreciated. Please help. Thanks in advance.
It looks like you may have given an absolute path to the pom file. At the top Maven logs
Building in workspace /var/lib/jenkins/workspace/WebDriverTest2
And at the end you can see
/home/admin/workspace/WebdriverTest/pom.xml is not inside /var/lib/jenkins/workspace/WebDriverTest2/home/admin/workspace/WebdriverTest/; will archive in a separate pass
So if what I'm thinking is correct, you just need to change the "Root POM" parameter. Give it a relative path to the pom.xml from the project's root directory. So if your project is
WebDriverTest
src/main/java
src/test/java
...
pom.xml
The "Root POM" parameter should just be pom.xml

Jenkins cannot start chrome driver - Selenium Maven

I have written an automation test script using Selenium WebDriver which will open up a browser and navigate to a site and then close the browser.
This is a Maven Project and since I use Eclipse, I am able to execute the project with 'Run As' -> 'Maven Test' and the project gets executed and the Build is Success in console.
But when I try to execute this same project through Jenkins, Jenkins cannot start the chromedriver.
Below is the console output:
Started by user QA Admin
Building in workspace /var/lib/jenkins/workspace/WebDriverTest2
Parsing POMs
Modules changed, recalculating dependency graph
Established TCP socket on 42178
[WebdriverTest] $ java -Xms1024m -Xmx4096m -XX:PermSize=1024m -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven32-agent-1.7.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven/boot/plexus-classworlds-2.5.2.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven/conf/logging jenkins.maven3.agent.Maven32Main /var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven /var/cache/jenkins/war/WEB-INF/lib/remoting-2.60.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven32-interceptor-1.7.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.7.jar 42178
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=1024m; support was removed in 8.0
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f /home/admin/workspace/WebdriverTest/pom.xml test
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building WebdriverTest 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # WebdriverTest ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) # WebdriverTest ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # WebdriverTest ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) # WebdriverTest ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) # WebdriverTest ---
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestSuite
Starting ChromeDriver 2.23.409687 (c46e862757edc04c06b1bd88724d15a5807b84d1) on port 13012
Only local connections are allowed.
Tests run: 3, Failures: 1, Errors: 0, Skipped: 2, Time elapsed: 61.125 sec <<< FAILURE! - in TestSuite
beforeTest(example.NewTest) Time elapsed: 61.027 sec <<< FAILURE!
org.openqa.selenium.WebDriverException:
unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.23.409687 (c46e862757edc04c06b1bd88724d15a5807b84d1),platform=Linux 3.16.0-77-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.22 seconds
Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09'
System info: host: 'AZDTPDE-L2', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.16.0-77-generic', java.version: '1.8.0_101'
Driver info: org.openqa.selenium.chrome.ChromeDriver
at example.NewTest.beforeTest(NewTest.java:31)
Results :
Failed tests:
NewTest.beforeTest:31 » WebDriver unknown error: Chrome failed to start: exite...
Tests run: 3, Failures: 1, Errors: 0, Skipped: 2
[ERROR] There are test failures.
Please refer to /home/admin/workspace/WebdriverTest/target/surefire-reports for the individual test results.
[JENKINS] Recording test results
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:07 min
[INFO] Finished at: 2016-08-26T12:09:35+05:30
[INFO] Final Memory: 28M/1059M
[INFO] ------------------------------------------------------------------------
[JENKINS] Archiving /home/admin/workspace/WebdriverTest/pom.xml to WebdriverTest/WebdriverTest/0.0.1-SNAPSHOT/WebdriverTest-0.0.1-SNAPSHOT.pom
/home/admin/workspace/WebdriverTest/pom.xml is not inside /var/lib/jenkins/workspace/WebDriverTest2/home/admin/workspace/WebdriverTest/; will archive in a separate pass
channel stopped
Finished: UNSTABLE
I'm using Ubuntu 14.04 OS.
Any help is greatly appreciated. Thanks in advance. Please help. Any help?

nanohttpd demo App crashed after 15seconds

I want to find a light http service for my Java program, and after research, I find nanohttpd is so light with only one java page, and easy installation, so I want to wrap my Java program with this framework.
I have tried tutorial on nanohttpd github page, everything is ok, but for the final step,
mvn exec:java -Dexec.mainClass="com.example.App"
it crashed after about 15seconds with this info
[root#zhangruichang-test-dev001-shgq myHellopApp]# mvn exec:java -
Dexec.mainClass="com.example.App"
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building myHellopApp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.4.0:java (default-cli) # myHellopApp ---
ready to start
Running! Point your browers to http://localhost:8080/
[WARNING] thread Thread[NanoHttpd Main Listener,5,com.example.App] was interrupted but is still alive after waiting at least 15000msecs
[WARNING] thread Thread[NanoHttpd Main Listener,5,com.example.App] will linger despite being asked to die via interruption
[WARNING] NOTE: 1 thread(s) did not finish despite being asked to via interruption. This is not a problem with exec:java, it is a problem with the running code. Although not serious, it should be remedied.
[WARNING] Couldn't destroy threadgroup org.codehaus.mojo.exec.ExecJavaMojo$IsolatedThreadGroup[name=com.example.App,maxpri=10]
java.lang.IllegalThreadStateException
at java.lang.ThreadGroup.destroy(ThreadGroup.java:775)
at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:328)
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:320)
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:606)
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)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.491s
[INFO] Finished at: Fri Dec 18 19:24:39 CST 2015
[INFO] Final Memory: 12M/144M
[INFO] ------------------------------------------------------------------------
Currently I have googled it but without any most related issues.
I use
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 21:51:28+0800) and OpenJDK with
Java version: 1.7.0_85, vendor: Oracle Corporation
on
OS name: "linux", version: "2.6.32-573.1.1.el6.x86_64", arch: "amd64", family: "unix"
with CentOS 6.4.
Could anyone help me?
Maybe a hint: you could change the "exec-maven-plugin" to tell it not to kill daemon threads.
Something such as:
<configuration>
<mainClass>com.test.Startup</mainClass>
<cleanupDaemonThreads>false</cleanupDaemonThreads>
</configuration>
See here also: https://stackoverflow.com/a/25166013/259988

sonar 5.2 NullPointerException

My environment is the following:
http://localhost:9000/sonar/api/server/version :: 5.2
java,sonar-java-plugin-3.7.jar|07dba2b9cad37584d82522414b2dccd0
scmgit,sonar-scm-git-plugin-1.0.jar|e1d9d8e1d3524f9f0f69017e6dbead02
scmsvn,sonar-scm-svn-plugin-1.2.jar|188d526ad86ec7f2dc7de694bf5f1851
printenv | grep MAVEN<BR>
MAVEN_OPTS=-Xmx1024m -XX:MaxPermSize=512m
I launch the command:
mvn sonar:sonar -Dsonar.verbose=true
and it fails as reported here below.
If I insert the file MyFileName.java (ref. backtrace) in the SonarQube Global Source File Exclusions, then the process goes ahead, up to a next file (likely to a next file that needs to be traced because it's affected by some issue) and it fails again with the same symptoms.
There's no specific trace in the sonar.log file.
Same results with:
mvn org.codehaus.mojo:sonar-maven-plugin:2.6:sonar -Dsonar.verbose=true
The main project I'm trying to analyse is very wide and the "module" that is failing is the 103rd one; this is only to say that there are several modules already processed in the previous stages without any sonar failures.
Any suggestions on how I could investigate this issue?
Backtrace:
....
[INFO] ------------- Scan My103thModule
[INFO] Language is forced to java
[INFO] Base dir: /bla/bla/bla
[INFO] Working dir: /bla/bla/bla/target/sonar
[INFO] Source paths: pom.xml, src/main/java
[INFO] Binary dirs: target/classes
[INFO] Source encoding: UTF-8, default locale: en_US
[INFO] Index files
[INFO] 1 files indexed
[INFO] Quality profile for java: Sonar way
[INFO] JaCoCoSensor: JaCoCo report not found.
[INFO] JaCoCoItSensor: JaCoCo IT report not found.
[INFO] JaCoCoOverallSensor: JaCoCo reports not found.
[INFO] Sensor JavaSquidSensor
[INFO] Java Main Files AST scan...
[INFO] 1 source files to be analyzed
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[....]
[INFO] BUILD FAILURE
[....]
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.7.1:sonar (default-cli) on project mlwc.project: SonarQube is unable to analyze file : ' ..../MyFileName.java': NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.7.1:sonar (default-cli) on project mlwc.project: SonarQube is unable to analyze file : ' ..../MyFileName.java'
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
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:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
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:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: SonarQube is unable to analyze file : ' ..../MyFileName.java'
at org.codehaus.mojo.sonar.bootstrap.ExceptionHandling.handle(ExceptionHandling.java:41)
at org.codehaus.mojo.sonar.bootstrap.RunnerBootstrapper.execute(RunnerBootstrapper.java:104)
at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:135)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: org.sonar.squidbridge.api.AnalysisException: SonarQube is unable to analyze file : '..../MyFileName.java'
at org.sonar.java.ast.JavaAstScanner.simpleScan(JavaAstScanner.java:105)
at org.sonar.java.ast.JavaAstScanner.scan(JavaAstScanner.java:77)
at org.sonar.java.JavaSquid.scanSources(JavaSquid.java:130)
at org.sonar.java.JavaSquid.scan(JavaSquid.java:123)
at org.sonar.plugins.java.JavaSquidSensor.analyse(JavaSquidSensor.java:90)
at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:58)
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:50)
at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:98)
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:192)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:100)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:85)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:258)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:253)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:251)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:251)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:243)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:100)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:85)
at org.sonar.batch.bootstrap.GlobalContainer.executeAnalysis(GlobalContainer.java:153)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:110)
at org.sonar.runner.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:55)
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:606)
at org.sonar.runner.impl.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:61)
at com.sun.proxy.$Proxy21.execute(Unknown Source)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:275)
at org.sonar.runner.api.EmbeddedRunner.runAnalysis(EmbeddedRunner.java:166)
at org.sonar.runner.api.EmbeddedRunner.runAnalysis(EmbeddedRunner.java:153)
at org.codehaus.mojo.sonar.bootstrap.RunnerBootstrapper.execute(RunnerBootstrapper.java:99)
... 22 more
Caused by: java.lang.NullPointerException
at org.sonar.batch.source.SymbolizableBuilder.loadPerspective(SymbolizableBuilder.java:46)
at org.sonar.batch.source.SymbolizableBuilder.loadPerspective(SymbolizableBuilder.java:32)
at org.sonar.batch.deprecated.perspectives.BatchPerspectives.as(BatchPerspectives.java:63)
at org.sonar.java.SonarComponents.symbolizableFor(SonarComponents.java:111)
at org.sonar.java.model.InternalVisitorsBridge.createSonarSymbolTable(InternalVisitorsBridge.java:170)
at org.sonar.java.model.InternalVisitorsBridge.visitFile(InternalVisitorsBridge.java:104)
at org.sonar.java.ast.JavaAstScanner.simpleScan(JavaAstScanner.java:97)
... 52 more
I also had this issue and found that upgrading (from 5.2) to SonarQube 5.3 resolved it. This suggests that the issue is related to a bug with 5.2 however I have not been able to track down the specific fix. I'll update this answer with a link to the Jira if I find it

Categories

Resources