Can't Build Project by Gradle Operation Timeout Issue - macos

I have trying to configue the setup and rebuild the project again but there has alwasy Operation Timeout. WOuld you please tell me how to setup gradles in local ? Even I have changed the link as :
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5.1-all.zip
Still not working.
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-
all.zip
The below is my gradle 3.3 file. It always shows incomplete download.
Part of Log File :
Consult IDE log for more details (Help | Show Log)
2017-07-06 10:46:56,427 [ 603845] WARN - roid.tools.ndk.GradleWorkspace - NDK support for project 'NovaX' is disabled because the project doesn't contain any valid native configurations.
2017-07-06 10:46:56,579 [ 603997] INFO - #com.jetbrains.cidr.lang - Clearing symbols finished in 0 s.
2017-07-06 10:46:56,579 [ 603997] INFO - #com.jetbrains.cidr.lang - Loading symbols finished in 0 s.
2017-07-06 10:46:56,581 [ 603999] INFO - #com.jetbrains.cidr.lang - Building symbols finished in 0 s.
2017-07-06 10:46:56,582 [ 604000] INFO - #com.jetbrains.cidr.lang - Saving symbols finished in 0 s.
2017-07-06 10:47:50,698 [ 658116] INFO - ntellij.util.proxy.CommonProxy - <html>You have JVM property "https.proxyHost" set to "proxy.cei-hk.com".<br>This may lead to incorrect behaviour. Proxy should be set in Settings | HTTP Proxy<br>This JVM property is old and its usage is not recommended by Oracle.<br>(Note: It could have been assigned by some code dynamically.)
2017-07-06 10:48:11,639 [ 679057] INFO - .project.GradleProjectResolver - Gradle project resolve error
org.gradle.tooling.GradleConnectionException: Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradle-3.3-all.zip'.
at org.gradle.tooling.internal.consumer.DistributionFactory$ZippedDistribution$1.call(DistributionFactory.java:145)
at org.gradle.tooling.internal.consumer.DistributionFactory$ZippedDistribution$1.call(DistributionFactory.java:133)
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)
Caused by: java.net.ConnectException: Operation timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)

Related

Nifi - FetchSFTP - Move File Failure

When running a FetchSFTP processor I am getting the following error:
FetchSFTP ... Succesfully fetched the content for ... but failed to rename the remote file due to No such file or directory.
Remote File = ${path}/${filename}
Completion Strategy = Move File.
Move Destination Directory = ${path}/archive.
Create Directory has been set to true.
When the processor runs - the archive folder is created successfully but for some reason, the files in ${path} are not moved. I have no clue how this is not working. Does anyone have any insight on how this may not be set up correctly?
Stack trace from nifi-app.log:
2019-09-29 14:16:50,680 INFO [NiFi Web Server-24] o.a.n.c.s.StandardProcessScheduler Starting ListSFTP[id=6e2e653d-016d-1000-adc1-0798a2954bf1]
2019-09-29 14:16:50,836 INFO [Timer-Driven Process Thread-3] o.a.n.c.s.TimerDrivenSchedulingAgent Scheduled ListSFTP[id=6e2e653d-016d-1000-adc1-0798a2954bf1] to run with 1 threads
2019-09-29 14:16:51,023 INFO [Flow Service Tasks Thread-2] o.a.nifi.controller.StandardFlowService Saved flow controller org.apache.nifi.controller.FlowController#6cde8b83 // Another save pending = false
2019-09-29 14:16:52,716 INFO [NiFi Web Server-24] o.a.n.c.s.StandardProcessScheduler Starting FetchSFTP[id=7d54bd06-016d-1000-1115-ae6da53c9412]
2019-09-29 14:16:52,841 INFO [Timer-Driven Process Thread-7] o.a.n.c.s.TimerDrivenSchedulingAgent Scheduled FetchSFTP[id=7d54bd06-016d-1000-1115-ae6da53c9412] to run with 1 threads
2019-09-29 14:16:53,263 INFO [Flow Service Tasks Thread-2] o.a.nifi.controller.StandardFlowService Saved flow controller org.apache.nifi.controller.FlowController#6cde8b83 // Another save pending = false
2019-09-29 14:16:54,952 WARN [Timer-Driven Process Thread-7] o.a.nifi.processors.standard.FetchSFTP FetchSFTP[id=7d54bd06-016d-1000-1115-ae6da53c9412] Successfully fetched the content for StandardFlowFileRecord[uuid=15c80199-8055-420c-b6ed-b949b3fcfb2a,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1569766614296-1, container=default, section=1], offset=0, length=37],offset=0,name=test.txt,size=37] from [FTP_SITE:FTP_PORT]/[FILE_PATH]/test.txt but failed to rename the remote file due to java.io.FileNotFoundException: No such file or directory:
java.io.FileNotFoundException: No such file or directory
at org.apache.nifi.processors.standard.util.SFTPTransfer.rename(SFTPTransfer.java:682)
at org.apache.nifi.processors.standard.FetchFileTransfer.onTrigger(FetchFileTransfer.java:332)
at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1162)
at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:209)
at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117)
at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Update (2019-09-30 21:55)
I located the rename piece in SFTPTransfer. Updated the error to echo the source and target locations. The source location looks fine... but the target location is the C:\${path}\${filename} (running Nifi on Windows Server)
I'm going to see if I can locate where it's being called at see if it can be corrected there.
Update (2019-10-01 22:00)
NiFi V. 1.9.2
Just updated to 1.10.0 SNAPSHOT
Will see if I can get the standard nar recompiled and get with the results
Update (2019-10-2 08:25)
V.1.10.0-SNAPSHOT is doing the same thing. Trying to send it to a C:\ location, at the same time inverting the /'s

Intellij IDEA: StackOverflowError on building project

I have a StackOverflowError when building the project in Intellij IDEA 2017.2. It started ocurring after I dropped all IDEA settings and started onboarding my project again.
The build log has the following:
2017-12-13 14:59:55,043 [ 16299] INFO - .incremental.IncProjectBuilder - Building project; isRebuild:false; isMake:true parallel compilation:false
2017-12-13 14:59:55,043 [ 16299] INFO - kotlin.jps.build.KotlinBuilder - is Kotlin incremental compilation enabled: true
2017-12-13 14:59:55,043 [ 16299] INFO - kotlin.jps.build.KotlinBuilder - is Kotlin experimental incremental compilation enabled: true
2017-12-13 14:59:55,060 [ 16316] INFO - kotlin.jps.build.KotlinBuilder - is Kotlin compiler daemon enabled: true
2017-12-13 14:59:55,060 [ 16316] INFO - kotlin.jps.build.KotlinBuilder - Label in local history: build started 2019016a
2017-12-13 14:59:55,066 [ 16322] INFO - CompilerBackwardReferenceIndex - backward reference index version differ due to: class java.io.FileNotFoundException
2017-12-13 14:59:55,080 [ 16336] INFO - .incremental.IncProjectBuilder - Cleaned output directories in 14 ms
2017-12-13 14:59:55,346 [ 16602] INFO - .incremental.IncProjectBuilder - maven-resources-test:project-common: java.lang.StackOverflowError
org.jetbrains.jps.incremental.ProjectBuildException: maven-resources-test:project-common: java.lang.StackOverflowError
at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:1035)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:900)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:733)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:385)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:192)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:138)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:295)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:125)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:236)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl.lambda$executeOnPooledThread$0(SharedThreadPoolImpl.java:42)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
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)
Caused by: java.lang.StackOverflowError
at com.intellij.util.io.PagedFileStorage.getByteBuffer(PagedFileStorage.java:193)
at com.intellij.util.io.IntToIntBtree$BtreePage.syncWithStore(IntToIntBtree.java:332)
at com.intellij.util.io.IntToIntBtree$BtreePage.setAddress(IntToIntBtree.java:321)
at com.intellij.util.io.IntToIntBtree.processLeafPages(IntToIntBtree.java:1178)
at com.intellij.util.io.IntToIntBtree.processLeafPages(IntToIntBtree.java:1179)
at com.intellij.util.io.IntToIntBtree.processLeafPages(IntToIntBtree.java:1179)
at com.intellij.util.io.IntToIntBtree.processLeafPages(IntToIntBtree.java:1179)
And many many more same invocations of this method. At the end of stacktrace:
2017-12-13 14:59:56,059 [ 0] INFO - etbrains.jps.cmdline.BuildMain - Build process started. Classpath: C:/path/to/idea/lib/jps-launcher.jar;C:/path/to/jdk/lib/tools.jar;C:/path/to/idea/lib/optimizedFileManager.jar
2017-12-13 14:59:56,150 [ 91] INFO - til.internal.PlatformDependent - Your platform does not provide complete low-level API for accessing direct buffers reliably. Unless explicitly requested, heap buffer will always be preferred to avoid potential system instability.
2017-12-13 14:59:56,528 [ 469] INFO - etbrains.jps.cmdline.BuildMain - Connection to IDE established in 439 ms
2017-12-13 14:59:56,544 [ 485] INFO - penapi.util.io.win32.IdeaWin32 - Native filesystem for Windows is operational
2017-12-13 14:59:56,545 [ 486] INFO - jps.cmdline.JpsModelLoaderImpl - Loading model: project path = /path/to/project, global options path = path/to/options
2017-12-13 14:59:57,128 [ 1069] INFO - jps.cmdline.JpsModelLoaderImpl - Model loaded in 583 ms
2017-12-13 14:59:57,128 [ 1069] INFO - jps.cmdline.JpsModelLoaderImpl - Project has 11 modules, 179 libraries
2017-12-13 14:59:57,316 [ 1257] INFO - ellij.util.io.PagedFileStorage - lower=100; upper=500; buffer=10; max=3536
2017-12-13 14:59:57,512 [ 1453] INFO - etbrains.jps.cmdline.BuildMain - Pre-loaded process ready in 1453 ms
I have found a similar question - IntelliJ IDEA: StackOverflowError on Build Project , but the solution there - setting -Xss4m did not help me.
I think this error might be in some way connected with my settings.xml Maven file because I modified it after clearing IDEA's settings. However, I cannot understand why it leads to this error.
I would very much appreciate any help on the subject.
The solution (a pretty straightforward one) was to completely reinstall IDEA with dropping all the configurations and plugins. Reinstalling IDEA while keeping configuration hadn't worked before, so most likely I had some misconfiguration in its settings files.
I ran into this problem after loading and unloading modules repeatedly. Changing the stack size didn't help, and the build worked from the command line with Maven.
I did File->Invalidate Caches / Restart... and that fixed it.

IntelliJ Idea 2016 memory problems on OSX

I just updated to Idea 2016.3.2. And keep getting this error.
There is not enough memory to perform the requested operation. Please
increase 'Xmx' setting and restart the IDE for change to take effect.
The last thing i did was to increase the Xmx memory option to 2048 in the idea.vmoptions file (as instructed by this answer How to increase IDE memory limit in IntelliJ IDEA on Mac?)
But it keeps runing out of memory still.
Does anyone know what I need to do?
... after looking into it some more it now seems to me like it's a git process that causes the memory failure. initiated when I open a git managed project.
Excerp from log:
java.lang.OutOfMemoryError: Java heap space at
java.util.Arrays.copyOf(Arrays.java:3332) at
java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124)
at
java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:448)
at java.lang.StringBuilder.append(StringBuilder.java:136) at
git4idea.history.GitHistoryUtils$2.onLineAvailable(GitHistoryUtils.java:579)
at sun.reflect.GeneratedMethodAccessor129.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498) at
com.intellij.util.EventDispatcher.dispatch(EventDispatcher.java:99)
at
com.intellij.util.EventDispatcher.access$200(EventDispatcher.java:35)
at
com.intellij.util.EventDispatcher$2.invoke(EventDispatcher.java:79)
at com.sun.proxy.$Proxy123.onLineAvailable(Unknown Source) at
git4idea.commands.GitLineHandler.notifyLine(GitLineHandler.java:144)
at
git4idea.commands.GitLineHandler.notifyLines(GitLineHandler.java:106)
at
git4idea.commands.GitLineHandler.onTextAvailable(GitLineHandler.java:74)
at
git4idea.commands.GitTextHandler$1.onTextAvailable(GitTextHandler.java:90)
at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498) at
com.intellij.execution.process.ProcessHandler$4.invoke(ProcessHandler.java:226)
at com.sun.proxy.$Proxy16.onTextAvailable(Unknown Source) at
com.intellij.execution.process.ProcessHandler.notifyTextAvailable(ProcessHandler.java:200)
at
com.intellij.execution.process.BaseOSProcessHandler$SimpleOutputReader.onTextAvailable(BaseOSProcessHandler.java:290)
at
com.intellij.util.io.BaseOutputReader.sendText(BaseOutputReader.java:202)
at
com.intellij.util.io.BaseOutputReader.processInput(BaseOutputReader.java:186)
at
com.intellij.util.io.BaseOutputReader.readAvailableBlocking(BaseOutputReader.java:140)
at
com.intellij.util.io.BaseDataReader.readAvailable(BaseDataReader.java:82)
at com.intellij.util.io.BaseDataReader.doRun(BaseDataReader.java:160)
at com.intellij.util.io.BaseDataReader$1.run(BaseDataReader.java:61)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
2017-01-04 10:16:01,967 [ 393766] ERROR -
.intellij.util.EventDispatcher - IntelliJ IDEA 2016.3.2 Build
IU-163.10154.41 2017-01-04 10:16:01,967 [ 393766] ERROR - .intellij.util.EventDispatcher - JDK: 1.8.0_112-release 2017-01-04
10:16:01,967 [ 393766] ERROR - .intellij.util.EventDispatcher - VM:
OpenJDK 64-Bit Server VM 2017-01-04 10:16:01,967 [ 393766] ERROR -
.intellij.util.EventDispatcher - Vendor: JetBrains s.r.o 2017-01-04
10:16:01,967 [ 393766] ERROR - .intellij.util.EventDispatcher - OS:
Mac OS X 2017-01-04 10:16:01,971 [ 393770] ERROR -
.intellij.util.EventDispatcher - Last Action: EditCustomVmOptions
2017-01-04 10:16:03,231 [ 395030] ERROR -
.intellij.util.EventDispatcher - Java heap space
Found the solution:
Add this to custom properties (via the help menu; edit custom properties)
vcs.log.index.git=off
That way Idea doesnt attempt to index your entire repo and

Error processing file named sonar-reports/oclint.xml

I am facing an issue when I am trying analyzing iPhone app code with the help of sonarqube.
I am getting below error when trying to execute sonar-runner from app root directory.
11:06:17.040 INFO - Index files<br/>
11:06:18.276 INFO - 214 files indexed<br/>
11:06:18.966 INFO - Quality profile for objc: OCLint<br/>
11:06:19.016 INFO - Sensor QProfileSensor...<br/>
11:06:19.020 INFO - Sensor QProfileSensor done: 4 ms<br/>
11:06:19.020 INFO - Sensor ObjectiveCSquidSensor...<br/>
11:06:19.334 INFO - Sensor ObjectiveCSquidSensor done: 314 ms<br/>
11:06:19.334 INFO - Sensor Objective-C SurefireSensor...<br/>
11:06:19.334 INFO - parsing sonar-reports<br/>
11:06:19.334 INFO - Sensor Objective-C SurefireSensor done: 0 ms<br/>
11:06:19.335 INFO - Sensor org.sonar.plugins.objectivec.coverage.CoberturaSensor#6544899b...<br/>
11:06:19.342 INFO - Sensor
org.sonar.plugins.objectivec.coverage.CoberturaSensor#6544899b done: 7 ms<br/>
11:06:19.342 INFO - Sensor org.sonar.plugins.objectivec.violations.OCLintSensor#6da54910...<br/>
11:06:19.342 INFO - Processing OCLint report /Users/org/Documents/C/ISH/projects/Proj1/mobile2.2.0.5/mobile/ios/Proj1-Mobile/./sonar-reports/oclint.xml<br/>
11:06:19.346 ERROR - Error processing file named /Users/org/Documents/C/ISH/projects/Proj1/mobile2.2.0.5/mobile/ios/Proj1-Mobile/./sonar-reports/oclint.xml<br/>
java.io.FileNotFoundException: /Users/org/Documents/C/ISH/projects/Proj1/mobile2.2.0.5/mobile/ios/Proj1-Mobile/./sonar-reports/oclint.xml (No such file or directory)
at java.io.FileInputStream.open0(Native Method) ~[na:1.8.0_60]
at java.io.FileInputStream.open(FileInputStream.java:195) ~[na:1.8.0_60]
at java.io.FileInputStream.<init>(FileInputStream.java:138) ~[na:1.8.0_60]
at org.sonar.plugins.objectivec.violations.OCLintParser.parseReport(OCLintParser.java:49) ~[sonar-objective-c-plugin-0.4.0.jar:na]
Thanks in advance ,Let me know if someone faced same problem before.
If my understanding is correct, you're using the community SonarQube Objective-C plugin (https://github.com/octo-technology/sonar-objective-c), the best best to get some help is to create an issue here : https://github.com/octo-technology/sonar-objective-c/issues
I met same issue before, I solved it by using
sudo ./run-sonar.sh
The reason could be the oclint.xml is generated by root user before, and you are running as non-root user, so no privilege for you to access oclint.xml
Another possible reason is the dot(.) prefix in sonar-project.properties, Proj1-Mobile/./sonar-reports/oclint.xml, try to remove the ./ prefix in your properties file for the oclint.xml

C++ community plugin: Sonar-runner scans wrong file types + Lexical errors

I have setup a Sonar server and am trying to pull some metrics by setting up a test project, but I encounter some problems.
Environment:
OS: Windows Server 2008 R2 / amd64 / 6.1
App Server:Tomcat/7.0.40I, deployed the Sonar WAR file (3.5.1).
DB: MySQL v5.6.11
(relevant) Plugins:
Sonar C++ Community Plugin (0.2)
The plugin is visible under General Settings --> Sonar C++ Community Plugin
sonar-project.properties:
# Required metadata
sonar.projectKey=mistral:pmc
sonar.projectName=PMC
sonar.projectVersion=1.0
sonar.language=c++
# Comma-separated paths to directories with sources (required)
sonar.sources=e:/Development/mistral/PMC/trunk/
# Optional path to the CppCheck program required to activate some CppCheck rules
sonar.cpp.cppcheck.path=C:/Program Files (x86)/Cppcheck/cppcheck.exe
# Encoding of the source files
sonar.sourceEncoding=UTF-8
Issue 1:
When running the sonar-runner it fails as it tries to analyse irrelevant filetypes, like .DOC (see below)
C:\Users\Administrator\Documents\sonar-runner-2.2.1
Sonar Runner 2.2.1
Java 1.7.0_21 Oracle Corporation (64-bit)
Windows Server 2008 R2 6.1 amd64
INFO: Runner configuration file: C:\Users\Administrator\Documents\sonar-runner-2.2.1\conf\sonar-runner.properties
INFO: Project configuration file: C:\Users\Administrator\Documents\sonar-projects\PMC\sonar-project.properties
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Work directory: C:\Users\Administrator\Documents\sonar-projects\PMC\.sonar
INFO: Sonar Server 3.5.1
13:18:23.320 INFO - Load batch settings
13:18:23.429 INFO - User cache: C:\Users\Administrator\.sonar\cache
13:18:23.444 INFO - Install plugins
13:18:24.287 INFO - ------------- Executing Project Scan
13:18:24.848 INFO - Install JDBC driver
13:18:24.848 INFO - Apply project exclusions
13:18:24.864 INFO - Create JDBC datasource for jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
13:18:25.129 INFO - Initializing Hibernate
13:18:27.563 INFO - ------------- Inspecting PMC
13:18:27.578 INFO - Load module settings
13:18:28.780 INFO - Quality profile : [name=Default C++ Profile,language=c++]
13:18:28.795 INFO - Excluded tests:
13:18:28.795 INFO - **/package-info.java
13:18:28.826 INFO - Configure Maven plugins
13:18:28.982 INFO - Compare to previous analysis (2013-05-30)
13:18:29.045 INFO - Compare over 5 days (2013-05-25, analysis of 2013-05-29 09:23:04.0)
13:18:29.092 INFO - Compare over 30 days (2013-04-30, analysis of 2013-05-29 09:23:04.0)
13:18:29.294 INFO - Base dir: C:\Users\Administrator\Documents\sonar-projects\PMC
13:18:29.294 INFO - Working dir: C:\Users\Administrator\Documents\sonar-projects\PMC\.sonar
13:18:29.294 INFO - Source dirs: e:\Development\mistral\PMC\trunk
13:18:29.294 INFO - Source encoding: UTF-8, default locale: en_US
13:18:29.560 INFO - Sensor CxxSourceImporter...
13:18:30.932 WARN - SQL Error: 1366, SQLState: HY000
13:18:30.932 ERROR - Incorrect string value: '\xF2\x97\xA4\xB9\xDC\xAE...' for column 'data' at row 1
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 8.408s
Final Memory: 12M/352M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: Unable to read and import the source file : 'e:\Development\mistral\PMC\trunk\doc\guides\Mistral_PMC_BroadcastEnvironmentImporter_user_guide.doc' with the charset : 'UTF-8'.
ERROR: Caused by: Unable to persist : SnapshotSource[snapshot_id=1742,data=??◄?→? > ♥ ?? ♠ ♀ ?♣ ► ?♣ ☺ ???? ?♣ ?♣ ?♣ ?♣ ?♣ ?♣ ?♣ ?♣ ?♣ ?♣ ?♣ ?♣ ?
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? g? ♦ ?↕?
??☼ ??☼ ??☼ ? ?§ ?§ ?" ?" 0# 0# 0# $ ???? T# T# T# P ?# ? ($ ? T# ?? ?☺ ?$ ?☻ ?' ( ?'
?' ?' ?+ j♦ ►0 l☺ |1 ? (? ☻ *? *? *? *? *? *? $ ?? ?☻ =? ?☺ N? § 0# 42 H+ H+ ^ ...]
ERROR: Caused by: org.hibernate.exception.GenericJDBCException: could not insert: [org.sonar.api.database.model.SnapshotSource]
ERROR: Caused by: could not insert: [org.sonar.api.database.model.SnapshotSource]
ERROR: Caused by: Incorrect string value: '\xF2\x97\xA4\xB9\xDC\xAE...' for column 'data' at row 1
ERROR:
ERROR: To see the full stack trace of the errors, re-run Sonar Runner with the -e switch.
ERROR: Re-run Sonar Runner using the -X switch to enable full debug logging.
When I forcefully exclude the offending file types by adding: sonar.exclusions=**/*.doc,**/*.svc to the sonar-project.properties file I can work around this problem, but I rather get it to work as expected (only take files into account as configured)
Issue 2:
The analysis throws allot of “Lexical error in file” errors while scanning (see below). I believe this might happen if the source encoding differs.
C:\Users\Administrator\Documents\sonar-projects\PMC>sonar-runner
C:\Users\Administrator\Documents\sonar-runner-2.2.1
Sonar Runner 2.2.1
Java 1.7.0_21 Oracle Corporation (64-bit)
Windows Server 2008 R2 6.1 amd64
INFO: Runner configuration file: C:\Users\Administrator\Documents\sonar-runner-2.2.1\conf\sonar-runner.properties
INFO: Project configuration file: C:\Users\Administrator\Documents\sonar-projects\PMC\sonar-project.properties
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Work directory: C:\Users\Administrator\Documents\sonar-projects\PMC\.sonar
INFO: Sonar Server 3.5.1
13:22:35.048 INFO - Load batch settings
13:22:35.154 INFO - User cache: C:\Users\Administrator\.sonar\cache
13:22:35.157 INFO - Install plugins
13:22:35.878 INFO - ------------- Executing Project Scan
13:22:36.471 INFO - Install JDBC driver
13:22:36.476 INFO - Apply project exclusions
13:22:36.481 INFO - Create JDBC datasource for jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
13:22:36.730 INFO - Initializing Hibernate
13:22:38.990 INFO - ------------- Inspecting PMC
13:22:38.995 INFO - Load module settings
13:22:40.078 INFO - Quality profile : [name=Default C++ Profile,language=c++]
13:22:40.096 INFO - Excluded sources:
13:22:40.097 INFO - **/*.doc
13:22:40.097 INFO - **/*.svc
13:22:40.097 INFO - Excluded tests:
13:22:40.098 INFO - **/package-info.java
13:22:40.125 INFO - Configure Maven plugins
13:22:40.266 INFO - Compare to previous analysis (2013-05-30)
13:22:40.326 INFO - Compare over 5 days (2013-05-25, analysis of 2013-05-29 09:23:04.0)
13:22:40.366 INFO - Compare over 30 days (2013-04-30, analysis of 2013-05-29 09:23:04.0)
13:22:40.575 INFO - Base dir: C:\Users\Administrator\Documents\sonar-projects\PMC
13:22:40.575 INFO - Working dir: C:\Users\Administrator\Documents\sonar-projects\PMC\.sonar
13:22:40.576 INFO - Source dirs: e:\Development\mistral\PMC\trunk
13:22:40.576 INFO - Source encoding: UTF-8, default locale: en_US
13:22:40.902 INFO - Sensor CxxSourceImporter...
13:22:42.888 INFO - Sensor CxxSourceImporter done: 1986 ms
13:22:42.889 INFO - Sensor CpdSensor...
13:22:42.889 INFO - SonarBridgeEngine is used
13:22:42.985 INFO - Cross-project analysis disabled
net.sourceforge.pmd.cpd.cppast.TokenMgrError: Lexical error in file e:\Development\mistral\PMC\trunk\AppServer\ApplicationDistributionScheduler\Logic\ActivateItvApplicationOnMcmDistributionRequestP
essor.cs at line 1, column 1. Encountered: "\ufeff" (65279), after : ""
at net.sourceforge.pmd.cpd.cppast.CPPParserTokenManager.getNextToken(CPPParserTokenManager.java:1655)
at net.sourceforge.pmd.cpd.CPPTokenizer.tokenize(CPPTokenizer.java:26)
at org.sonar.duplications.internal.pmd.TokenizerBridge.chunk(TokenizerBridge.java:60)
at org.sonar.duplications.internal.pmd.TokenizerBridge.chunk(TokenizerBridge.java:52)
at org.sonar.plugins.cpd.SonarBridgeEngine.analyse(SonarBridgeEngine.java:102)
at org.sonar.plugins.cpd.CpdSensor.analyse(CpdSensor.java:80)
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:70)
at org.sonar.batch.phases.Phases.execute(Phases.java:101)
at org.sonar.batch.scan.ScanContainer.doStart(ScanContainer.java:147)
at org.sonar.batch.bootstrap.Container.start(Container.java:72)
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:65)
at org.sonar.batch.scan.ScanTask.scanRecursively(ScanTask.java:56)
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:49)
at org.sonar.batch.bootstrap.TaskContainer.doStart(TaskContainer.java:188)
at org.sonar.batch.bootstrap.Container.start(Container.java:72)
at org.sonar.batch.bootstrap.TaskBootstrapContainer.executeTask(TaskBootstrapContainer.java:73)
at org.sonar.batch.bootstrap.TaskBootstrapContainer.doStart(TaskBootstrapContainer.java:62)
at org.sonar.batch.bootstrap.Container.start(Container.java:72)
at org.sonar.batch.bootstrap.BootstrapContainer.doStart(BootstrapContainer.java:104)
at org.sonar.batch.bootstrap.Container.start(Container.java:72)
at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:88)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:72)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:75)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:63)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:57)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:71)
at org.sonar.runner.api.Runner.execute(Runner.java:89)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:41)
Skipping e:\Development\mistral\PMC\trunk\AppServer\ApplicationDistributionScheduler\Logic\ActivateItvApplicationOnMcmDistributionRequestProcessor.cs due to parse error
net.sourceforge.pmd.cpd.cppast.TokenMgrError: Lexical error in file e:\Development\mistral\PMC\trunk\AppServer\ApplicationDistributionScheduler\Logic\ApplicationDistributionRequestProcessor.cs at l
1, column 1. Encountered: "\ufeff" (65279), after : ""
at net.sourceforge.pmd.cpd.cppast.CPPParserTokenManager.getNextToken(CPPParserTokenManager.java:1655)
at net.sourceforge.pmd.cpd.CPPTokenizer.tokenize(CPPTokenizer.java:26)
at org.sonar.duplications.internal.pmd.TokenizerBridge.chunk(TokenizerBridge.java:60)
at org.sonar.duplications.internal.pmd.TokenizerBridge.chunk(TokenizerBridge.java:52)
at org.sonar.plugins.cpd.SonarBridgeEngine.analyse(SonarBridgeEngine.java:102)
at org.sonar.plugins.cpd.CpdSensor.analyse(CpdSensor.java:80)
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:70)
at org.sonar.batch.phases.Phases.execute(Phases.java:101)
at org.sonar.batch.scan.ScanContainer.doStart(ScanContainer.java:147)
at org.sonar.batch.bootstrap.Container.start(Container.java:72)
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:65)
at org.sonar.batch.scan.ScanTask.scanRecursively(ScanTask.java:56)
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:49)
at org.sonar.batch.bootstrap.TaskContainer.doStart(TaskContainer.java:188)
at org.sonar.batch.bootstrap.Container.start(Container.java:72)
at org.sonar.batch.bootstrap.TaskBootstrapContainer.executeTask(TaskBootstrapContainer.java:73)
at org.sonar.batch.bootstrap.TaskBootstrapContainer.doStart(TaskBootstrapContainer.java:62)
at org.sonar.batch.bootstrap.Container.start(Container.java:72)
at org.sonar.batch.bootstrap.BootstrapContainer.doStart(BootstrapContainer.java:104)
at org.sonar.batch.bootstrap.Container.start(Container.java:72)
at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:88)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:72)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:75)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:63)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:57)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:71)
at org.sonar.runner.api.Runner.execute(Runner.java:89)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:41)
Skipping e:\Development\mistral\PMC\trunk\AppServer\ApplicationDistributionScheduler\Logic\ApplicationDistributionRequestProcessor.cs due to parse error
The thing is, I have set the sourceEncoding to UTF-8 but the files throwing the error are also encoded in UTF-8 (see below):
These might be simple beginner errors but I cannot find a quick/easy fix for this. Could you help on my way?
The .doc file is scanned because its file name ends with 'c'.
The c++ plugin's default source suffixes are: cxx,cpp,cc,c
Notice that there isn't any dot '.' character in there. So any file whose file name ends with 'c' character will be taken: abc, ab.c, a.bc. The same apply for the other suffixes.
If you want exact suffixes, you need to use something like this:
sonar.cxx.suffixes.sources=.cxx,.cpp,.cc,.c

Resources