Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Don't fail in case of missing output folders #38

Closed
nelsot opened this issue Jan 24, 2013 · 8 comments
Closed

Don't fail in case of missing output folders #38

nelsot opened this issue Jan 24, 2013 · 8 comments
Assignees
Labels
Milestone

Comments

@nelsot
Copy link

nelsot commented Jan 24, 2013

I am having a problem with a JUnit plugin test. Eclemma fails while calculating coverage stats.

I guess the problem is somehow related to #21
I synchronized the project with filesystem as it was advised, but alas, the result is the same.

Any advice please?
Thank you

eclipse.buildId=M20120914-1540
java.version=1.6.0_29
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_CH
Command-line arguments: -os win32 -ws win32 -arch x86_64

Error
Thu Jan 24 12:07:44 CET 2013
Error while analyzing package fragment root src at null (code 5007).

java.lang.NullPointerException
at com.mountainminds.eclemma.internal.core.analysis.ResourceTreeWalker.walk(ResourceTreeWalker.java:41)
at com.mountainminds.eclemma.internal.core.analysis.PackageFragementRootAnalyzer.analyzeInternal(PackageFragementRootAnalyzer.java:63)
at com.mountainminds.eclemma.internal.core.analysis.PackageFragementRootAnalyzer.analyze(PackageFragementRootAnalyzer.java:46)
at com.mountainminds.eclemma.internal.core.analysis.SessionAnalyzer.processPackageFragmentRoot(SessionAnalyzer.java:100)
at com.mountainminds.eclemma.internal.core.analysis.SessionAnalyzer.processSession(SessionAnalyzer.java:80)
at com.mountainminds.eclemma.internal.core.JavaCoverageLoader$LoadSessionJob.run(JavaCoverageLoader.java:81)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

@marchof
Copy link
Member

marchof commented Jan 24, 2013

The reason might be an particular classpath setting. Can you please reduce the the coverage scope and narrow down the problem to a particular Java project? It would help a lot to fix this if you could identify the project which is causing the problem and provide its .classpath file.

@ghost ghost assigned marchof Jan 27, 2013
@nelsot
Copy link
Author

nelsot commented Jan 30, 2013

I found the problem was not in the test project itself.
There was another project in my workspace which was causing this problem. (It took me awhile to figure out which one)
As soon as I closed this project Eclemma ran flawlessly.

What is peculiar about this offending project it is a plugin project with no output directory defined in build.properties. I guess this causes the error above.

Thank you.

@marchof
Copy link
Member

marchof commented Jan 30, 2013

Can you please provide the content of the ".classpath" file of the project you closed? The build.properties file is not considered by EclEmma.

@nelsot
Copy link
Author

nelsot commented Jan 30, 2013

Sorry, here is the correct one:
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

@marchof
Copy link
Member

marchof commented Jan 30, 2013

Interesting, may I ask you tho check this:

  1. Are there any classpath errors shown for this project?
  2. Do you have PDE installed in your Eclipse?
  3. Does the folder /bin exist on the file system?

I want to understand the root cause to provide a proper fix.

@nelsot
Copy link
Author

nelsot commented Jan 31, 2013

  1. No, no errors (there are not classes in the project as I mention earlier)
  2. Yes, PDE is there
  3. No, there is no /bin on the filesystem... that's odd. Maybe the lack of classes or other resources causes this...

Please let me know if you need more details.
Thank you!

@marchof
Copy link
Member

marchof commented Jan 31, 2013

Ok, then we have a good explanation for the problem. I will harden EclEmma for such situations.

@marchof
Copy link
Member

marchof commented Jan 31, 2013

Fixed on master. You can test from this update site: http://download.eclipselab.org/eclemma/trunk/update

@marchof marchof closed this as completed Jan 31, 2013
@jacoco jacoco locked and limited conversation to collaborators Jan 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants