Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to parse application-prod.yml in JHipster 6.10 fat jar #244

Open
sigi77777 opened this issue Feb 9, 2021 · 6 comments
Open

Failure to parse application-prod.yml in JHipster 6.10 fat jar #244

sigi77777 opened this issue Feb 9, 2021 · 6 comments

Comments

@sigi77777
Copy link

sigi77777 commented Feb 9, 2021

Hello,

Currently if i run my Jhipster app on virtualbox i get: PSQLException: The hostname 10.0.2.2 could not be verified by hostnameverifier PgjdbcHostnameVerifier. (it works good on normal springboot startup ofc)

Running on AWS: PSQLException: Could not open SSL root certificate file //.postgresql/root.crt.

Question is: Am i missing something, or the jdbc url should be manipulated in a different way by boxfuse.
Seems like boxfuse ignores the get parameters like: sslmode=verify-ca inside it.
Locally on virtualbox: postgresql://10.0.2.2:5433/boxfuse-dev-db?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory

On AWS deploy:
-DSPRING_DATASOURCE_URL=jdbc:postgresql://xxxx-xxxx-xxxx-xxxx:5432/xxx_xxx?ssl=true'
no matter if i change something in my application-prod.yml

@axelfontaine
Copy link
Member

Can you try downgrading your driver as described in #234 and let me know if it helped?

@sigi77777
Copy link
Author

sigi77777 commented Feb 10, 2021

yes, downgraded the driver. thanks!
now it starts but in virtualm machine mode the postgresql is too old, version 9. doesnt understand liquibase sql init statments (IF NOT EXISTS).
and in aws prod mode, i get :org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'securityConfiguration' defined in URL .....
BeanCreationException: Error creating bean with name 'persistentTokenRememberMeServices' defined in URL ....security/PersistentTokenRememberMeServices.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [......security.PersistentTokenRememberMeServices]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: key cannot be empty or null

Does boxfuse work with latest stable release of jhipster with postgresql? Am i missing something?

@axelfontaine
Copy link
Member

What is the root exception you are seeing in that stacktrace in your prod environment?

@sigi77777
Copy link
Author

sigi77777 commented Feb 10, 2021

Ok, the problem was that fusebox doesnt parse application-prod.yml if it is packaged in jar mode. Jhipsters boxfuse documentation page has a mistake, should be updated with the following command: ./gradlew -Pprod -Pwar clean bootWar

if war is generated, the yml is parsed, and the securityconfig is built.

Now everything looks and works fine. thanks!

@axelfontaine axelfontaine changed the title PostgreSQL database connection problem (Jhipster) Failure to parse application-prod.yml in JHipster generated jar Feb 11, 2021
@axelfontaine
Copy link
Member

Thanks for the thumbs up. I've updated the issue title to reflect this. Which version of JHipster are you using exactly?

@sigi77777
Copy link
Author

sigi77777 commented Feb 11, 2021

6.10.5
One more thing: t3.nano is not enough for jhipster+boxfuse. micro is seems the minimum. Works for me with xmx900m

@axelfontaine axelfontaine changed the title Failure to parse application-prod.yml in JHipster generated jar Failure to parse application-prod.yml in JHipster 6.10 generated jar Feb 11, 2021
@axelfontaine axelfontaine changed the title Failure to parse application-prod.yml in JHipster 6.10 generated jar Failure to parse application-prod.yml in JHipster 6.10 fat jar Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants