youdevise/test-driven-detectors4findbugs — Issue #5: RuntimeException: Failed to setup FindBugs dependencies for testing caused by FileNotFoundException
Author: heuermh
Created: 2012-02-07 17:16:44+00:00
State: open

If I run

$ mvn test

on

https://github.com/tomfitzhenry/findbugs-guice

in cygwin, several unit tests fail/error with

Caused by: java.lang.RuntimeException: Failed to setup FindBugs dependencies for testing.
at com.youdevise.fbplugins.tdd4fb.DetectorRunner.(DetectorRunner.java:70)
at com.youdevise.fbplugins.tdd4fb.DetectorRunner.(DetectorRunner.java:56)
at com.youdevise.fbplugins.tdd4fb.DetectorRunner$Singleton.(DetectorRunner.java:63)
... 34 more
Caused by: java.io.FileNotFoundException: C:\cygwin\home\xxx\working\findbugs-guice\C (The system cannot find the file specified)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:127)
at java.util.zip.ZipFile.(ZipFile.java:143)
at edu.umd.cs.findbugs.classfile.impl.ZipFileCodeBase.(ZipFileCodeBase.java:53)
at edu.umd.cs.findbugs.classfile.impl.ZipCodeBaseFactory.countUsingZipFile(ZipCodeBaseFactory.java:92)
at edu.umd.cs.findbugs.classfile.impl.ZipCodeBaseFactory.makeZipCodeBase(ZipCodeBaseFactory.java:46)
at edu.umd.cs.findbugs.classfile.impl.ClassFactory.createFilesystemCodeBase(ClassFactory.java:97)
at edu.umd.cs.findbugs.classfile.impl.FilesystemCodeBaseLocator.openCodeBase(FilesystemCodeBaseLocator.java:75)
at com.youdevise.fbplugins.tdd4fb.DetectorRunner.addAuxCodeBasesFromClassPath(DetectorRunner.java:111)
at com.youdevise.fbplugins.tdd4fb.DetectorRunner.setUpStaticDependenciesWithinFindBugs(DetectorRunner.java:92)
at com.youdevise.fbplugins.tdd4fb.DetectorRunner.(DetectorRunner.java:68)
... 36 more

nonFinalFieldInjectionIsNotReported(uk.me.tom_fitzhenry.findbugs.guice.FinalFieldInjectionDetectorTest) Time elapsed: 0 sec <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class com.youdevise.fbplugins.tdd4fb.DetectorRunner$Singleton

It appears that FilesystemCodeBaseLocator.openCodeBase is attempting to create an invalid path.

$ mvn -v
Apache Maven 3.0.3 (r1075438; 2011-02-28 11:31:09-0600)
Maven home: C:\cygwin\home\xxx\bin\apache-maven-3.0.3
Java version: 1.6.0_30, vendor: Sun Microsystems Inc.
Java home: C:\jdk1.6.0_30\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows xp", version: "5.1", arch: "x86", family: "windows"