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: 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( ~[?: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$ ~[corda-test-utils-0.13.0.jar:?]
	at net.corda.testing.driver.DriverDSL$Companion$startOutOfProcessNode$processFuture$ ~[corda-test-utils-0.13.0.jar:?]
	at$TrustedFutureInterruptibleTask.runInterruptibly( [guava-21.0.jar:?]
	at [guava-21.0.jar:?]
	at [guava-21.0.jar:?]
	at java.util.concurrent.Executors$ [?:1.8.0_131]
	at [?:1.8.0_131]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201( [?:1.8.0_131]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ [?:1.8.0_131]
	at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:1.8.0_131]
	at java.util.concurrent.ThreadPoolExecutor$ [?:1.8.0_131]
	at [?:1.8.0_131]
Caused by: 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>( ~[?:1.8.0_131]
	at java.lang.ProcessImpl.start( ~[?:1.8.0_131]
	at java.lang.ProcessBuilder.start( ~[?:1.8.0_131]
	... 14 more

Any help appreciated,

(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.