Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
7silentwolf
@7silentwolf
how do i get the current user login details?
Alain mit A
@alain_mit_a_twitter
Hi all
When I generate entities via JDL, all REST Endpoints are under /api/.. Is it possible - like in the petstore example to have different base paths? Like /pet/.. , /store/.. ?
And how can i achieve this?
Alejandro Matos
@amatosg
you mean automatically?
@levantuy & @Ryan-ZA delete node-modules folder and run npm install
Carlos Garcés
@CGarces
At https://www.jhipster.tech/jdl/options I see the "readonly" option at entity level. There is something similar at field level?
pojomojo
@pojomojo1982
Can I please get some help on this? My GET response show null values on child DTOs even after setting fetch mode to EAGER on a many to one relationship. Other than the ID attribute all values of the child DTO are null in the JSON response on the API. I can see that hibernate queries are executing to retrieve the details of the child object from database but null in the API response....
FSANDOVALC
@FSANDOVALC
Hi Everyone, I might have a silly question. But I created a monolith project and created the entity with JDL and everything, however on top of it I wanted to create/add a service for a FileUploader on Springboot. The problem is that when trying to test the service on Postman I am getting the following error: "Invalid CSRF Token 'null' was found on the request parameter '_csrf' or header 'X-XSRF-TOKEN'."
I haven't built the frontend for this service, is there any way to test this only from the backend side?
Alain mit A
@alain_mit_a_twitter
@amatosg yea somehow semi-auto.. maybe configuration in jdl.. idk :D
FSANDOVALC
@FSANDOVALC
Nvm everybody I just found the solution here, the problem was between the chair and the computer: https://stackoverflow.com/questions/27182701/how-do-i-send-spring-csrf-token-from-postman-rest-client
Alejandro Matos
@amatosg
@alain_mit_a_twitter no, you will have to edit it by hand (or editing the generator) :/
thaisonc8
@thaisonc8

you mean automatically?

@amatosg i had same issue, delete node-modules folder and run npm install but nothing change :(

Artjoms Stukans
@artyomsv
I'm currently trying to get some info on the Kafka usage with API endpoints introduced in the 6.6.0 version of the JHipster. I have spend a lot of time googling but w/o any result, so I would really appreciate any info on how can I produce and consume messages in microservice architecture using these endpoints. Or I have to stick with an old approach creating producers/consumers in old way?
Darshit Patel
@darshitpp
So I have created a new JHipster application, and it has an integration test named AccountResourceIT with a test named testRegisterDuplicateEmail. Unfortunately, the test fails on my machine, with the DataIntegrityViolationException because it inserts two users with the same email. This means that the test is wrong because the User entity is also generated by JHipster itself
I want to know if I was missing something or is this a genuine issue/bug

Detailed error:

org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint ["PUBLIC.UX_USER_EMAIL_INDEX_6 ON PUBLIC.JHI_USER(EMAIL) VALUES 17"; SQL statement:
insert into jhi_user (id, created_by, created_date, last_modified_by, last_modified_date, activated, activation_key, email, first_name, image_url, lang_key, last_name, login, password_hash, reset_date, reset_key) values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [23505-200]]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement

User.java has

    @Email
    @Size(min = 5, max = 254)
    @Column(length = 254, unique = true)
    private String email;
The same is the case with testRegisterDuplicateLogin
1 reply
Peter E Olsen III
@hepaestus

I have a component that is part of a module. I want to import that component into another module, how is that done?

import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';

import { SharedModule } from 'app/shared/shared.module';
import { HOME_ROUTE } from './home.route';
import { HomeComponent } from './home.component';

// This is what the component want to import in this module. I always get an error when it is imported or declared or exported.
import { ProductCardsListComponent } from 'app/entities/product/cards/product-cards-list.component';

@NgModule({
  imports: [SharedModule, RouterModule.forChild([HOME_ROUTE])],
  declarations: [HomeComponent],
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class HomeModule { }

Any help is greatly appreciated.

Peter E Olsen III
@hepaestus
Also if I import the whole module it causes an error as well....
Alejandro Matos
@amatosg
add it in the declaration statement
V W
@vw98075
With ./mvnw, I get a FileNotFojndException error on .../target/classes/config/application-prod.yml. I take a look at the file. It is there with permission -rw-r--r---. It seems fine for me. Why?
V W
@vw98075
Also, I run the Sonar analysis and get an IOException error "Failed to delete ../target/checksums.csv.old". The file has the same access permission. Not sure what is wrong.
Peter E Olsen III
@hepaestus
@amatosg I tried that and it did not work. :(
1 reply
EmmaYang29
@EmmaYang29
vue3.0?
Jesse Moseman
@jmoseman01
I'm having problems configuring the react native build with keycloak
but It just goes from start?authUrl="<authUrl>" to NotFound?authUrl="<authUrl>"
the authUrl seems to work.
Jesse Moseman
@jmoseman01
This is the call it makes before going to NotFound
const authResult = await AuthSession.startAsync({ authUrl, returnUrl: Linking.makeUrl('/') });
singhcharanjot20
@singhcharanjot20

Hey, I am new to jhipster and trying to import an existing project. When I am creating an entity with just 2 fields and no foreign key mapping at all, I get this exception :

ERROR! Error looking for otherEntity Authority at ~(Table Names)

The authority is missing in .jhipster folder and I cannot create an Authority entity because I get this : ERROR! Is not possible to override built in Authority

Application is build on springboot.

"jhipsterVersion": "7.1.0",
"applicationType": "monolith",

Will appreciate any help on this one. Thanks

1 reply
V W
@vw98075
Can a non-JVM application register at the JHipster Control Center? We have an open source app that is built with Go as an OAuth2 provider and an app built with JHipster as its OAuth client.
choubani amir
@amirensit
Hello
I has been a while since I am away from jhipster
I noticed other communities like angular, vuejs and reacts has created their discord server communities
It is more better than gitter
Is it possible for jhipster ?
Alejandro Matos
@amatosg
it is, but the server is empty :)
2 replies
choubani amir
@amirensit
We need to add our own server on discord and invite people there
Alejandro Matos
@amatosg
I've created a server, just in case :)
Peter E Olsen III
@hepaestus
I am using the elasticsearch search option for my entities in the JDL. I keep getting circular reference errors when saving entities. How do I get around this issue?
1 reply
 2021-07-22 11:22:58.233 ERROR 62059 --- [  XNIO-2 task-2] c.h.auntieginny.service.ArtService       : Exception in save() with cause = 'NULL' and exception = 'null'

 java.lang.StackOverflowError: null
    at org.springframework.data.util.Lazy.get(Lazy.java:114)
    at org.springframework.data.util.TypeDiscoverer.getType(TypeDiscoverer.java:285)
    at org.springframework.data.util.ParentTypeAwareTypeInformati

And Further down:

    at java.base/java.util.Spliterators$1Adapter.hasNext(Spliterators.java:681)
    at java.base/java.lang.Iterable.forEach(Iterable.java:74)
    at org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverter.writeCollectionValue(MappingElasticsearchConverter.java:710)

2021-07-22 11:22:58.238 ERROR 62059 --- [  XNIO-2 task-2] c.h.auntieginny.web.rest.ArtResource     : Exception in updateArt() with cause = 'NULL' and exception = 'null'

java.lang.StackOverflowError: null
    at org.springframework.data.util.Lazy.get(Lazy.java:114)
    at org.springframework.data.util.TypeDiscoverer.getType(TypeDiscoverer.java:285)
    at org.springframework.data.util.ParentTypeAwareTypeInformation.getType(ParentTypeAwa

Any Ideas on how to fix this?

arunjain501
@arunjain501
is anybody know about this ?

2021-07-22 21:23:28.734 INFO 1292 --- [ main] o.s.b.t.m.w.SpringBootMockServletContext : Initializing Spring TestDispatcherServlet ''
2021-07-22 21:23:28.734 INFO 1292 --- [ main] o.s.t.web.servlet.TestDispatcherServlet : Initializing Servlet ''
2021-07-22 21:23:28.757 INFO 1292 --- [ main] o.s.t.web.servlet.TestDispatcherServlet : Completed initialization in 23 ms

java.io.FileNotFoundException: class path resource [config/application.yml] cannot be resolved to URL because it does not exist

at org.springframework.core.io.ClassPathResource.getURL(ClassPathResource.java:195)
at org.springframework.core.io.AbstractFileResolvingResource.getFile(AbstractFileResolvingResource.java:150)
at com.risesmart.search.Swagger2MarkupTest.setup(Swagger2MarkupTest.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.RunBefores.invokeMethod(RunBefores.java:33)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
V W
@vw98075
I create a JDL file on the online JDL-studio. After running it with "jhipster jdl app.jdl", I get an error "TypeError: cannot read property 'charCodeAt" of undefined". How to find out the cause?
1 reply
Carlos Garcés
@CGarces
I need to use a different value on client side based on the environment.
On Java side there in no problem, is set on aplication*.yml. But how do the same on Angular?
4 replies
Konstantin Pribluda
@ko5tik
Somehow all the entities are subject for ealstic search even if I specify just one of them. Is there a feature to prohibit this? Or is it a bug?
ikomangmahendra
@ikomangmahendra

Hi, anybody know how to change webpack servlet base context on JHipster 7?
Before JHipster 7 I change webpack.common.js and change the base:'/'

But start from JHipster 7, I can't find it. Thanks id advanced.

ikomangmahendra
@ikomangmahendra

Hi, anybody know how to change webpack servlet base context on JHipster 7?
Before JHipster 7 I change webpack.common.js and change the base:'/'

But start from JHipster 7, I can't find it. Thanks id advanced.

Ignore. Solved this question refer to https://www.jhipster.tech/production/

Manthis
@manthis.the_gitlab
exception.MigrationFailedException: Migration failed for change set config/liquibase/changelog/00000000000000_initial_schema.xml::00000000000001::jhipster:
     Reason: liquibase.exception.DatabaseException: Table 'jhi_user' does not have the identity property. Cannot perform SET operation. [Failed SQL: (8106) SET IDENTITY_INSERT jhi_user ON]

liquibase.exception.LiquibaseException: liquibase.exception.MigrationFailedException: Migration failed for change set config/liquibase/changelog/00000000000000_initial_schema.xml::00000000000001::jhipster:
     Reason: liquibase.exception.DatabaseException: Table 'jhi_user' does not have the identity property. Cannot perform SET operation. [Failed SQL: (8106) SET IDENTITY_INSERT jhi_user ON]