Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
kaffel
@kaffelmedhoussem:matrix.org
[m]
i am using angular and i don t know how to redirect
3 replies
Vlad Mazin
@vmazin
With v7, cannot login into microservices gateway w/o DB - default admin/admin returns 401 Unauthorized. Here is json:
{
"generator-jhipster": {
"blueprints": [],
"otherModules": [],
"applicationType": "gateway",
"baseName": "egdbcgw",
"jhipsterVersion": "7.0.0",
"skipClient": false,
"skipServer": false,
"skipUserManagement": true,
"skipCheckLengthOfIdentifier": false,
"skipFakeData": false,
"jhiPrefix": "jhi",
"entitySuffix": "",
"dtoSuffix": "DTO",
"testFrameworks": [],
"pages": [],
"creationTimestamp": 1617142128017,
"serviceDiscoveryType": "eureka",
"reactive": true,
"authenticationType": "jwt",
"packageName": "com.aaa.bbb.ccc.gw",
"serverPort": "8090",
"cacheProvider": "no",
"enableHibernateCache": false,
"databaseType": "no",
"buildTool": "maven",
"serverSideOptions": [],
"websocket": false,
"searchEngine": false,
"messageBroker": false,
"enableSwaggerCodegen": false,
"clientFramework": "react",
"withAdminUi": true,
"clientTheme": "darkly",
"clientThemeVariant": "primary",
"enableTranslation": false,
"nativeLanguage": "en",
"packageFolder": "com/aaa/bbb/ccc/gw",
"jwtSecretKey": "XXXXXXXXXXXXXXXXXXXXXXXXX=",
"devDatabaseType": "no",
"prodDatabaseType": "no",
"clientPackageManager": "npm",
"languages": ["en"]
}
}
HaithemOtt
@HaithemOtt
@kaffelmedhoussem:matrix.org you can navigate after login success (angular) using this.router.navigate(['your route']); in login() method under src\main\webapp\app\shared\login
kaffel
@kaffelmedhoussem:matrix.org
[m]
@HaithemOtt: I changed
before
but it won t be changed
Ghost
@ghost~606575c26da037398478e429
jhipster 在已有的实体上加关联关系怎么搞 求教,自己研究了两星期还没好
1 reply
Jérôme
@JeromeRider

Hi, I'm having trouble building a project since latest 7.0 release.
After multiple tries, when I run mvnw install -DskipTests as I always did before, there is a conflict :

WARNING in DefinePlugin Conflicting values for 'process.env.NODE_ENV' 1 WARNING in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details) webpack 5.26.3 compiled with 2 warnings in 24066 ms

Then when I import my JDL, there are another conflicts :

`Error: Cannot find module 'ajv/dist/compile/context'
Require stack:

  • C:.........\La cache d'art\La_cache_d'art_BACK\node_modules\ajv-formats\dist\limit.js
  • C:.........\La cache d'art\La_cache_d'art_BACK\node_modules\ajv-formats\dist\index.js
  • C:.........\La cache d'art\La_cache_d'art_BACK\node_modules\conf\dist\source\index.js
  • C:.........\La cache d'art\La_cache_d'art_BACK\node_modules\generator-jhipster\generators\statistics.js
  • C:.........\La cache d'art\La_cache_d'art_BACK\node_modules\generator-jhipster\generators\app\prompts.js
  • C:.........\La cache d'art\La_cache_d'art_BACK\node_modules\generator-jhipster\generators\app\index.js
  • C:.........\La cache d'art\La_cache_d'art_BACK\node_modules\yeoman-environment\lib\store.js
  • C:.........\La cache d'art\La_cache_d'art_BACK\node_modules\yeoman-environment\lib\environment.js
  • C:.........\La cache d'art\La_cache_d'art_BACK\node_modules\generator-jhipster\cli\environment-builder.js
  • C:.........\La cache d'art\La_cache_d'art_BACK\node_modules\generator-jhipster\cli\program.js
  • C:.........\La cache d'art\La_cache_d'art_BACK\node_modules\generator-jhipster\cli\cli.js
  • C:......\AppData\Roaming\npm\node_modules\generator-jhipster\cli\jhipster.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (C:\Users\jerome\eclipse-workspace\La cache d'art\La_cache_d'art_BACK\node_modules\ajv-formats\dist\limit.js:4:19)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19) {
    code: 'MODULE_NOT_FOUND'`

What I already tried to overcome this :

  • Build the project on older version, 6.9 per exemple -> doesn't work either

I figured out there are a lot of issues reported because of this release so I tried solutions from this thread jhipster/generator-jhipster#14492, but none worked...
I'm personnally out of solutions and can't build my project so far. Is there a crew working on it ? Are there solutions to build a project before a fix ?

Thank yall !

3 replies
kaffel
@kaffelmedhoussem:matrix.org
[m]
login(): void {
this.loginService
.login({
username: this.loginForm.get('username')!.value,
password: this.loginForm.get('password')!.value,
rememberMe: this.loginForm.get('rememberMe')!.value,
})
.subscribe(
() => {
this.authenticationError = false;
this.activeModal.close();
if (
this.router.url === '/account/register' ||
this.router.url.startsWith('/account/activate') ||
this.router.url.startsWith('/account/reset/')
) {
this.router.navigate(['/leads']);
}
},
() => (this.authenticationError = true)
);
}
Tony Trung Thanh Vo
@tonytvo
generate the application with jhipster 7.0.0 and I can't start microservice application with ./gradlew
9 replies
Ghost
@ghost~606575c26da037398478e429
jhipster 怎样升级最新版本
kaffel
@kaffelmedhoussem:matrix.org
[m]
run your application at the same time
Tony Trung Thanh Vo
@tonytvo
image.png
image.png
kaffel
@kaffelmedhoussem:matrix.org
[m]
Can you secreen the cmd ?
Tony Trung Thanh Vo
@tonytvo
image.png
actually, I think it's working now ->
much appreciated for your help
kaffel
@kaffelmedhoussem:matrix.org
[m]
Anytime 😊
Tony Trung Thanh Vo
@tonytvo
actually, now I ran into the issue with jacocoreport
image.png
looks like for some reasons it doesn't generate cucumberTest.exec
Tony Trung Thanh Vo
@tonytvo
this seems to fix it -> gradle/gradle#5898
jacocoTestReport {
getExecutionData().setFrom(fileTree(buildDir).include("/jacoco/*.exec"))
}
alex440440
@alex440440
How do I get the updated version that includes fix for the issue
jhipster/generator-jhipster#14492
I see that pull request was merged 2 days ago but if I run
npm install -g generator-jhipster
the version is 7.0.0
2 replies
Knowings R&D
@knowings
Hi all, noob question: Why original URL is lost on a JHipster stack using Keycloak ? If anyone has a clue ?
1 reply
udarapathirage
@udarapathirage
How to check for authority in a submenu. ex. App.tsx
HaithemOtt
@HaithemOtt

@kaffelmedhoussem:matrix.org i remember i did some thing similar in the past and it worked perfectly this is an example, i hope will help you : login(): void {
this.loginService
.login({
username: this.loginForm.get('username')!.value,
password: this.loginForm.get('password')!.value,
rememberMe: this.loginForm.get('rememberMe')!.value,
})
.subscribe(
() => {
this.authenticationError = false;
this.activeModal.close();
if (
this.router.url === '/account/register' ||
this.router.url.startsWith('/account/activate') ||
this.router.url.startsWith('/account/reset/')
) {
this.router.navigate(['/leads']);
}
},
() => (this.authenticationError = true)
);

 // get user account
 this.authSubscription = this.accountService.getAuthenticationState().subscribe(account => {
  this.account = account;
  if (this.account) {
    this.userRole = this.account.authorities[0];
    if(this.userRole === 'ROLE_ADMIN'){
      this.router.navigate(['your-route']);
    } 
  }    
});

}

don't forget to handle a null account exception
kaffel
@kaffelmedhoussem:matrix.org
[m]
@HaithemOtt Thanks i ll try it
Guys i faced a new problem
i download elasticsearch and i add it to my environment variables but it dosen t work
package org.elasticsearch.index.query does not exist
org.springframework.data.elasticsearch.annotations does not exist
Florian RUEN
@EYESR_gitlab
@kaffelmedhoussem:matrix.org Maybe this is caused by your Spring or Gradle version. Try to search if your dependencies is supported by your current version. I'm facing a similar issue when adding oauth2 on too old spring version
Otherwise, hello to everyone, I got a question today : there is a way to add multi tenancy on existing (and complex) jhipster project, without remove all changes and so one ?
Kirill Marchuk
@62mkv

hello everyone. I am trying to upgrade my JH Angular-based monolith app from 6.10.1 to 7.0.1.

the "gradle webapp" is failing with:

[error] Error: Cannot find module 'webpack-dev-server'
Require stack:
- C:\project-root\node_modules\@angular-devkit\build-webpack\src\webpack-dev-server\index.js
- C:\project-root\node_modules\@angular-devkit\build-webpack\src\index.js
- C:\project-root\node_modules\@angular-devkit\build-angular\src\browser\index.js
- C:\project-root\node_modules\@angular-devkit\build-angular\src\index.js
- C:\project-root\node_modules\@angular-builders\custom-webpack\dist\browser\index.js
- C:\project-root\node_modules\@angular\cli\node_modules\@angular-devkit\architect\node\node-modules-architect-host.js
- C:\project-root\node_modules\@angular\cli\node_modules\@angular-devkit\architect\node\index.js
- C:\project-root\node_modules\@angular\cli\models\architect-command.js
- C:\project-root\node_modules\@angular\cli\commands\build-impl.js
- C:\project-root\node_modules\@angular-devkit\schematics\tools\export-ref.js
- C:\project-root\node_modules\@angular-devkit\schematics\tools\index.js
- C:\project-root\node_modules\@angular\cli\utilities\json-schema.js
- C:\project-root\node_modules\@angular\cli\models\command-runner.js
- C:\project-root\node_modules\@angular\cli\lib\cli\index.js
- C:\project-root\node_modules\@angular\cli\lib\init.js
- C:\project-root\node_modules\@angular\cli\bin\ng
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
webpack-dev-server was a devDependency in 6.10.1, but seems not to be anymore with 7.0.1
Kirill Marchuk
@62mkv
probably I need to create a bug report, idk
Kirill Marchuk
@62mkv
@wmarques before I do that, maybe you have some thoughts on this? I see there was quite an effort by yourself, related to this (as I believe, might be wrong ofc)
Kirill Marchuk
@62mkv
very strange.. in the new JH 7.0 Angular app, this problem does not manifest itself - webpack-dev-server is installed into node_modules over there
Kirill Marchuk
@62mkv
ok, so that is somehow related to my app using ngx-monaco-editor - if I remove it from dependencies, the webpack-dev-server is present under node_modules
kutabale
@kutabale
Can Okta and UAA coexist. I just want to use Okta only for authentication.
Julien Fougere
@jfougere

I saw that in JHipster 7.0.0 support for UAA was dropped in jhipster/generator-jhipster#13081

What does that mean exactly for users having a UAA server ? We are stuck on JHipster 6 ?
We should migrate to Keycloak ?

kutabale
@kutabale
My current architecture is as described here https://www.jhipster.tech/using-uaa/#-using-jhipster-uaa-for-microservice-security on jhipster 5. Now i need to integrate with Okta for identity management. What would like know is it possible to convert Jhipster UAA to use okta instead of being the oauth.
jasser-chaoued
@jasser-chaoued
hello everyone ,i'm using jhipster 7.0.1 and i couldn't find the ng-jhipster (looking for the pipe ) and i was wondering how to use pure filter or any other pipe now
Gamal Alkzaz
@galkzaz

Hi everyone Great project really
i'm using jhipster 7.0.1 i tried to run the example on this site Full-Stack-Development-with-JHipster-Second-Edition i was able to generate everything but when i tried to run it using docker compose many errors happens first
When trying to generate docker image for the gatway(store) using ./gradlew bootJar -Pprod jibDockerBuild compile fail with error

> Task :compileJava
Note: Hibernate JPA 2 Static-Metamodel Generator 5.4.29.Final
/mnt/04A61646A616391E/dev/studing/programming/java/spring/Full-Stack-Development-with-JHipster/chapter09/store/src/main/java/com/mycompany/store/security/jwt/JWTFilter.java:43: error: cannot find symbol
        String jwt = request.getParameter(AUTHORIZATION_TOKEN);
                            ^
  symbol:   method getParameter(String)
  location: variable request of type ServerHttpRequest
Note: /mnt/04A61646A616391E/dev/studing/programming/java/spring/Full-Stack-Development-with-JHipster/chapter09/store/src/main/java/com/mycompany/store/security/jwt/JWTFilter.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /mnt/04A61646A616391E/dev/studing/programming/java/spring/Full-Stack-Development-with-JHipster/chapter09/store/src/main/java/com/mycompany/store/security/jwt/TokenProvider.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error

> Task :compileJava FAILED

FAILURE: Build failed with an exception.

I guess the problem here in file store/src/main/java/com/mycompany/store/security/jwt/JWTFilter.java

 private String resolveToken(ServerHttpRequest request) {
        String bearerToken = request.getHeaders().getFirst(AUTHORIZATION_HEADER);
        if (StringUtils.hasText(bearerToken) && bearerToken.startsWith("Bearer ")) {
            return bearerToken.substring(7);
        }
        String jwt = request.getParameter(AUTHORIZATION_TOKEN);
        if (StringUtils.hasText(jwt)) {
            return jwt;
        }
        return null;
    }

ServerHttpRequest dosent have getParameter method

Florian RUEN
@EYESR_gitlab
@alanrezendee Thanks for your answer. I succesfully add multi tenant (it ask a new question when adding entity and it add to every database entry a link to the tenant), but what I want it's one separate DB per tenant. Sometimes I can see there is a master DB that store the credentials for each DB, but I don't know how I can do this properly using JHipster
1 reply