sonarRunner Anaylsis失败异常 - 无法分析.java文件,NullPointerException sonar.sources

时间:2014-08-05 17:15:32

标签: exception nullpointerexception analysis sonarqube squid

我在Java项目上运行sonarRunner(声纳分析),但收到以下错误。我尝试了下面提到的各种选项/设置,但它仍然失败。我甚至试过设置/传递 -Dsonar.exclusions = src / java / com / thc / ids / biz / SomePlansvc / pvt / costestimate / datavalidation / Validators.java ,它& #39; s仍然没有忽略该文件。

12:51:38 12:51:38.426 INFO  - Base dir: /rootddisk/ci-jenkins/var_loc2/workspace/SomePlanSvc
12:51:38 12:51:38.426 INFO  - Working dir: /rootddisk/ci-jenkins/var_loc2/workspace/SomePlanSvc/build/****
12:51:38 12:51:38.427 INFO  - Source dirs: /rootddisk/ci-jenkins/var_loc2/workspace/SomePlanSvc/src/java
12:51:38 12:51:38.427 INFO  - Test dirs: /rootddisk/ci-jenkins/var_loc2/workspace/SomePlanSvc/test/java, /rootddisk/ci-jenkins/var_loc2/workspace/SomePlanSvc/src/java-test
12:51:38 12:51:38.427 INFO  - Binary dirs: /rootddisk/ci-jenkins/var_loc2/workspace/SomePlanSvc/build/classes/main
12:51:38 12:51:38.427 INFO  - Source encoding: UTF-8, default locale: en_US
12:51:38 12:51:38.542 INFO  - Sensor JavaSourceImporter...
12:51:39 12:51:39.910 INFO  - Sensor JavaSourceImporter done: 1368 ms
12:51:39 12:51:39.910 INFO  - Sensor JavaSquidSensor...
12:51:39 12:51:39.982 INFO  - Java AST scan...
12:51:42 :****Runner FAILED
12:51:42 
12:51:42 FAILURE: Build failed with an exception.
12:51:42 
12:51:42 * What went wrong:
12:51:42 Execution failed for task ':****Runner'.
12:51:42 > org.****.squid.api.AnalysisException: SonarQube is unable to analyze file : '/rootddisk/ci-jenkins/var_loc2/workspace/SomePlanSvc/src/java/com/thc/ids/biz/SomePlansvc/pvt/costestimate/datavalidation/Validators.java'
12:51:42 
12:51:42 * Try:
12:51:42 Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
12:51:42 
12:51:42 BUILD FAILED
12:51:42 

OR ,属性为-Dsonar.verbose = true

12:46:00 12:46:00.208 DEBUG - Remove data measure from memory: ncloc_data, id=6508635
12:46:00 12:46:00.221 DEBUG - Release semaphore on project : org.****.api.resources.Project@3f1ea2e9[id=9200,key=com.company.shenzi:SomePlanSvc,qualifier=TRK], with key batch-com.company.shenzi:SomePlanSvc
12:46:00 12:46:00.248 DEBUG - To prevent a memory leak, the JDBC Driver [org.postgresql.Driver] has been forcibly deregistered
12:46:00 :****Runner FAILED
12:46:00 
12:46:00 FAILURE: Build failed with an exception.
12:46:00 
12:46:00 * What went wrong:
12:46:00 Execution failed for task ':****Runner'.
12:46:00 > org.****.squid.api.AnalysisException: SonarQube is unable to analyze file : '/rootddisk/ci-jenkins/var_loc2/workspace/SomePlanSvc/src/java/com/thc/ids/biz/SomePlansvc/pvt/costestimate/datavalidation/Validators.java'
12:46:00 
12:46:00 * Try:
12:46:00 Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
12:46:00 
12:46:00 BUILD FAILED

OR - 运行sonarRunner任务时将--stacktrace --debug作为参数传递给Gradle。

12:38:54 12:38:54.268 [DEBUG] [sun.net.www.protocol.http.HttpURLConnection] sun.net.www.MessageHeader@7f1a8ee58 pairs: {null: HTTP/1.1 200 OK}{Server: Apache-Coyote/1.1}{X-Runtime: 12}{ETag: "791167fe40a105310f7617f6946dbf31"}{Cache-Control: private, max-age=0, must-revalidate}{Content-Type: application/json;charset=utf-8}{Content-Length: 484}{Date: Tue, 05 Aug 2014 16:38:54 GMT}
12:38:54 12:38:54.279 [QUIET] [system.out] 12:38:54.279 INFO  - Apply project exclusions
12:38:54 12:38:54.408 [QUIET] [system.out] 12:38:54.408 INFO  - -------------  Scan SomePlanSvc
12:38:54 12:38:54.412 [QUIET] [system.out] 12:38:54.412 INFO  - Load module settings
12:38:54 12:38:54.416 [DEBUG] [sun.net.www.protocol.http.HttpURLConnection] sun.net.www.MessageHeader@4d7b95636 pairs: {GET /batch_bootstrap/properties?project=com.company.shenzi:SomePlanSvc&dryRun=false HTTP/1.1: null}{Accept-Encoding: gzip}{User-Agent: Sonar Runner/2.0}{Host: cmSonar.main.company.com:9000}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Connection: keep-alive}
12:38:54 12:38:54.448 [DEBUG] [sun.net.www.protocol.http.HttpURLConnection] sun.net.www.MessageHeader@6c8cbe528 pairs: {null: HTTP/1.1 200 OK}{Server: Apache-Coyote/1.1}{X-Runtime: 9}{ETag: "791167fe40a105310f7617f6946dbf31"}{Cache-Control: private, max-age=0, must-revalidate}{Content-Type: application/json;charset=utf-8}{Content-Length: 484}{Date: Tue, 05 Aug 2014 16:38:54 GMT}
12:38:54 12:38:55.271 [QUIET] [system.out] 12:38:55.270 INFO  - Quality profile : [name=Sonar way with Findbugs,language=java]
12:38:54 12:38:55.286 [QUIET] [system.out] 12:38:55.286 INFO  - Excluded tests: 
12:38:55 12:38:55.286 [QUIET] [system.out] 12:38:55.286 INFO  -   **/package-info.java
12:38:55 12:38:55.371 [QUIET] [system.out] 12:38:55.371 INFO  - Index files
12:38:55 12:38:55.903 [QUIET] [system.out] 12:38:55.903 INFO  - 324 files indexed
12:38:55 12:38:55.916 [QUIET] [system.out] 12:38:55.915 INFO  - Loading technical debt model...
12:38:55 12:38:56.645 [QUIET] [system.out] 12:38:56.645 INFO  - Loading technical debt model done: 730 ms
12:38:55 12:38:56.668 [QUIET] [system.out] 12:38:56.668 INFO  - Configure Maven plugins
12:38:56 12:38:57.214 [QUIET] [system.out] 12:38:57.214 INFO  - Base dir: /rootddisk/ci-jenkins/var_loc2/workspace/SomePlanSvc
12:38:56 12:38:57.214 [QUIET] [system.out] 12:38:57.214 INFO  - Working dir: /rootddisk/ci-jenkins/var_loc2/workspace/SomePlanSvc/build/****
12:38:57 12:38:57.214 [QUIET] [system.out] 12:38:57.214 INFO  - Source dirs: /rootddisk/ci-jenkins/var_loc2/workspace/SomePlanSvc/src/java
12:38:57 12:38:57.215 [QUIET] [system.out] 12:38:57.215 INFO  - Test dirs: /rootddisk/ci-jenkins/var_loc2/workspace/SomePlanSvc/test/java, /rootddisk/ci-jenkins/var_loc2/workspace/SomePlanSvc/src/java-test
12:38:57 12:38:57.215 [QUIET] [system.out] 12:38:57.215 INFO  - Binary dirs: /rootddisk/ci-jenkins/var_loc2/workspace/SomePlanSvc/build/classes/main
12:38:57 12:38:57.215 [QUIET] [system.out] 12:38:57.215 INFO  - Source encoding: UTF-8, default locale: en_US
12:38:57 12:38:57.317 [QUIET] [system.out] 12:38:57.317 INFO  - Sensor JavaSourceImporter...
12:38:57 12:38:58.663 [QUIET] [system.out] 12:38:58.663 INFO  - Sensor JavaSourceImporter done: 1346 ms
12:38:57 12:38:58.663 [QUIET] [system.out] 12:38:58.663 INFO  - Sensor JavaSquidSensor...
12:38:58 12:38:58.742 [QUIET] [system.out] 12:38:58.742 INFO  - Java AST scan...
12:38:58 12:39:01.222 [DEBUG] [org.gradle.logging.internal.DefaultLoggingConfigurer] Finished configuring with level: DEBUG, configurers: [org.gradle.logging.internal.OutputEventRenderer@3cff8f2c, org.gradle.logging.internal.logback.LogbackLoggingConfigurer@2e10b0fd, org.gradle.logging.internal.JavaUtilLoggingConfigurer@49d3c9ab]
12:38:58 12:39:01.222 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on task artifact state cache (/rootddisk/ci-jenkins/var_loc2/workspace/SomePlanSvc/.gradle/1.6/taskArtifacts).
12:39:01 12:39:01.222 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
12:39:01 12:39:01.223 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':****Runner'
12:39:01 12:39:01.223 [LIFECYCLE] [org.gradle.TaskExecutionLogger] :****Runner FAILED
12:39:01 12:39:01.228 [ERROR] [org.gradle.BuildExceptionReporter] 
12:39:01 12:39:01.229 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
12:39:01 12:39:01.229 [ERROR] [org.gradle.BuildExceptionReporter] 
12:39:01 12:39:01.229 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
12:39:01 12:39:01.230 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':****Runner'.
12:39:01 12:39:01.230 [ERROR] [org.gradle.BuildExceptionReporter] > org.****.squid.api.AnalysisException: SonarQube is unable to analyze file : '/rootddisk/ci-jenkins/var_loc2/workspace/SomePlanSvc/src/java/com/thc/ids/biz/SomePlansvc/pvt/costestimate/datavalidation/Validators.java'
12:39:01 12:39:01.232 [ERROR] [org.gradle.BuildExceptionReporter] 
12:39:01 12:39:01.232 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
12:39:01 12:39:01.233 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':****Runner'.
12:39:01 12:39:01.234 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
12:39:01 12:39:01.234 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
12:39:01 12:39:01.234 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
12:39:01 12:39:01.234 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.changedetection.state.CacheLockReleasingTaskExecuter$1.run(CacheLockReleasingTaskExecuter.java:35)
12:39:01 12:39:01.234 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.internal.Factories$1.create(Factories.java:22)
12:39:01 12:39:01.234 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:179)
12:39:01 12:39:01.235 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:232)
12:39:01 12:39:01.235 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunningOperation(DefaultPersistentDirectoryStore.java:142)
12:39:01 12:39:01.235 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.longRunningOperation(DefaultTaskArtifactStateCacheAccess.java:83)
12:39:01 12:39:01.235 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.changedetection.state.CacheLockReleasingTaskExecuter.execute(CacheLockReleasingTaskExecuter.java:33)
12:39:01 12:39:01.236 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:58)
12:39:01 12:39:01.236 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ContextualisingTaskExecuter.execute(ContextualisingTaskExecuter.java:34)
12:39:01 12:39:01.236 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.changedetection.state.CacheLockAcquiringTaskExecuter$1.run(CacheLockAcquiringTaskExecuter.java:39)
12:39:01 12:39:01.236 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.internal.Factories$1.create(Factories.java:22)
12:39:01 12:39:01.236 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:124)
12:39:01 12:39:01.236 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:112)
12:39:01 12:39:01.237 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:134)
12:39:01 12:39:01.237 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:79)
12:39:01 12:39:01.237 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.changedetection.state.CacheLockAcquiringTaskExecuter.execute(CacheLockAcquiringTaskExecuter.java:37)
12:39:01 12:39:01.237 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:57)
12:39:01 12:39:01.238 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:41)
12:39:01 12:39:01.238 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
12:39:01 12:39:01.238 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:52)
12:39:01 12:39:01.238 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:42)
12:39:01 12:39:01.238 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:282)
12:39:01 12:39:01.238 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.executeTask(DefaultTaskPlanExecutor.java:48)
12:39:01 12:39:01.239 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.processTask(DefaultTaskPlanExecutor.java:34)
12:39:01 12:39:01.239 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:27)
12:39:01 12:39:01.239 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:89)
12:39:01 12:39:01.239 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
12:39:01 12:39:01.239 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
12:39:01 12:39:01.240 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
12:39:01 12:39:01.240 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
12:39:01 12:39:01.240 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.changedetection.state.TaskCacheLockHandlingBuildExecuter$1.run(TaskCacheLockHandlingBuildExecuter.java:31)
12:39:01 12:39:01.240 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.internal.Factories$1.create(Factories.java:22)
12:39:01 12:39:01.240 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:124)
12:39:01 12:39:01.241 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:112)
12:39:01 12:39:01.241 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:134)
12:39:01 12:39:01.241 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:79)
12:39:01 12:39:01.241 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.changedetection.state.TaskCacheLockHandlingBuildExecuter.execute(TaskCacheLockHandlingBuildExecuter.java:29)
12:39:01 12:39:01.241 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
12:39:01 12:39:01.242 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
12:39:01 12:39:01.242 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
12:39:01 12:39:01.242 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
12:39:01 12:39:01.242 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
12:39:01 12:39:01.242 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
12:39:01 12:39:01.243 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:166)
12:39:01 12:39:01.243 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
12:39:01 12:39:01.243 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
12:39:01 12:39:01.243 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64)
12:39:01 12:39:01.243 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
12:39:01 12:39:01.244 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
12:39:01 12:39:01.244 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35)
12:39:01 12:39:01.244 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
12:39:01 12:39:01.244 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
12:39:01 12:39:01.244 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
12:39:01 12:39:01.244 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
12:39:01 12:39:01.245 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
12:39:01 12:39:01.245 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
12:39:01 12:39:01.245 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
12:39:01 12:39:01.245 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
12:39:01 12:39:01.245 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
12:39:01 12:39:01.246 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.launcher.Main.doAction(Main.java:48)
12:39:01 12:39:01.246 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
12:39:01 12:39:01.246 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.launcher.Main.main(Main.java:39)
12:39:01 12:39:01.246 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
12:39:01 12:39:01.246 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
12:39:01 12:39:01.247 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.launcher.GradleMain.main(GradleMain.java:26)
12:39:01 12:39:01.247 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.****.runner.RunnerException: org.****.squid.api.AnalysisException: SonarQube is unable to analyze file : '/rootddisk/ci-jenkins/var_loc2/workspace/SomePlanSvc/src/java/com/thc/ids/biz/SomePlansvc/pvt/costestimate/datavalidation/Validators.java'
12:39:01 12:39:01.247 [ERROR] [org.gradle.BuildExceptionReporter]   at org.****.runner.Runner.delegateExecution(Runner.java:288)
12:39:01 12:39:01.247 [ERROR] [org.gradle.BuildExceptionReporter]   at org.****.runner.Runner.execute(Runner.java:151)
12:39:01 12:39:01.247 [ERROR] [org.gradle.BuildExceptionReporter]   at org.****.runner.Runner$execute.call(Unknown Source)
12:39:01 12:39:01.248 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.****.runner.SonarRunner.run(SonarRunner.groovy:52)
12:39:01 12:39:01.248 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:216)
12:39:01 12:39:01.248 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:122)
12:39:01 12:39:01.248 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:147)
12:39:01 12:39:01.248 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.****.runner.SonarRunner_Decorated.invokeMethod(Unknown Source)
12:39:01 12:39:01.248 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.util.ReflectionUtil.invoke(ReflectionUtil.groovy:23)
12:39:01 12:39:01.249 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:217)
12:39:01 12:39:01.249 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
12:39:01 12:39:01.249 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:199)
12:39:01 12:39:01.249 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:526)
12:39:01 12:39:01.249 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:509)
12:39:01 12:39:01.250 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
12:39:01 12:39:01.250 [ERROR] [org.gradle.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
12:39:01 12:39:01.250 [ERROR] [org.gradle.BuildExceptionReporter]   ... 67 more
12:39:01 12:39:01.250 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.****.squid.api.AnalysisException: SonarQube is unable to analyze file : '/rootddisk/ci-jenkins/var_loc2/workspace/SomePlanSvc/src/java/com/thc/ids/biz/SomePlansvc/pvt/costestimate/datavalidation/Validators.java'
12:39:01 12:39:01.250 [ERROR] [org.gradle.BuildExceptionReporter]   at org.****.java.ast.AstScanner.scan(AstScanner.java:132)
12:39:01 12:39:01.251 [ERROR] [org.gradle.BuildExceptionReporter]   at org.****.java.JavaSquid.scanSources(JavaSquid.java:113)
12:39:01 12:39:01.251 [ERROR] [org.gradle.BuildExceptionReporter]   at org.****.java.JavaSquid.scan(JavaSquid.java:107)
12:39:01 12:39:01.251 [ERROR] [org.gradle.BuildExceptionReporter]   at org.****.plugins.java.JavaSquidSensor.analyse(JavaSquidSensor.java:79)
12:39:01 12:39:01.251 [ERROR] [org.gradle.BuildExceptionReporter]   at org.****.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:72)
12:39:01 12:39:01.251 [ERROR] [org.gradle.BuildExceptionReporter]   at org.****.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:114)
12:39:01 12:39:01.255 [ERROR] [org.gradle.BuildExceptionReporter]   at org.****.runner.Runner.delegateExecution(Runner.java:285)
12:39:01 12:39:01.256 [ERROR] [org.gradle.BuildExceptionReporter]   ... 82 more
12:39:01 12:39:01.256 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.NullPointerException
12:39:01 12:39:01.256 [ERROR] [org.gradle.BuildExceptionReporter]   at org.****.java.checks.EmptyMethodsCheck.isInAbstractClass(EmptyMethodsCheck.java:80)
12:39:01 12:39:01.256 [ERROR] [org.gradle.BuildExceptionReporter]   at org.****.java.checks.EmptyMethodsCheck.visitNode(EmptyMethodsCheck.java:47)
12:39:01 12:39:01.260 [ERROR] [org.gradle.BuildExceptionReporter]   at org.****.java.ast.AstScanner.scan(AstScanner.java:93)
12:39:01 12:39:01.260 [ERROR] [org.gradle.BuildExceptionReporter]   ... 110 more
12:39:01 12:39:01.260 [ERROR] [org.gradle.BuildExceptionReporter] 
12:39:01 12:39:01.260 [LIFECYCLE] [org.gradle.BuildResultLogger] 
12:39:01 12:39:01.260 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
12:39:01 12:39:01.261 [LIFECYCLE] [org.gradle.BuildResultLogger] 

Validators.java 文件的代码是:

package com.thc.ids.biz.someplansvc.pvt.costestimate.datavalidation;

import java.math.BigDecimal;
import java.util.Map;


/**
 * Validate data
 * @author Trinley
 *
 * @param <T>
 */
public enum Validators
{
   VAL_PERCENT_DECIMAL
   {
      public void validate(Object value)
      {
         BigDecimal val = (BigDecimal)value;
         if (val.compareTo(BigDecimal.ZERO) < 0 || val.compareTo(BigDecimal.ONE) > 0)
         {
            throw new IllegalArgumentException("Value: " + value + " out of range for: " + this);
         }
      }
   },
   VAL_POSITIVE_DECIMAL
   {
      public void validate(Object value)
      {
         BigDecimal val = (BigDecimal)value;
         if (val.compareTo(BigDecimal.ZERO) < 0)
         {
            throw new IllegalArgumentException("Value: " + value + " out of range for: " + this);
         }
      }
   },
   VAL_NOP_BOOLEAN
   {
      public void validate(Object value) {}
   },
   VAL_NOP_DECIMAL
   {
      public void validate(Object value) {}
   },
   VAL_NOP_STRING
   {
      public void validate(Object value) {}
   },
   VAL_REQ_BOOLEAN
   {
      public void validate(Object value)
      {
         if (value == null)
         {
            throw new NoDataFoundException("A required boolean field is missing");
         }
      }
   },
   VAL_REQ_DECIMAL
   {
      public void validate(Object value)
      {
         if (value == null)
         {
            throw new NoDataFoundException("A required double field is missing");
         }
      }
   },
   VAL_REQ_GigaType
   {
      public void validate(Object value)
      {
         if (value == null)
         {
            throw new NoDataFoundException("A required GigaType field is missing");
         }
      }
   },
   VAL_REQ_MAP
      {
      public void validate(Object value)
      {
         if (value instanceof Map)
         {
            throw new NoDataFoundException("A Map field is invalid");
         }
      }
   };

   public abstract void validate(Object val);
}

0 个答案:

没有答案