Closed hundredplusfive closed 3 years ago
If I use your .yo-rc.json
to create a project, it fails to compile.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project gatewayapp: Compilation failure: Compilation failure:
[ERROR] /Users/mraible/15507/src/main/java/com/gwa/config/WebConfigurer.java:[12,36] package org.springframework.data.web does not exist
[ERROR] /Users/mraible/15507/src/main/java/com/gwa/config/WebConfigurer.java:[13,36] package org.springframework.data.web does not exist
I believe this is caused by having no database:
"devDatabaseType": "no",
"prodDatabaseType": "no",
If I change these to use PostgreSQL, there's a single compile error:
[ERROR] /Users/mraible/15507/src/main/java/com/gwa/web/rest/AccountResource.java:[67,43] cannot find symbol
[ERROR] symbol: variable Principal
[ERROR] location: class com.gwa.web.rest.AccountResource
If I fix this, the test fails to compile:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile (default-testCompile) on project gatewayapp: Compilation failure: Compilation failure:
[ERROR] /Users/mraible/15507/src/test/java/com/gwa/web/rest/AccountResourceIT.java:[50,9] cannot find symbol
[ERROR] symbol: variable webTestClient
[ERROR] location: class com.gwa.web.rest.AccountResourceIT
[ERROR] /Users/mraible/15507/src/test/java/com/gwa/web/rest/AccountResourceIT.java:[63,9] cannot find symbol
[ERROR] symbol: variable webTestClient
[ERROR] location: class com.gwa.web.rest.AccountResourceIT
If I fix that (by changing webTestClient
to accountWebTestClient
), it startups up just fine.
----------------------------------------------------------
Application 'gatewayapp' is running! Access URLs:
Local: http://localhost:8088/
External: http://127.0.0.1:8088/
Profile(s): [dev, api-docs]
----------------------------------------------------------
Since there are compilation issues, I tried the following .yo-rc.json
with the latest code from the main
branch.
{
"generator-jhipster": {
"blueprints": [],
"otherModules": [],
"applicationType": "gateway",
"baseName": "gatewayapp",
"jhipsterVersion": "7.1.0",
"skipClient": false,
"skipServer": false,
"skipUserManagement": true,
"skipCheckLengthOfIdentifier": false,
"skipFakeData": false,
"jhiPrefix": "jhi",
"entitySuffix": "",
"dtoSuffix": "DTO",
"testFrameworks": [],
"pages": [],
"creationTimestamp": 1623998011866,
"serviceDiscoveryType": "eureka",
"reactive": true,
"authenticationType": "jwt",
"packageName": "com.gwa",
"serverPort": "8088",
"cacheProvider": "no",
"enableHibernateCache": false,
"databaseType": "sql",
"buildTool": "maven",
"serverSideOptions": [],
"websocket": false,
"searchEngine": false,
"messageBroker": false,
"enableSwaggerCodegen": false,
"clientFramework": "angularX",
"withAdminUi": true,
"clientTheme": "none",
"enableTranslation": true,
"nativeLanguage": "en",
"packageFolder": "com/gwa",
"jwtSecretKey": "YourJWTSecretKeyWasReplacedByThisMeaninglessTextByTheJHipsterInfoCommandForObviousSecurityReasons",
"devDatabaseType": "postgresql",
"prodDatabaseType": "postgresql",
"clientPackageManager": "npm",
"clientThemeVariant": "",
"languages": ["en"],
"devServerPort": 4200
}
}
This fails to compile too. :(
I'm going to change this issue's title to no database is failing. This seems to be confirmed by our daily builds.
https://github.com/hipster-labs/jhipster-daily-builds/actions/runs/1122400940
Hi,
I have fixed the issue. would like to raise the pull request. please give permission
@yuvarajsanjeevi you don't need any permission to submit a pull request. Have you read https://github.com/jhipster/generator-jhipster/blob/main/CONTRIBUTING.md
Overview of the issue
I am trying to create a API gateway application based off Spring Cloud API gateway. However, upon running the command "mvnw", the build succeeded with the following compilation error.
Error thrown
Motivation for or Use Case
The error states that it cannot find the CLASS file for "org.springframework.data.domain.Pageable". Which is indeed true, I couldn't find any JAR or CLASS following that pathname.
However, I checked it up online, it seems that this particular CLASS file is part of a JAR under "org.springframework.data.spring-data-commons". As a matter of fact, I have that JAR and within it contains the problematic CLASS file.
Reproduce the error
I followed this tutorial on setting up a Spring Cloud API gateway.
Files edited/created
*prior to step 1 This compilation issue came about
src/main/java/com/mycompany/myapp/config/WebConfigurer.java:[13,36] package org.springframework.data.web does not exist
I looked into the WebConfigurer.java file, there were some comment pointing to a function mentioning "TODO: remove when this is supported in spring-boot"... thus, I commented away and the build progressed till the current juncture of this post
Related issues
NA
Suggest a Fix
As highlighted by the "caused by". I believe the solution, is to modify the file that dictates the errored path and re-point to the correct dependency.
JHipster Version(s)
Currently using 7.1 but this issue occurred in 7.0.1 too.
JHipster configuration
jhipster info INFO! Using JHipster version installed locally in current project's node_modules Welcome to the JHipster Information Sub-Generator
JHipster Version(s)
JHipster configuration, a
.yo-rc.json
file generated in the root folder.yo-rc.json file
JDL for the Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryJDL entity definitions
Environment and Tools
openjdk version "11.0.3" 2019-04-16 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.3+7) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.3+7, mixed mode)
node: v14.17.0
npm: 6.14.13
No change to package.json was detected. No package manager install will be executed. Congratulations, JHipster execution is complete! Sponsored with ❤️ by @oktadev.
Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryNA
Browsers and Operating System
Browser: Chrome Operating System: Windows 10