Comments (7)
We also had the same problem and returned to JHipster 7.9.4, as we couldn't resolve it by changing the dependency versions.
There is definitely a huge Problem with JHipster 8 and Docker
from generator-jhipster.
JHipster has completed the sample check
.yo-rc.json
: valid
Entities JDL: valid
Application: successfully generated
Frontend check: success
Backend check: success
E2E check: success
This check uses jhipster info
output from the issue description to generate the sample.
Bug report that does not contain this information will be marked as invalid.
from generator-jhipster.
@shuoros if you have any suggested fix, would be great, thanks.
from generator-jhipster.
I believe you were running the spring boot app on Docker, yes? @shuoros
from generator-jhipster.
We need reproduction steps.
CI is passing with provided sample.
from generator-jhipster.
@shuoros if you have any suggested fix, would be great, thanks.
Actually, I have no idea how to solve this I tried so many things and even reinstalled the OS and Java and hipster and docker and everything and nothing worked for me!
I believe you were running the spring boot app on Docker. @shuoros
Yes I am trying to run my application on the docker
from generator-jhipster.
We need reproduction steps. CI is passing with provided sample.
Which reproduction step do you need exactly?
I generated a Jhipster application with
jhipster
command.
Then I build the application with :
npm run java:docker
output:
> [email protected] java:docker
> ./mvnw -ntp verify -DskipTests -Pprod jib:dockerBuild
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------< tech.siloxa.subinja:subinja >---------------------
[INFO] Building Subinja 0.2.5
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- enforcer:3.4.1:enforce (enforce-versions) @ subinja ---
[INFO] Rule 0: org.apache.maven.enforcer.rules.version.RequireMavenVersion passed
[INFO] Rule 1: org.apache.maven.enforcer.rules.version.RequireJavaVersion passed
[INFO]
[INFO] --- enforcer:3.4.1:enforce (enforce-dependencyConvergence) @ subinja ---
[WARNING] Rule 0: org.apache.maven.enforcer.rules.dependency.DependencyConvergence failed with message:
Failed while enforcing releasability.
Dependency convergence error for javax.xml.bind:jaxb-api:jar:2.3.1 paths to dependency are:
+-tech.siloxa.subinja:subinja:jar:0.2.5
+-org.liquibase:liquibase-core:jar:4.24.0:compile
+-javax.xml.bind:jaxb-api:jar:2.3.1:compile
and
+-tech.siloxa.subinja:subinja:jar:0.2.5
+-com.vladmihalcea:hibernate-types-60:jar:2.21.1:compile
+-javax.xml.bind:jaxb-api:jar:2.3.0:compile
[INFO]
[INFO] --- resources:3.3.1:copy-resources (config-resources) @ subinja ---
[INFO] Copying 4 resources from src/main/resources to target/classes
[INFO]
[INFO] --- properties:1.2.1:read-project-properties (default) @ subinja ---
[INFO] Loading 22 properties from File: /home/soroush/subinja/sonar-project.properties
[INFO]
[INFO] --- jacoco:0.8.11:prepare-agent (pre-unit-tests) @ subinja ---
[INFO] argLine set to -javaagent:/home/soroush/.m2/repository/org/jacoco/org.jacoco.agent/0.8.11/org.jacoco.agent-0.8.11-runtime.jar=destfile=/home/soroush/subinja/target/jacoco.exec -Djava.security.egd=file:/dev/./urandom -Xmx1G
[INFO]
[INFO] --- git-commit-id:7.0.0:revision (default) @ subinja ---
[INFO]
[INFO] --- spotless:2.41.1:apply (spotless) @ subinja ---
[INFO] Spotless.Java is keeping 99 files clean - 0 were changed to be clean, 0 were already clean, 99 were skipped because caching determined they were already clean
[INFO]
[INFO] --- spring-boot:3.2.1:build-info (default) @ subinja ---
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ subinja ---
[INFO] Copying 51 resources from src/main/resources to target/classes
[INFO]
[INFO] --- compiler:3.11.0:compile (default-compile) @ subinja ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- resources:3.3.1:testResources (default-testResources) @ subinja ---
[INFO] Copying 12 resources from src/test/resources to target/test-classes
[INFO]
[INFO] --- compiler:3.11.0:testCompile (default-testCompile) @ subinja ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- surefire:3.2.2:test (default-test) @ subinja ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- jacoco:0.8.11:report (post-unit-test) @ subinja ---
[INFO] Skipping JaCoCo execution due to missing execution data file.
[INFO]
[INFO] --- jar:3.3.0:jar (default-jar) @ subinja ---
[INFO] Building jar: /home/soroush/subinja/target/subinja-0.2.5.jar
[INFO]
[INFO] --- spring-boot:3.2.1:repackage (default) @ subinja ---
[INFO] Replacing main artifact /home/soroush/subinja/target/subinja-0.2.5.jar with repackaged archive, adding nested dependencies in BOOT-INF/.
[INFO] The original artifact has been renamed to /home/soroush/subinja/target/subinja-0.2.5.jar.original
[INFO]
[INFO] --- jacoco:0.8.11:prepare-agent-integration (pre-integration-tests) @ subinja ---
[INFO] argLine set to -javaagent:/home/soroush/.m2/repository/org/jacoco/org.jacoco.agent/0.8.11/org.jacoco.agent-0.8.11-runtime.jar=destfile=/home/soroush/subinja/target/jacoco-it.exec -Djava.security.egd=file:/dev/./urandom -Xmx1G
[INFO]
[INFO] --- failsafe:3.2.2:integration-test (integration-test) @ subinja ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- jacoco:0.8.11:report-integration (post-integration-tests) @ subinja ---
[INFO] Skipping JaCoCo execution due to missing execution data file.
[INFO]
[INFO] --- checkstyle:3.3.1:check (default) @ subinja ---
[INFO] You have 0 Checkstyle violations.
[INFO]
[INFO] --- failsafe:3.2.2:verify (verify) @ subinja ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- jib:3.4.0:dockerBuild (default-cli) @ subinja ---
[INFO]
[INFO] Containerizing application to Docker daemon as subinja...
[WARNING] Base image 'eclipse-temurin:17-jre-focal' does not use a specific image digest - build may not be reproducible
[INFO] The base image requires auth. Trying again for eclipse-temurin:17-jre-focal...
[INFO] Using base image with digest: sha256:4cb9915fc46edcfc722eba74a905fe848405d1d35d002f62246a123a63f87e7b
[INFO]
[INFO] Container entrypoint set to [bash, -c, /entrypoint.sh]
[INFO]
[INFO] Built image to Docker daemon as subinja
[INFO] Executing tasks:
[INFO] [==============================] 100.0% complete
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.088 s
[INFO] Finished at: 2024-02-21T17:38:47Z
[INFO] ------------------------------------------------------------------------
Then I run the application with:
docker compose -f src/main/docker/app.yml up -d
output:
[+] Running 2/2
✔ Container subinja-postgresql-1 Healthy 0.1s
✔ Container subinja-app-1 Started
docker logs -f subinja-app-1
output:
2024-02-21T17:42:49.365Z INFO 1 --- [ main] tech.siloxa.subinja.SubinjaApp : Starting SubinjaApp using Java 17.0.10 with PID 1 (/app/classes started by ? in /)
2024-02-21T17:42:49.380Z INFO 1 --- [ main] tech.siloxa.subinja.SubinjaApp : The following 2 profiles are active: "prod", "api-docs"
2024-02-21T17:42:55.838Z INFO 1 --- [ main] t.siloxa.subinja.config.WebConfigurer : Web application configuration, using profiles: prod
2024-02-21T17:42:55.841Z INFO 1 --- [ main] t.siloxa.subinja.config.WebConfigurer : Web application fully configured
Running Changeset: config/liquibase/changelog/00000000000000_initial_schema.xml::00000000000000::jhipster
Running Changeset: config/liquibase/changelog/00000000000000_initial_schema.xml::00000000000001::jhipster
Running Changeset: config/liquibase/changelog/20240127140943-subtitle.xml::20240127140943-1::soroush
Running Changeset: config/liquibase/changelog/20240127140943-subtitle.xml::20240127140943-2::soroush
Running Changeset: config/liquibase/changelog/20240204100820-scrapException.xml::20240204100820-1::soroush
Liquibase: Update has been successful. Rows affected: 5
2024-02-21T17:43:00.165Z WARN 1 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: BEFORE_TRANSACTION_COMPLETION
2024-02-21T17:43:00.231Z INFO 1 --- [ main] .s.b.a.l.ConditionEvaluationReportLogger :
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2024-02-21T17:43:00.258Z ERROR 1 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: BEFORE_TRANSACTION_COMPLETION
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1775)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1173)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:936)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:616)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:753)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:455)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:323)
at tech.siloxa.subinja.SubinjaApp.main(SubinjaApp.java:70)
Caused by: java.lang.NoSuchFieldError: BEFORE_TRANSACTION_COMPLETION
at org.hibernate.resource.jdbc.spi.PhysicalConnectionHandlingMode.<clinit>(PhysicalConnectionHandlingMode.java:50)
at org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter.buildJpaPropertyMap(HibernateJpaVendorAdapter.java:162)
at org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter.getJpaPropertyMap(HibernateJpaVendorAdapter.java:132)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:365)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:352)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1822)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1771)
docker compose files:
app.yml
:
# This configuration is intended for development purpose, it's **your** responsibility to harden it for production
name: subinja
services:
app:
image: subinja
environment:
- _JAVA_OPTIONS=-Xmx512m -Xms256m
- SPRING_PROFILES_ACTIVE=prod,api-docs
- MANAGEMENT_PROMETHEUS_METRICS_EXPORT_ENABLED=true
- SPRING_DATASOURCE_URL=jdbc:postgresql://postgresql:5432/subinja
- SPRING_LIQUIBASE_URL=jdbc:postgresql://postgresql:5432/subinja
ports:
- 127.0.0.1:8080:8080
volumes:
- /opt/subinja:/opt/subinja
healthcheck:
test:
- CMD
- curl
- -f
- http://localhost:8080/management/health
interval: 5s
timeout: 5s
retries: 40
depends_on:
postgresql:
condition: service_healthy
postgresql:
extends:
file: ./postgresql.yml
service: postgresql
postgresql.yml
:
# This configuration is intended for development purpose, it's **your** responsibility to harden it for production
name: subinja
services:
postgresql:
image: postgres:16.1
volumes:
- ~/volumes/jhipster/subinja/postgresql/:/var/lib/postgresql/data/
environment:
- POSTGRES_DB=**
- POSTGRES_USER=**
- POSTGRES_PASSWORD=**
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U $${POSTGRES_USER}']
interval: 5s
timeout: 5s
retries: 10
# If you want to expose these ports outside your dev PC,
# remove the "127.0.0.1:" prefix
ports:
- 127.0.0.1:5432:5432
from generator-jhipster.
Related Issues (20)
- Stand alone blueprint throws error during unit testing HOT 6
- Language blueprint throws error at prompt
- Deprecated Libraries Upgrading Needed HOT 3
- Can not integrate gRPC to Jhipster project HOT 1
- jdl blueprint errors when generating sample application using dev blueprint HOT 3
- `husky install` command is deprecated
- Microservice with reactive + MongoDB doesn't start HOT 1
- Micro Frontends with Angular doesn't compile HOT 3
- JHipster 8 doesn't work with Java 22 HOT 4
- Incremental changelog producing broken changelogs when adding/removing fields and relationships in the same jdl run
- Drop `jhipster-dependencies` dependency. HOT 8
- Missing Information for relationships "with joint fields" in the jhipster documentation. HOT 3
- Swagger UI Not Displaying APIs in Gateway Application HOT 4
- Override of Prettier plugins during code transformation seems not possible with 8.2.1 release HOT 2
- Building the generator on plain Windows fails HOT 3
- Home page doesn't have login-in menu and got error page info when click logout herf in oauth2 application with Vue client (v8.2.1) HOT 2
- mvn liquibase:diff does not work in jhipster 8.2.1
- adminAuthority translation is deleted from global.json after importing jdl HOT 1
- Evaluate `insight` dependency. HOT 3
- Implement `java/node`, `java/jib`, `java/code-quality`, `maven/frontend-plugin`, `maven/code-quality`, `maven/jib` generators to be reused in micronaut and quarkus blueprints.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generator-jhipster.