Jhipster 5.7 microservice failed to start on windows with error CreateProcess error=206, The filename or extension is too long

Viewed 3624

Jhipster 5.7 microservice failed to start on windows with error CreateProcess error=206, The filename or extension is too long

I have created a Jhipster micro service. when I am trying to start, I get error CreateProcess error=206, The filename or extension is too long. All other questions are suggesting to reduce classpath or usning IntelliJ. None of them explained how. Here are few things I have trying:

  1. Remove Unnecessary jar from classpath:

    • I have fresh Jhipsterap. I don't know which jar I can remove without breaking it.
  2. Use IntelliJ

    • I am running the service from command line.
  3. Move your project or maven repo to "c:" drive to make path short.

    • I can't. The repo is huge and is being shared.

Let me know if there is any other solution for this problem.

Thanks

2 Answers

There is fairly simple way of reducing classpath on windows, if you can not move your local repo. Here is how:

Open command prompt and execute this command

mklink /J c:\repo C:\<long path to your maven repository>

This will create a link to your maven repository. Now run the service like this:

mvn -Dmaven.repo.local=c:\repo spring-boot:run

Thats all. Now your classpath will be reduced by around 10000 characters (tried for jhipster gateway app).

Good luck.

Related