Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
AzzouzMohamed
@AzzouzMohamed
hello everyone, can you tell me how to make a composite key using jdl ?
Joren McSorley
@jorenmcsorley
Hi everyone. Is there a way to change the default naming convention used when generating entities?
Example: jhipster import-jdl sample.jh
Generates a file with the convention: sample-delete-dialog.tsx
I'd like to generate: sampleDeleteDialog.tsx
Alejandro Matos
@amatosg
you will have to change the core files in your node-modules file
Martin Carrillo
@marvicgit
Hello everyone, someone managed to implement an external authorization service: https://www.baeldung.com/jhipster-authentication-external-service,
do everything but don't enter custom authenticator
Rafael Hengles
@rhengles

Hello everyone.
I have a brand new project created with JHipster that already has many entities structure and data. It was created by a backend developer and unfortunately he chose "Angular" for the front-end. AFAIK, there is no custom development made to the front end.

Can I regenerate the frontend in another stack, preferably Vue, for an existing JHipster app ?

2 replies
Krishnan Mahadevan
@krmahadevan

Hello everyone.. I am noticing that when I have a many to one relationship such as below

relationship OneToMany {
    Father to Child
}

and I use jhipster import-jdl the generated DTOs are not containing the Set<Child> references that are found in the entity classes. Is this a known behavior ?

Cassandra Bailey
@cassandrabailey293

Hi All - trying to implement my own entity-client subgenerator for React. I haven't done anything special yet. When I try to make an entity, it can't find the primaryKey:

info Using blueprint generator-jhipster-uswds-react for entity-client subgenerator
events.js:288
      throw er; // Unhandled 'error' event
      ^

Error: Copying template react/src/main/webapp/app/entities/entity-detail.tsx.ejs failed. [ReferenceError: /opt/Projects/FedHipster/Dev/generator-jhipster-uswds-react/generators/entity-client/templates/react/src/main/webapp/app/entities/entity-detail.tsx.ejs:169
    167|           <FontAwesomeIcon icon="arrow-left" /> <span className="d-none d-md-inline" ><Translate contentKey="entity.action.back">Back</Translate></span>
    168|         </Button>&nbsp;
 >> 169|         <Button tag={Link} to={`/<%= entityFileName %>/${<%= entityInstance %>Entity.<%= primaryKey.name %>}/edit`} replace color="primary">
    170|           <FontAwesomeIcon icon="pencil-alt" /> <span className="d-none d-md-inline"><Translate contentKey="entity.action.edit">Edit</Translate></span>
    171|         </Button>
    172|       </Col>
**primaryKey is not defined**]

Has anyone else seen this? Does the primaryKey have something to do with the database? when does it get generated and assigned? Any help would be appreciated, thanks.

3 replies
John Poole
@jdpoole_gitlab
I'm trying to use custom annotations in my JDL to avoid editing the generated domain entities, but adding: @customAnnotation(@MyAnnotation) and just @MyAnnotation to the JDL doesn't work. Nothing at all shows up in the generated java file. How are these supposed to work?
2 replies
buiphuking
@buiphuking_twitter
i use angular with jhipster, how to create a new routing when i create a new page and match it, a little help, plz
and how to fix it
TypeError: Cannot read property 'length' of undefined
at child.queueOwnTasks (C:\Users\PC\AppData\Roaming\npm\node_modules\generator-jhipster-pages\node_modules\generator-jhipster\node_modules\yeoman-generator\lib\index.js:903:23)
at C:\Users\PC\AppData\Roaming\npm\node_modules\generator-jhipster-pages\node_modules\generator-jhipster\node_modules\yeoman-generator\lib\index.js:1109:12
at new Promise (<anonymous>)
at child.runWithOptions (C:\Users\PC\AppData\Roaming\npm\node_modules\generator-jhipster-pages\node_modules\generator-jhipster\node_modules\yeoman-generator\lib\index.js:1089:21)
at child.run (C:\Users\PC\AppData\Roaming\npm\node_modules\generator-jhipster-pages\node_modules\generator-jhipster\node_modules\yeoman-generator\lib\index.js:1048:26)
at C:\Users\PC\AppData\Roaming\npm\node_modules\yo\node_modules\yeoman-environment\lib\environment.js:805:36
at new Promise (<anonymous>)
at Environment.runGenerator (C:\Users\PC\AppData\Roaming\npm\node_modules\yo\node_modules\yeoman-environment\lib\environment.js:770:21)
at instantiateAndRun (C:\Users\PC\AppData\Roaming\npm\node_modules\yo\node_modules\yeoman-environment\lib\environment.js:743:19)
at Environment.run (C:\Users\PC\AppData\Roaming\npm\node_modules\yo\node_modules\yeoman-environment\lib\environment.js:758:12)
Krishnan Mahadevan
@krmahadevan

Hello everyone.. I am noticing that when I have a many to one relationship such as below

relationship OneToMany {
    Father to Child
}

and I use jhipster import-jdl the generated DTOs are not containing the Set<Child> references that are found in the entity classes. Is this a known behavior ?

Any help on this please ?

Jeff Power
@JeffPower78_twitter
image.png
hi there, is there way to generate BDD for all entites? Currently, its only generating for user entity when cucumber was enabled.
Alejandro Matos
@amatosg
I think you have to do it by yourself
Jeff Power
@JeffPower78_twitter
ok. thanks for the comments
Rick Korkmaz
@RCK-DEV
Quick question. I would like to know if JHipster supports customized versions of a Spring backend and Vue backend. If understand correctly this is possible using blueprints or modules?
Carlos Garcés
@CGarces
Hi. I need to modify my app to see entity data related to the user logged.
I'll follow the approach from this video.
https://www.youtube.com/watch?v=Gg5CYoBdpVo
That means, extend all auto regenerated java clases (Service, Repository and Resource) and create a new REST api. ¿It's the correct way? the video is from 2019.
Alejandro Matos
@amatosg
Hola Carlos, yes, I also do that
Carlos Garcés
@CGarces
@amatosg Thanks!
V W
@vw98075

I need to do some Rest API tests on a microservice with JTW security configuration. After commenting out the annotation and body of the SecurityConfiguration

//@EnableWebSecurity
//@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
//@Import(SecurityProblemSupport.class)
public class SecurityConfiguration  extends WebSecurityConfigurerAdapter {...}

I still get a 401 "Unauthorized" error after making a Rest call. What other security configuration I need to disable?

Ravi Kumar
@ravi-brickcube_gitlab
Hi all, I am facing issues while audits in jhiptser version 6.10.5
I'm not getting that menu itself in project
V W
@vw98075
When defining a one-to-many relationship in JDL, is a way to specify Set or List on the "Many" side?
Gordon Child
@gordolio
I'm upgrading to jhipster 7. It looks like identity primary keys aren't possible when using mariadb.
const defaultGenerationType = entityWithConfig.prodDatabaseType === 'mysql' ? 'identity' : 'sequence';
field.jpaGeneratedValue = field.jpaGeneratedValue || field.fieldType === 'Long' ? defaultGenerationType : true;
Gordon Child
@gordolio
It appears that the intention here was that when you have a configured jpaGeneratedValue then it will use that, but will otherwise default to the defaultGenerationType. But the order of operations here doesn't work like that. It will always be sequence for mariadb.
this is in utils/field.js around line 193.
I'm just going to be fixing it in my own blueprint for the time being.
Gordon Child
@gordolio
Except that function (prepareFieldForTemplates) isn't able to be extended in a blueprint. Ugh.
Adrian Glez
@Adri-Glez

Anyone tried the last release of Jhipster 7.0.0?. It loks like don't work corretly. I create a empty gateway project with oauth2 keycloak authorization It starts without errors but the restricted area don’t works. I login to the admin user but after that the browser redirect to this url http://localhost:8098/login?error with this json error:

{
  "type" : "https://www.jhipster.tech/problem/problem-with-message",
  "title" : "Unauthorized",
  "status" : 401,
  "detail" : "Not Authenticated",
  "path" : "/login",
  "message" : "error.http.401"
}

. This is the yo-rc.json with the configuration that I choose :

{
  "generator-jhipster": {
    "blueprints": [],
    "otherModules": [],
    "applicationType": "gateway",
    "baseName": "testGatewayWeb",
    "jhipsterVersion": "7.0.0",
    "skipClient": false,
    "skipServer": false,
    "skipUserManagement": true,
    "skipCheckLengthOfIdentifier": false,
    "skipFakeData": false,
    "jhiPrefix": "jhi",
    "entitySuffix": "",
    "dtoSuffix": "DTO",
    "testFrameworks": ["cypress", "gatling", "cucumber"],
    "pages": [],
    "creationTimestamp": 1616514640129,
    "serviceDiscoveryType": "eureka",
    "reactive": true,
    "authenticationType": "oauth2",
    "packageName": "es.adrian",
    "serverPort": "8098",
    "cacheProvider": "no",
    "enableHibernateCache": false,
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "prodDatabaseType": "mysql",
    "buildTool": "maven",
    "serverSideOptions": [],
    "websocket": false,
    "searchEngine": false,
    "messageBroker": false,
    "enableSwaggerCodegen": false,
    "clientFramework": "angularX",
    "withAdminUi": true,
    "clientTheme": "none",
    "enableTranslation": true,
    "nativeLanguage": "en",
    "packageFolder": "es/adrian",
    "clientPackageManager": "npm",
    "clientThemeVariant": "",
    "languages": ["en", "es"]
  }
}
Anyone can help me to solve this problem?
Adrian Glez
@Adri-Glez
I create a bug with It anyway : jhipster/generator-jhipster#14445
olegtatsyun
@olegtatsyun
Hi everyone.
I have "An error has occurred :-(" issue instead of description when looking for my site after google search
3 replies
Does anybody faced with same ?
Fhasi Ben Sellam Mouad
@mouadFahsi
Hi everyone.
i need to use bitbucket pipelines to test and publish a jhipster monolith to heroku
does anybody had any luck with this?
1 reply
Konstantin Pribluda
@ko5tik
have problem running fresh app.yml generated from bleeding edge - "Host '172.18.0.2' is not allowed to connect to this MySQL server" Setting - MYSQL_ROOT_HOST=172.18.0.2 does not help. Anybody seen this?
olegtatsyun
@olegtatsyun
Fixed "An error has occurred :-(" !!!
I fixed it by forcing Google re-index my site. I used tool - Google search console.
Konstantin Pribluda
@ko5tik

have problem running fresh app.yml generated from bleeding edge - "Host '172.18.0.2' is not allowed to connect to this MySQL server" Setting - MYSQL_ROOT_HOST=172.18.0.2 does not help. Anybody seen this?

ok, git if fixed. as it turns out MYSQL_USER=root is wrong - removing it helped

nguyenthaiduy277@gmail.com
@MYuitsu
Sorry my English is pretty bad, But I'm having trouble getting the HA keycloak on kubernetes, when I increase the number of GATEWAY's PODs the app can't log in, the same problem happened when I increased the number of PODs of other business SERIVCEs.
Can anyone help me,please ?
Michał Matusiak
@michaelloo35
This message was deleted
1 reply
AMuravev
@AMuravev
I generate simple application via jhipster. I choice JWT token and H2 DB. In dev mode, I want to have access to the h2-console, but I get 500 error and nullPointExseption. What could be the problem? Also h2.console.enabled set true
java.lang.NullPointerException: null
        at io.undertow.servlet.spec.HttpServletRequestImpl.getHttpServletMapping(HttpServletRequestImpl.java:253)
        at javax.servlet.http.HttpServletRequestWrapper.getHttpServletMapping(HttpServletRequestWrapper.java:117)
        at javax.servlet.http.HttpServletRequestWrapper.getHttpServletMapping(HttpServletRequestWrapper.java:117)
        at org.springframework.web.util.UrlPathHelper$Servlet4Delegate.skipServletPathDetermination(UrlPathHelper.java:780)
        at org.springframework.web.util.UrlPathHelper.skipServletPathDetermination(UrlPathHelper.java:272)
        at org.springframework.web.util.UrlPathHelper.getLookupPathForRequest(UrlPathHelper.java:251)
        at org.springframework.web.util.UrlPathHelper.resolveAndCacheLookupPath(UrlPathHelper.java:200)
        at org.springframework.web.servlet.handler.AbstractHandlerMapping.initLookupPath(AbstractHandlerMapping.java:579)
        at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.getHandlerInternal(AbstractHandlerMethodMapping.java:373)
        at org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping.getHandlerInternal(RequestMappingInfoHandlerMapping.java:123)
        at org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping.getHandlerInternal(RequestMappingInfoHandlerMapping.java:66)
        at org.springframework.web.servlet.handler.AbstractHandlerMapping.getHandler(AbstractHandlerMapping.java:498)
        at org.springframework.web.servlet.DispatcherServlet.getHandler(DispatcherServlet.java:1254)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1036)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
        ...
        at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
        at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:103)
        at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
        at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)
        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
        at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)
        at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)
        at org.springframework.security.web.FilterChain
4 replies
Hongxin
@zhx828
Hi guys, this question maybe asked before but I cannot find any information online. Does latest v7 support MySQL JSON data type? If not, is there another solution I can use? I'm thinking to use textblob then parse the JSON after getting the content from DB. Any suggestions? Thank you!
Konstantin Pribluda
@ko5tik

Hi guys, this question maybe asked before but I cannot find any information online. Does latest v7 support MySQL JSON data type? If not, is there another solution I can use? I'm thinking to use textblob then parse the JSON after getting the content from DB. Any suggestions? Thank you!

Did not found this, but integrating JSON BLOB into react app was pretty easy. My map editor viewer just received JSON string :
const MapEdit = ({ track, callback }) => {
// this function just parses JSON inside , points and center are now objects
const { points, center } = prepareTrack(track);

// initial values
const [myPoints, setPoints] = useState(points);
const [myCenter, setCenter] = useState(center);
const [selectedIndex, setSelectedIndex] = useState(undefined);

and passed result back via callback function:
// somewhere later at the appropriate place
savePointsCallback(JSON.stringify(myPoints));

And callback function itself:
const passThePoints = (data: string) => {
// just use generated setBlob on appropriate proerty name
props.setBlob('track', data, undefined);
};

Seethis in action: http://www.pribluda.de:8080/

4 replies
kaffel houssem
@kaffelmedhoussem:matrix.org
[m]
Hello guys i am newbie , i just wanna know how to redirect to another page after login with jihpster , i want to change redirection to page of an entity i made ?
1 reply
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