CreateProcess error=206, The filename or extension is too long


(Ed Gutarra) #1

Good day,

I’m having touble running the example cordapp in java. There appears to be a problem with the filename or extension being too long, but I’m not sure where I would need to make the change to fix the error.

[ERROR] 11:03:26.576 [driver-pool-thread-0] DriverDSL.invoke - Background task failed:
java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.8.0_131\jre\bin\java" (in directory "C:\dev\cordapp-tutorial\build\20170823160324\NetworkMapService"): CreateProcess error=206, The filename or extension is too long
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) ~[?:1.8.0_131]
	at net.corda.core.utilities.ProcessUtilities.startJavaProcess(ProcessUtilities.kt:47) ~[corda-core-0.13.0.jar:?]
	at net.corda.core.utilities.ProcessUtilities.startJavaProcess$default(ProcessUtilities.kt:27) ~[corda-core-0.13.0.jar:?]
	at net.corda.testing.driver.DriverDSL$Companion$startOutOfProcessNode$processFuture$1.call(Driver.kt:795) ~[corda-test-utils-0.13.0.jar:?]
	at net.corda.testing.driver.DriverDSL$Companion$startOutOfProcessNode$processFuture$1.call(Driver.kt:738) ~[corda-test-utils-0.13.0.jar:?]
	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:111) [guava-21.0.jar:?]
	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:58) [guava-21.0.jar:?]
	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:75) [guava-21.0.jar:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_131]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_131]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_131]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_131]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
Caused by: java.io.IOException: CreateProcess error=206, The filename or extension is too long
	at java.lang.ProcessImpl.create(Native Method) ~[?:1.8.0_131]
	at java.lang.ProcessImpl.<init>(ProcessImpl.java:386) ~[?:1.8.0_131]
	at java.lang.ProcessImpl.start(ProcessImpl.java:137) ~[?:1.8.0_131]
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ~[?:1.8.0_131]
	... 14 more

Any help appreciated,
Ed


(Konstantinos Chalkias) #2

This is a classic Windows path-size problem. In the past (not sure if it was M13 or older) I followed these steps to resolve:

Try installing the jdk at the root of your drive, I usually use something like C:\jdk-1.8.0_131 or even shorter like C:\jdk if the problem persists.
Do the same for your corda project (and use %JAVA_HOME%\bin as the first entry in your PATH).


(Ed Gutarra) #3

By the way, this problem went away after I reverted back to branch M13. It happens when moving onto branch M14.


(James Locim) #4

I would suggest to try “Long Path Tool” program.