JaCoCo report fails in Jenkins: java.lang.ArrayIndexOutOfBoundsException - java

I have been using JaCoCo locally with no problem.
When running a Jenkins job on a remote server, the job builds fine and generates JaCoCo coverage report (i.e. it appears in my workspace/report folder) but the build fails when attempting to publish the report on Jenkins.
I am using Jenkins 1.460 and JaCoCo 5.0.0.
I have configured Jenkins with:
Path to exec files: **/**.exec
Path to classes: **/dist/validation/WEB-INF/classes
Path to source: **/src (I have also tried **/Validation/src, and explicitly including **/**.class and excluding other file types)
Is this a configuration problem, or a compatibility error?
[EDIT: In case it helps anyone else, other forums say JaCoCo requires ASM 5.+ to manage Java 8 class analysis. I am already using ASM 5.0.1.]
BUILD SUCCESSFUL
Total time: 4 minutes 57 seconds
Archiving artifacts
Recording test results
[JaCoCo plugin] Collecting JaCoCo coverage data...
[JaCoCo plugin] **/**.exec;**/dist/validation/WEB-INF/classes;**/Validation/src; locations are configured
[JaCoCo plugin] Number of found exec files for pattern **/**.exec: 1
[JaCoCo plugin] Saving matched execfiles: E:\Jenkins\jobs\Validation - Test Cases\workspace\Validation\jacoco.exec
[JaCoCo plugin] Saving matched class directories for class-pattern: **/dist/validation/WEB-INF/classes: E:\Jenkins\jobs\Validation - Test Cases\workspace\Validation\dist\validation\WEB-INF\classes
[JaCoCo plugin] Saving matched source directories for source-pattern: **/Validation/src: E:\Jenkins\jobs\Validation - Test Cases\workspace\Validation\src
[JaCoCo plugin] Loading inclusions files..
[JaCoCo plugin] inclusions: []
[JaCoCo plugin] exclusions: []
ERROR: Publisher hudson.plugins.jacoco.JacocoPublisher aborted due to exception
java.io.IOException: Error while analyzing class E:\Jenkins\jobs\Validation - Test Cases\builds\2015-02-23_15-59-44\jacoco\classes\org\gosh\validation\filters\ModifiedFileListFilter.class.
at org.jacoco.core.analysis.Analyzer.analyzerError(Analyzer.java:150)
at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:144)
at org.jacoco.core.analysis.Analyzer.analyzeAll(Analyzer.java:175)
at org.jacoco.core.analysis.Analyzer.analyzeAll(Analyzer.java:208)
at hudson.plugins.jacoco.ExecutionFileLoader.analyzeStructure(ExecutionFileLoader.java:126)
at hudson.plugins.jacoco.ExecutionFileLoader.loadBundleCoverage(ExecutionFileLoader.java:133)
at hudson.plugins.jacoco.JacocoReportDir.parse(JacocoReportDir.java:102)
at hudson.plugins.jacoco.JacocoBuildAction.loadRatios(JacocoBuildAction.java:291)
at hudson.plugins.jacoco.JacocoBuildAction.load(JacocoBuildAction.java:273)
at hudson.plugins.jacoco.JacocoPublisher.perform(JacocoPublisher.java:371)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:705)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:680)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:658)
at hudson.model.Build$RunnerImpl.post2(Build.java:162)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:627)
at hudson.model.Run.run(Run.java:1446)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:238)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 7
at org.jacoco.core.internal.analysis.MethodAnalyzer.addProbe(MethodAnalyzer.java:288)
at org.jacoco.core.internal.analysis.MethodAnalyzer.visitInsnWithProbe(MethodAnalyzer.java:224)
at org.jacoco.core.internal.flow.MethodProbesAdapter.visitInsn(MethodProbesAdapter.java:76)
at org.objectweb.asm.tree.InsnNode.accept(InsnNode.java:80)
at org.objectweb.asm.tree.InsnList.accept(InsnList.java:162)
at org.objectweb.asm.tree.MethodNode.accept(MethodNode.java:815)
at org.jacoco.core.internal.flow.ClassProbesAdapter$1.visitEnd(ClassProbesAdapter.java:124)
at org.objectweb.asm.ClassReader.b(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:107)
at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:142)
... 18 more
Finished: FAILURE
[UPDATE - solution]
Using this answer I installed the recently released JaCoCo-0.7.4 (see eclemma.org/jacoco) on my local drive. This version contains the fix for issue 27088. I also had to delete and then reinstall the Jenkins JaCoCo plugin (I used the Jenkins Plugin Manager).

There appears to be a compatibility problem between the JaCoCo version used during build and the version used by Jenkins in the post-build action.
The maven-jacoco-plugin version 0.7.3.201502191951 in combination with the Jenkins JaCoCo Plugin version 1.0.18 causes this problem. Version 0.7.2.201409121644 of the maven-jacoco-plugin appears to be compatible.
See also https://issues.jenkins-ci.org/browse/JENKINS-27088 and https://github.com/jenkinsci/jacoco-plugin/pull/51

Two things:
In your Jenkins project configuration for the JaCoCo Post-build action, make sure to set the Inclusions field. Something like */*.class should work. Also remove the second asterix (*) from your expressions above. Make them */*.exec, */dist/, etc
I was having a similar similar ArrayIndexOutOfBounds exception today from the Jacoco plugin, It only occurred in Jenkins though, not when running a maven build from the command line. Googling around suggested that the Jacoco plugin inclusion and exclusion field syntax causes people problems. I tried a couple different formats for those fields to no avail, so I moved to the cobertura plugin which was a cinch to use: https://wiki.jenkins-ci.org/display/JENKINS/Cobertura+Plugin#CoberturaPlugin-ConfiguringtheCoberturaPlugin

Related

Eclipse - Invalid classpath container: 'TestNG' in project and JUnit failed

I'm using Eclipse 4.9, I tried to update new TestNG upgrade(7)
It failed so I rollback to previous version and now I have an issue
'Invalid classpath container: 'TestNG' in project
I can't fix it by
clean project (maven can't be execute due to NullpointerException below errors)
Reinstall TestNG
Remove and add TestNG library
I didn't find relevant answers for this issue
Error log:
java.lang.NullPointerException
at org.eclipse.jem.workbench.utility.JavaModelListener.isInClasspath(JavaModelListener.java:367)
at org.eclipse.jem.workbench.utility.JavaModelListener.isInClasspath(JavaModelListener.java:412)
at org.eclipse.jem.workbench.utility.JavaModelListener.isInClasspath(JavaModelListener.java:384)
at org.eclipse.jem.workbench.utility.JavaModelListener.isInClasspath(JavaModelListener.java:305)
at org.eclipse.jem.internal.adapters.jdom.JavaReflectionSynchronizer.processJavaElementChanged(JavaReflectionSynchronizer.java:117)
at org.eclipse.jem.workbench.utility.JavaModelListener.processDelta(JavaModelListener.java:116)
at org.eclipse.jem.internal.adapters.jdom.JavaReflectionSynchronizer.processDelta(JavaReflectionSynchronizer.java:343)
at org.eclipse.jem.workbench.utility.JavaModelListener.processChildren(JavaModelListener.java:78)
at org.eclipse.jem.internal.adapters.jdom.JavaReflectionSynchronizer.processChildren(JavaReflectionSynchronizer.java:336)
at org.eclipse.jem.workbench.utility.JavaModelListener.processJavaElementChanged(JavaModelListener.java:176)
at org.eclipse.jem.workbench.utility.JavaModelListener.processDelta(JavaModelListener.java:113)
at org.eclipse.jem.internal.adapters.jdom.JavaReflectionSynchronizer.processDelta(JavaReflectionSynchronizer.java:343)
at org.eclipse.jem.workbench.utility.JavaModelListener.elementChanged(JavaModelListener.java:63)
at org.eclipse.jem.internal.adapters.jdom.JavaReflectionSynchronizer.elementChanged(JavaReflectionSynchronizer.java:265)
at org.eclipse.jdt.internal.core.DeltaProcessor$3.run(DeltaProcessor.java:1738)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.jdt.internal.core.DeltaProcessor.notifyListeners(DeltaProcessor.java:1726)
at org.eclipse.jdt.internal.core.DeltaProcessor.firePostChangeDelta(DeltaProcessor.java:1559)
at org.eclipse.jdt.internal.core.DeltaProcessor.fire(DeltaProcessor.java:1535)
at org.eclipse.jdt.internal.core.DeltaProcessor.notifyAndFire(DeltaProcessor.java:2256)
at org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged(DeltaProcessor.java:2146)
at org.eclipse.jdt.internal.core.DeltaProcessingState.resourceChanged(DeltaProcessingState.java:477)
at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:300)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:290)
at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:153)
at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:379)
at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1502)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:160)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
EDIT 1
Actually I failed to execute JUnit also
java.lang.NullPointerException
at org.eclipse.jdt.launching.JavaRuntime.processJavaLibraryPathEntries(J
avaRuntime.java:3037)
at org.eclipse.jdt.launching.JavaRuntime.processJavaLibraryPathEntries(J
avaRuntime.java:3049)
at org.eclipse.jdt.launching.JavaRuntime.gatherJavaLibraryPathEntries(Ja
vaRuntime.java:3000)
at org.eclipse.jdt.launching.JavaRuntime.computeJavaLibraryPath(JavaRunt
ime.java:2958)
at org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate.get
JavaLibraryPath(AbstractJavaLaunchConfigurationDelegate.java:1081)
at org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate.get
VMArguments(AbstractJavaLaunchConfigurationDelegate.java:598)
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate.colle
ctExecutionArguments(JUnitLaunchConfigurationDelegate.java:376)
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate.getVM
RunnerConfiguration(JUnitLaunchConfigurationDelegate.java:185)
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate.launc
h(JUnitLaunchConfigurationDelegate.java:255)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConf
iguration.java:862)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConf
iguration.java:720)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlu
gin.java:1029)
at org.eclipse.debug.internal.ui.DebugUIPlugin$2.run(DebugUIPlugin.java:
1243)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
java.lang.NullPointerException
at org.eclipse.jdt.launching.JavaRuntime.processJavaLibraryPathEntries(J
avaRuntime.java:3037)
at org.eclipse.jdt.launching.JavaRuntime.processJavaLibraryPathEntries(J
avaRuntime.java:3049)
at org.eclipse.jdt.launching.JavaRuntime.gatherJavaLibraryPathEntries(Ja
vaRuntime.java:3000)
at org.eclipse.jdt.launching.JavaRuntime.computeJavaLibraryPath(JavaRunt
ime.java:2958)
at org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate.get
JavaLibraryPath(AbstractJavaLaunchConfigurationDelegate.java:1081)
at org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate.get
VMArguments(AbstractJavaLaunchConfigurationDelegate.java:598)
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate.colle
ctExecutionArguments(JUnitLaunchConfigurationDelegate.java:376)
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate.getVM
RunnerConfiguration(JUnitLaunchConfigurationDelegate.java:185)
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate.launc
h(JUnitLaunchConfigurationDelegate.java:255)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConf
iguration.java:862)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConf
iguration.java:720)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlu
gin.java:1029)
at org.eclipse.debug.internal.ui.DebugUIPlugin$2.run(DebugUIPlugin.java:
1243)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
EDIT 2
Eclipse 4.10 doesn't support TestNG plugin to needed to downgrade to Eclipse Neon
TestNG is only available only for version till (4.9)2018-09 , you hv not made plug in for 2018-12.that's why it is not showing in marketplace
the recent release supports Eclipse Photon 2018-12:
https://github.com/cbeust/testng-eclipse/releases/tag/6.14.3.201902250526
please raise ticket on github if you still meet issue.
I had to manually (not using marketplace) TestNG version from http://beust.com/eclipse/
Notice there's warning about You are installing software that contains unsigned content

SonarQube: Please provide compiled classes of your project

I am running Sonar Qube 6.5 and using Sonar scanner 3.0.3.
When I run sonar-scanner for my projects, I encountered the error as below:
ERROR: Error during SonarQube Scanner execution
org.sonar.squidbridge.api.AnalysisException: Please provide compiled classes of your project with sonar.java.binaries property
at org.sonar.java.JavaClasspath.init(JavaClasspath.java:59)
at org.sonar.java.AbstractJavaClasspath.getElements(AbstractJavaClasspath.java:281)
at org.sonar.java.SonarComponents.getJavaClasspath(SonarComponents.java:141)
at org.sonar.java.JavaSquid.<init>(JavaSquid.java:83)
at org.sonar.plugins.java.JavaSquidSensor.execute(JavaSquidSensor.java:83)
at org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:53)
at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:88)
at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:82)
at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:68)
at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:78)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:179)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:144)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:129)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:261)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:256)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:245)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:144)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:129)
at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47)
at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:144)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:129)
at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:119)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:116)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:63)
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.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:123)
at org.sonarsource.scanner.cli.Main.execute(Main.java:77)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
This is the way you can use your own sonar, installed on localhost:
Download SonarQube from here
Unpack
Refresh the Java Plugin, you can download the plugin from here
In the page dedicated to the plugin you want to install (ex: for Python : SonarPython), click on the "Download" link of the version compatible with your SonarQube version. Upload the downloaded jar file in your SonarQube Server and put it in the directory: $SONARQUBE_HOME/extensions/plugins.If another version of the same plugin is already there, you need to remove it, since only one version of a given plugin may be available in the extensions/plugins directory.
Start SonarQube: <SONAR_HOME>\bin\windows-x86-64\StartSonar.bat
Login to SonarQube
Url: http://localhost:9000/
Credentials: admin/admin
Check the Java Plugin version: visit Administration > System > Update Center > SonarJava menu
Execute the following maven task, it generates code quality and code coverage report as well:
mvn -e -B org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar
-Dsonar.host.url=http://localhost:9000
Code coverage report
You can find more details about code coverage plugin configuration here.

SonarQube on Java8-project gives jacoco-Exception

I just downloaded the latest version, SonarQube 4.3,
then try build a java-8 project with:
mvn clean install
mvn sonar:sonar
That gives me the Exception below.
Googling, I got the impression this is an earlier issue that should have been fixed... ?
http://sonarqube.15.x6.nabble.com/Sonar-analyze-Java-1-8-project-Failure-td5023663.html
http://jira.codehaus.org/browse/SONARJAVA-482
Does SonarQube 4.3 support java-8?
Or any clue, what is the problem?
-------------------------------------------------------
T E S T S
-------------------------------------------------------
java.lang.reflect.InvocationTargetException
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:483)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
Caused by: java.lang.RuntimeException: Class java/util/UUID could not be instrumented.
at org.jacoco.agent.rt.internal_6effb9e.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:138)
at org.jacoco.agent.rt.internal_6effb9e.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:99)
at org.jacoco.agent.rt.internal_6effb9e.PreMain.createRuntime(PreMain.java:55)
at org.jacoco.agent.rt.internal_6effb9e.PreMain.premain(PreMain.java:47)
... 6 more
Caused by: java.lang.NoSuchFieldException: $jacocoAccess
at java.lang.Class.getField(Class.java:1690)
at org.jacoco.agent.rt.internal_6effb9e.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:136)
... 9 more
FATAL ERROR in native method: processing of -javaagent failed
Exception in thread "main"
I got the missing info from the SonarQube mailing-list...
To summarize:
To get Java8 maven-build working on SonarQube-4.3:
Install sonarqube-4.3, and start the server.
Login to the web-gui => Settings => Update Center => Plugins Updates => Java => Click "Upgrade to 2.2.1"
Wait a minute or so for the upgrade to complete... then shutdown+restart sonarqube.
Go back into the Upgrade Center and verify you have plugin: Java 2.2.1
To get code-coverage in Sonar, you now need to build with these commands:
mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install
mvn sonar:sonar
Reference: http://docs.codehaus.org/display/SONAR/JaCoCo+Plugin
That's it.
Here with java 11 I had this problem and I fix adding this in my gradle properties:
jacoco {
toolVersion = "0.8.4"
}
If you are running jacoco with gradle them update the jacoco to latest version.
I was also facing the similar issues and it got fixed after below changes
Java 11 and Gradle
jacoco {
toolVersion = "0.8.4"
}
I was getting the same error when mvn building a Java 1.7 project using JDK 1.8. The solution was simple: I changed the jacoco plugin version to a newer version:
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.6.201602180812</version>
(The project was using version 0.6.3.201306030806 before.)
SonarQube 4.3 embeds Java plugin 2.1 whereas http://jira.codehaus.org/browse/SONARJAVA-482 has been fixed in version 2.2. So by upgrading the Java plugin to version 2.2.1, this should fix your issue.
Setting $JAVA_HOME resolved the problem for me.
We had the same issue. What we did was re-install sonarqube 4.3 with Java 8 already installed. Then run analysis against sonar. If you already have sonar/java 7 installed previously and have ran analysis against it, sonar seems to install some plugins which causes these failures. If you re-install just sonar and java 8 (dont remove mysql database etc... so history is intact) - re run your analysis it seems to solve the problem with the plugins.
I have done the following changes to come out from the problem.I have used the two steps for it , first one is that update the jacoco in latest version along with its toolVersion , please check it once below
classpath "com.dicedmelon.gradle:jacoco-android:0.1.4"
And toolVersion is as follow
jacoco {
toolVersion = "0.8.4"
}
Please refer the link for more info Click here
And now check the second step for it in which we use the excludes = ['jdk.internal.*'] inside the testOption like below
testOptions {
unitTests.all {
jacoco {
includeNoLocationClasses = true
excludes = ['jdk.internal.*']
}
}
}
For more info in it, please check the link Click here

API analysis aborted in Eclipse due to incomplete build path

I am attempting to build the lttng portion of linuxtools by source. I downloaded and extracted the linuxtools-2.0.0 tarball. I imported the lttng subfolder to my workspace. This consisted of 28 separate projects:
org.eclipse.linuxtools.ctf
org.eclipse.linuxtools.ctf.core
org.eclipse.linuxtools.ctf.core.tests
org.eclipse.linuxtools.ctf.parser
org.eclipse.linuxtools.gdbtrace
org.eclipse.linuxtools.gdbtrace.core
org.eclipse.linuxtools.gdbtrace.core.tests
org.eclipse.linuxtools.gdbtrace.help
org.eclipse.linuxtools.gdbtrace.ui
org.eclipse.linuxtools.gdbtrace.ui.tests
org.eclipse.linuxtools.lttng.help
org.eclipse.linuxtools.lttng.releng-site
org.eclipse.linuxtools.lttng2
org.eclipse.linuxtools.lttng2.core
org.eclipse.linuxtools.lttng2.core.tests
org.eclipse.linuxtools.lttng2.kernel
org.eclipse.linuxtools.lttng2.kernel.core
org.eclipse.linuxtools.lttng2.kernel.core.tests
org.eclipse.linuxtools.lttng2.kernel.ui
org.eclipse.linuxtools.lttng2.kernel.ui.tests
org.eclipse.linuxtools.lttng2.ui
org.eclipse.linuxtools.lttng2.ui.tests
org.eclipse.linuxtools.tmf
org.eclipse.linuxtools.tmf.core
org.eclipse.linuxtools.tmf.core.tests
org.eclipse.linuxtools.tmf.help
org.eclipse.linuxtools.tmf.ui
org.eclipse.linuxtools.tmf.ui.tests
In the Problems view I am getting the following error:
API analysis aborted for 'org.eclipse.linuxtoosl.ctf.core' since its build path is incomplete
This occurs for all projects EXCEPT:
org.eclipse.linuxtools.ctf
org.eclipse.linuxtools.gdbtrace
org.eclipse.linuxtools.gdbtrace.help
org.eclipse.linuxtools.lttng.help
org.eclipse.linuxtools.lttng.releng-site
org.eclipse.linuxtools.lttng2
org.eclipse.linuxtools.lttng2.core
org.eclipse.linuxtools.lttng2.core.tests
org.eclipse.linuxtools.lttng2.kernel
org.eclipse.linuxtools.tmf
org.eclipse.linuxtools.tmf.help
Any suggestions as to why this is happening?
The same thing happened to me today and here is how it was resolved (after spending 3 hours on solving it):
Deleted all the binaries manually (from the problematic plugins),
Update the target definition,
Debug Configurations->Plug-ins->Select all->Apply->Debug
Hope that helps!

tortoise svn fails to import to repository due to Inconsistent line ending style

I was very excited to see that there is a check-style like plugin called CheckStyle-IDEA plugin for IntelliJ that i can enforce code style on the source.
I installed it using the IDE plugin repository, restarted it.
Unfortunately After pressing the check this file or check project I got the an exception (see log below).
I am using windows 7 pro,
IDEA 10.0.3 build #103.255 Build on April 2011
JDK 1.6.0_21
did anyone encountered this problem?
is there any other tool to do this job through the intelliJ IDE?
Thanks
2011-05-05 11:41:56,723 [1300492] INFO - ea.checkstyle.CheckStylePlugin - Scanning current file(s).
2011-05-05 11:41:56,727 [1300496] ERROR - style.checker.CheckFilesThread - An error occurred while scanning a file.
org.infernus.idea.checkstyle.exception.CheckStylePluginException: An error occurred during a file scan.
at org.infernus.idea.checkstyle.CheckStylePlugin.processError(CheckStylePlugin.java:409)
at org.infernus.idea.checkstyle.checker.CheckFilesThread.run(CheckFilesThread.java:72)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 1
at java.lang.String.charAt(String.java:686)
at java.util.regex.Matcher.appendReplacement(Matcher.java:703)
at java.util.regex.Matcher.replaceAll(Matcher.java:813)
at java.lang.String.replaceAll(String.java:2189)
at org.infernus.idea.checkstyle.util.ScannableFile.parentDirFor(ScannableFile.java:72)
at org.infernus.idea.checkstyle.util.ScannableFile.createTemporaryFileFor(ScannableFile.java:58)
at org.infernus.idea.checkstyle.util.ScannableFile.(ScannableFile.java:40)
at org.infernus.idea.checkstyle.checker.CreateScannableFileAction.run(CreateScannableFileAction.java:60)at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:757) at org.infernus.idea.checkstyle.checker.FileScanner.createTemporaryFile(FileScanner.java:228)
at org.infernus.idea.checkstyle.checker.FileScanner.checkPsiFile(FileScanner.java:167)
at org.infernus.idea.checkstyle.checker.FileScanner.run(FileScanner.java:80)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:770) at org.infernus.idea.checkstyle.checker.CheckFilesThread.runFileScanner(CheckFilesThread.java:39) at org.infernus.idea.checkstyle.checker.AbstractCheckerThread.processFilesForModuleInfoAndScan(AbstractCheckerThread.java:132)
at org.infernus.idea.checkstyle.checker.CheckFilesThread.run(CheckFilesThread.java:57)
Checkstyle-idea plugin is sadly rather buggy :(
You can post or view issues at http://code.google.com/p/checkstyle-idea/ and get much faster support than here.

Categories