Closed RiceRiceBaby closed 2 years ago
The problem is not the path itself. The problem is, that the arguments are too long for windows. You can try to execute the application e.g. via intellij and define a classpath jar, such that the command line arguments are much shorter (and not "every single jar dependency").
Also see https://github.com/spring-projects/spring-boot/issues/17766 and https://stackoverflow.com/questions/56897925/cannot-run-program-createprocess-error-206-the-filename-or-extension-is-too-lon
Not a JHipster bug. Should be discussed at spring-boot or stackoverflow.
Overview of the issue
I get the following error when I run maven on gateway after using jhipster jdl import to generate my gateway:
Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.6.3:run (default-cli) on project gateway: Could not exec java: Cannot run program "C:\Program Files\Java\jdk-17.0.2\bin\java.exe" (in directory "C:\gateway"): CreateProcess error=206, The filename or extension is too long -> [Help 1]
Motivation for or Use Case
I put the project directly under my c drive made sure the project name is short and it is still giving me this error.
I generated my gateway using the following instructions provided in this link:
https://developer.okta.com/blog/2018/03/01/develop-microservices-jhipster-oauth
JHipster Version(s)
Version 7.7 (latest)
JHipster configuration
Here is my yo.rc:
{ "generator-jhipster": { "applicationIndex": 0, "applicationType": "gateway", "authenticationType": "oauth2", "baseName": "gateway", "blueprints": [], "buildTool": "maven", "cacheProvider": "no", "clientFramework": "angularX", "clientPackageManager": "npm", "clientTheme": "none", "clientThemeVariant": "", "creationTimestamp": 1647489603765, "databaseType": "sql", "devDatabaseType": "h2Disk", "devServerPort": 4200, "dtoSuffix": "DTO", "enableGradleEnterprise": false, "enableHibernateCache": false, "enableSwaggerCodegen": false, "enableTranslation": true, "entities": ["FileManagement", "FileManagementType"], "entitySuffix": "", "gradleEnterpriseHost": "", "jhiPrefix": "jhi", "jhipsterVersion": "7.7.0", "languages": ["en"], "lastLiquibaseTimestamp": 1647489723000, "messageBroker": false, "nativeLanguage": "en", "otherModules": [], "packageFolder": "com/danielli/gateway", "packageName": "com.danielli.gateway", "pages": [], "prodDatabaseType": "postgresql", "reactive": true, "searchEngine": "elasticsearch", "serverPort": "8080", "serviceDiscoveryType": "eureka", "skipCheckLengthOfIdentifier": false, "skipFakeData": false, "skipUserManagement": true, "testFrameworks": ["protractor"], "websocket": false, "withAdminUi": true } }
Here is my JDL:
application { config { baseName gateway, packageName com.danielli.gateway, applicationType gateway, authenticationType oauth2, prodDatabaseType postgresql, searchEngine elasticsearch, serviceDiscoveryType eureka, testFrameworks [protractor] } entities * }
entity FileManagement { name String, parentDirectoryId Long, }
entity FileManagementType { name String }
relationship ManyToOne { FileManagement{fileManagementType} to FileManagementType }
paginate FileManagement with pagination
Browsers and Operating System
Windows Server 2022