[BUG] A space in the file path of a dependency causes a FileNotFoundException.

522 views
Skip to first unread message

Bob Brinks

unread,
May 6, 2015, 11:00:28 AM5/6/15
to cu...@googlegroups.com
Is this the correct forum for posting bugreports? If not where should i leave this.

When I run maven integration-test that includes cucumber I get a FileNotFoundException when the file path to a dependency includes a Space (" "). I posted the stacktrace below.
I think it might be related to cucumber using %20 instead of a space in the filenames.

Some environmental info:
  • Running on Windows 8
  • Cucumber 1.2.2
  • In combination with cukespace(1.6.0) and arquillian
  • Save the whales!
ERROR!
cucumber.runtime.CucumberException: java.io.FileNotFoundException: D:\Path%20with%20spaces\Dependency.jar (The system cannot find the path specified)
at cucumber.runtime.io.ZipResourceIteratorFactory.createIterator(ZipResourceIteratorFactory.java:41) at cucumber.runtime.io.ZipThenFileResourceIteratorFactory.createIterator(ZipThenFileResourceIteratorFactory.java:21) at cucumber.runtime.io.DelegatingResourceIteratorFactory.createIterator(DelegatingResourceIteratorFactory.java:49) at cucumber.runtime.io.ClasspathResourceIterable.iterator(ClasspathResourceIterable.java:33) at cucumber.runtime.io.ResourceLoaderClassFinder.getDescendants(ResourceLoaderClassFinder.java:22) at cucumber.runtime.java.MethodScanner.scan(MethodScanner.java:34) at cucumber.runtime.java.JavaBackend.loadGlue(JavaBackend.java:89) at cucumber.runtime.Runtime.<init>(Runtime.java:90) at cucumber.runtime.Runtime.<init>(Runtime.java:68) at cucumber.runtime.Runtime.<init>(Runtime.java:64) at cucumber.api.junit.Cucumber.createRuntime(Cucumber.java:78) at cucumber.api.junit.Cucumber.<init>(Cucumber.java:58) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:29) at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:21) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:26) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:262) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) Caused by: java.io.FileNotFoundException: D:\Path%20with%20spaces\Dependency.jar (The system cannot find the path specified)
	at java.util.zip.ZipFile.open(Native Method)
	at java.util.zip.ZipFile.<init>(ZipFile.java:215)
	at java.util.zip.ZipFile.<init>(ZipFile.java:145)
	at java.util.zip.ZipFile.<init>(ZipFile.java:116)
	at cucumber.runtime.io.ZipResourceIterator.<init>(ZipResourceIterator.java:20)
	at cucumber.runtime.io.ZipResourceIteratorFactory.createIterator(ZipResourceIteratorFactory.java:39)
	at cucumber.runtime.io.ZipThenFileResourceIteratorFactory.createIterator(ZipThenFileResourceIteratorFactory.java:21)
	at cucumber.runtime.io.DelegatingResourceIteratorFactory.createIterator(DelegatingResourceIteratorFactory.java:49)
	at cucumber.runtime.io.ClasspathResourceIterable.iterator(ClasspathResourceIterable.java:33)
	at cucumber.runtime.io.ResourceLoaderClassFinder.getDescendants(ResourceLoaderClassFinder.java:22)
	at cucumber.runtime.java.MethodScanner.scan(MethodScanner.java:34)
	at cucumber.runtime.java.JavaBackend.loadGlue(JavaBackend.java:89)
	at cucumber.runtime.Runtime.<init>(Runtime.java:90)
	at cucumber.runtime.Runtime.<init>(Runtime.java:68)
	at cucumber.runtime.Runtime.<init>(Runtime.java:64)
	at cucumber.api.junit.Cucumber.createRuntime(Cucumber.java:78)
	at cucumber.api.junit.Cucumber.<init>(Cucumber.java:58)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:29)
	at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:21)
	at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
	at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
	at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
	at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:26)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:262)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)

Jonathan Gagné

unread,
Aug 3, 2015, 11:02:31 AM8/3/15
to Cukes
I have the same bug, caused by my user name (Default User). I dont have admin rights to rename, Its VERY problematic.

aslak hellesoy

unread,
Aug 3, 2015, 11:07:40 AM8/3/15
to Cucumber Users
On Mon, Aug 3, 2015 at 9:50 AM, Jonathan Gagné <cyanb...@gmail.com> wrote:
I have the same bug, caused by my user name (Default User). I dont have admin rights to rename, Its VERY problematic.

Hi Jonathan,

I'm sorry you work in such a problematic place.
I recommend always trying the latest version. This bug was fixed in v1.2.3, released a month ago.


Aslak

--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages