-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Long path error on Windows when using Gradle with JHipster 6.0.0 (similar to Issue #4323) #9713
Comments
You are right we removed it as it looked like to be okay with Windows 10. Have you checked adding the workaround into your build.gradle to fix the problem ? |
As asked by Matt, if you add the deleted code into your build.gradle, does it fix the problem? If yes, we have different behaviour here, with Windows 10:
|
I really hoped it would be solved with windows 10. Maybe it has something to with a patch release or so? |
I tried adding in the snippets that were removed, but I still got an error. My attempts to put a pathingJar or classpathJar task back into the build.gradle have not helped so far. If I am remembering correctly, I ended up with a different error after adding the pathingJar back in. It was saying that java.exe exited with a non-zero exit code, but despite turning on stacktrace and debug args, I couldn't see what java.exe command was executed or the console output from java.exe. So, it seems adding the old snippets back just trades one error for another. I also double-checked the registry modification workaround, and restarted my PC after enabling LongPaths in Windows. My Windows 10 is fully up to date with patches. I plan to delve into this issue more today if time permits, and I will report my findings. |
@pvliss can you have a look as it works for you without the workaround. Is that still the case? |
According to this article, CreateProcess() on Windows has an absolute upper limit of 32767 characters. My java launch command is 35606 characters in length. I think this 32767 figure is a separate limit from the 260 character Path limit. The Windows registry modification appears to remove only the 260 character path limit, but does not fix the hard limit of 32767 characters, so it seems a pathingJar is still needed. I could be wrong about the hard upper limit of 32767 chars being present in Windows 10. Microsoft mentions this limit here, but it doesn't specifically mention Windows 10. My folders aren't nested very deeply and I chose only a few extra libraries for my project, so I have a feeling many more people will run into this problem. I believe a pathingJar is the only solution, so I'm still looking into adding that back. |
@sometxdude More details on the problem can be be found at this issue. Since I was not able to reproduce the problem can you please also try the other workarounds referenced there, e.g using the plugin: https://github.com/viswaramamoorthy/gradle-util-plugins or its fork: https://github.com/viswaramamoorthy/gradle-util-plugins |
@sometxdude Also, can you share your configuration and any extra dependencies that you might be using which can help us replicate? |
@pvliss I tried the plugin at https://github.com/viswaramamoorthy/gradle-util-plugins and it fixed the issue. Thanks for mentioning that. I am leaving my environment info here should anyone need to reproduce the error. My environment consists of the following:
JHipster Answers: Do you want to use Hibernate 2nd level cache? Yes Running gradlew.bat from the commandline will then result in a "Createprocess error=206 the filename or extension is too long" error. The https://github.com/viswaramamoorthy/gradle-util-plugins plugin fixes the issue. |
@sometxdude Nice to know it works and thanks a lot for the extra info!!! Will try to replicate within the next couple of days @atomfrede Maybe we should enable the plugin by default instead of the workaround? |
@pvliss I will also try to reproduce it over the weekend (my windows is just for gaming so nothing installed yet). If the plugin works we can give it at try, but as seems not to be very well maintained I fear we will have more problems when gradle 6 is released (and we still have some deprecation warnings currently). |
@atomfrede You are right. It is not really maintained and this might pose a problem in the future. Will need to revisit the workaround though as it does not work either |
@pvliss Going to have look at this tonight |
So the default application works just fine. Adding elastic search and websockets breaks the limit. I have a working solution. Doing a pr tomorrow. |
It seems like the long path error associated with Windows/Gradle has returned.
Issue #4323 explains the error.
It seems the workaround for this error was removed on April 19th, 2019 in the following commit:
73e50ba#diff-2c3f53e6e847061a8ab6ba212e021632
I'm using Windows 10, and I tried using the registry key modification as mentioned here -> #9572 (comment)
However, I am still getting the "CreateProcess error=206, The filename or extension is too long" message whenever I try to launch my app.
The text was updated successfully, but these errors were encountered: