Closed ArthurMiller closed 2 months ago
JHipster has completed the sample check
.yo-rc.json
: blank
Entities JDL: blank
Application:
Frontend check: skipped
Backend check: skipped
E2E check: skipped
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.
If I try to generate an app with your JDL, I get an error:
ERROR! ERROR! Error parsing file src/test/java/gatling/simulations/OrderGatlingTest.java: Error: Sad sad panda, parsing errors detected in line: 89, column: 10!
Expecting --> ')' <-- but found --> ';' <--!
->compilationUnit
->ordinaryCompilationUnit
->typeDeclaration
->classDeclaration
->normalClassDeclaration
->classBody
->classBodyDeclaration
->classMemberDeclaration
->fieldDeclaration
->variableDeclaratorList
->variableDeclarator
->variableInitializer
->expression
->ternaryExpression
->binaryExpression
->unaryExpression
->primary
->primarySuffix
->methodInvocationSuffix at 1: package gatling.simulations;
2:
3: import static io.gatling.javaapi.core.CoreDsl.StringBody;
4: import static io.gatling.javaapi.core.CoreDsl.css;
5: import static io.gatling.javaapi.core.CoreDsl.exec;
6: import static io.gatling.javaapi.core.CoreDsl.rampUsers;
7: import static io.gatling.javaapi.core.CoreDsl.scenario;
8: import static io.gatling.javaapi.http.HttpDsl.header;
9: import static io.gatling.javaapi.http.HttpDsl.headerRegex;
10: import static io.gatling.javaapi.http.HttpDsl.http;
11: import static io.gatling.javaapi.http.HttpDsl.status;
12:
13: import java.time.Duration;
14: import java.util.Map;
15: import java.util.Optional;
16: import io.gatling.javaapi.core.ChainBuilder;
17: import io.gatling.javaapi.core.ScenarioBuilder;
18: import io.gatling.javaapi.core.Simulation;
19: import io.gatling.javaapi.http.HttpProtocolBuilder;
20:
21: /**
22: * Performance test for the Order entity.
23: *
24: * @see <a href="https://github.com/jhipster/generator-jhipster/tree/v8.5.0/generators/gatling#logging-tips">Logging tips</a>
25: */
26: public class OrderGatlingTest extends Simulation {
27:
28: String baseURL = Optional.ofNullable(System.getProperty("baseURL")).orElse("http://localhost:8090");
29:
30: HttpProtocolBuilder httpConf = http
31: .baseUrl(baseURL)
32: .inferHtmlResources()
33: .acceptHeader("*/*")
34: .acceptEncodingHeader("gzip, deflate")
35: .acceptLanguageHeader("fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3")
36: .connectionHeader("keep-alive")
37: .userAgentHeader("Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:33.0) Gecko/20100101 Firefox/33.0")
38: .silentResources() // Silence all resources like css or css so they don't clutter the results
39: ;
40:
41: Map<String, String> headers_http = Map.of(
42: "Accept", "application/json"
43: );
44:
45: ChainBuilder scn = exec(http("First unauthenticated request")
46: .get("/api/account")
47: .headers(headers_http)
48: .check(status().is(401))
49: ).exitHereIfFailed()
50: .pause(10)
51: .exec(http("Authentication")
52: .pause(2)
53: .exec(http("Authenticated request")
54: .get("/api/account")
55: .headers(headers_http_authenticated)
56: .check(status().is(200)))
57: .pause(10)
58: .repeat(2).on(
59: exec(http("Get all orders")
60: .get("/services/orderwriterservice/api/orders")
61: .headers(headers_http_authenticated)
62: .check(status().is(200)))
63: .pause(Duration.ofSeconds(10), Duration.ofSeconds(20))
64: .exec(http("Create new order")
65: .post("/services/orderwriterservice/api/orders")
66: .headers(headers_http_authenticated)
67: .body(StringBody("{" +
68: "\"baseCurrencyCode\": \"SAMPLE_TEXT\"" +
69: ", \"baseDiscountAmount\": 0" +
70: ", \"baseDiscountInvoiced\": 0" +
71: ", \"baseGrandTotal\": 0" +
72: ", \"baseDiscountTaxCompensationAmount\": 0" +
73: ", \"baseDiscountTaxCompensationInvoiced\": 0" +
74: ", \"baseShippingAmount\": 0" +
75: "}")).asJson()
76: .check(status().is(201))
77: .check(headerRegex("Location", "(.*)").saveAs("new_order_url"))).exitHereIfFailed()
78: .pause(10)
79: .repeat(5).on(
80: exec(http("Get created order")
81: .get("/services/orderwriterservice${new_order_url}")
82: .headers(headers_http_authenticated))
83: .pause(10)
84: )
85: .exec(http("Delete created order")
86: .delete("/services/orderwriterservice${new_order_url}")
87: .headers(headers_http_authenticated))
88: .pause(10)
89: );
90:
91: ScenarioBuilder users = scenario("Test the Order entity").exec(scn);
92:
93: {
94: setUp(
95: users.injectOpen(rampUsers(Integer.getInteger("users", 100)).during(Duration.ofMinutes(Integer.getInteger("ramp", 1))))
96: ).protocols(httpConf);
97: }
98: }
99:
Error: Error parsing file src/test/java/gatling/simulations/OrderGatlingTest.java: Error: Sad sad panda, parsing errors detected in line: 89, column: 10!
Expecting --> ')' <-- but found --> ';' <--!
->compilationUnit
->ordinaryCompilationUnit
->typeDeclaration
->classDeclaration
->normalClassDeclaration
->classBody
->classBodyDeclaration
->classMemberDeclaration
->fieldDeclaration
->variableDeclaratorList
->variableDeclarator
->variableInitializer
->expression
->ternaryExpression
->binaryExpression
->unaryExpression
->primary
->primarySuffix
->methodInvocationSuffix at 1: package gatling.simulations;
2:
3: import static io.gatling.javaapi.core.CoreDsl.StringBody;
4: import static io.gatling.javaapi.core.CoreDsl.css;
5: import static io.gatling.javaapi.core.CoreDsl.exec;
6: import static io.gatling.javaapi.core.CoreDsl.rampUsers;
7: import static io.gatling.javaapi.core.CoreDsl.scenario;
8: import static io.gatling.javaapi.http.HttpDsl.header;
9: import static io.gatling.javaapi.http.HttpDsl.headerRegex;
10: import static io.gatling.javaapi.http.HttpDsl.http;
11: import static io.gatling.javaapi.http.HttpDsl.status;
12:
13: import java.time.Duration;
14: import java.util.Map;
15: import java.util.Optional;
16: import io.gatling.javaapi.core.ChainBuilder;
17: import io.gatling.javaapi.core.ScenarioBuilder;
18: import io.gatling.javaapi.core.Simulation;
19: import io.gatling.javaapi.http.HttpProtocolBuilder;
20:
21: /**
22: * Performance test for the Order entity.
23: *
24: * @see <a href="https://github.com/jhipster/generator-jhipster/tree/v8.5.0/generators/gatling#logging-tips">Logging tips</a>
25: */
26: public class OrderGatlingTest extends Simulation {
27:
28: String baseURL = Optional.ofNullable(System.getProperty("baseURL")).orElse("http://localhost:8090");
29:
30: HttpProtocolBuilder httpConf = http
31: .baseUrl(baseURL)
32: .inferHtmlResources()
33: .acceptHeader("*/*")
34: .acceptEncodingHeader("gzip, deflate")
35: .acceptLanguageHeader("fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3")
36: .connectionHeader("keep-alive")
37: .userAgentHeader("Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:33.0) Gecko/20100101 Firefox/33.0")
38: .silentResources() // Silence all resources like css or css so they don't clutter the results
39: ;
40:
41: Map<String, String> headers_http = Map.of(
42: "Accept", "application/json"
43: );
44:
45: ChainBuilder scn = exec(http("First unauthenticated request")
46: .get("/api/account")
47: .headers(headers_http)
48: .check(status().is(401))
49: ).exitHereIfFailed()
50: .pause(10)
51: .exec(http("Authentication")
52: .pause(2)
53: .exec(http("Authenticated request")
54: .get("/api/account")
55: .headers(headers_http_authenticated)
56: .check(status().is(200)))
57: .pause(10)
58: .repeat(2).on(
59: exec(http("Get all orders")
60: .get("/services/orderwriterservice/api/orders")
61: .headers(headers_http_authenticated)
62: .check(status().is(200)))
63: .pause(Duration.ofSeconds(10), Duration.ofSeconds(20))
64: .exec(http("Create new order")
65: .post("/services/orderwriterservice/api/orders")
66: .headers(headers_http_authenticated)
67: .body(StringBody("{" +
68: "\"baseCurrencyCode\": \"SAMPLE_TEXT\"" +
69: ", \"baseDiscountAmount\": 0" +
70: ", \"baseDiscountInvoiced\": 0" +
71: ", \"baseGrandTotal\": 0" +
72: ", \"baseDiscountTaxCompensationAmount\": 0" +
73: ", \"baseDiscountTaxCompensationInvoiced\": 0" +
74: ", \"baseShippingAmount\": 0" +
75: "}")).asJson()
76: .check(status().is(201))
77: .check(headerRegex("Location", "(.*)").saveAs("new_order_url"))).exitHereIfFailed()
78: .pause(10)
79: .repeat(5).on(
80: exec(http("Get created order")
81: .get("/services/orderwriterservice${new_order_url}")
82: .headers(headers_http_authenticated))
83: .pause(10)
84: )
85: .exec(http("Delete created order")
86: .delete("/services/orderwriterservice${new_order_url}")
87: .headers(headers_http_authenticated))
88: .pause(10)
89: );
90:
91: ScenarioBuilder users = scenario("Test the Order entity").exec(scn);
92:
93: {
94: setUp(
95: users.injectOpen(rampUsers(Integer.getInteger("users", 100)).during(Duration.ofMinutes(Integer.getInteger("ramp", 1))))
96: ).protocols(httpConf);
97: }
98: }
99:
I tried to simplify things to allow more info to fit. Currently using: JHipster 8.5 Java openJDK 21.0.2 Node v22.2.0 OSX 14.3 Apple M2 Pro JDL: application { config { baseName orderWriterService applicationType microservice packageName com.plexus.order.writer buildTool gradle serverPort 8090 serviceDiscoveryType no authenticationType oauth2 databaseType sql prodDatabaseType mysql devDatabaseType mysql cacheProvider no enableHibernateCache true skipClient true skipServer false enableSwaggerCodegen false skipUserManagement true messageBroker kafka websocket false nativeLanguage en enableTranslation false languages [en] jhiPrefix plexus dtoSuffix DTO testFrameworks [cucumber, gatling] searchEngine false } entities Order }
entity Order { baseCurrencyCode String minlength(0) maxlength(3), baseDiscountAmount BigDecimal min(0) max(100000), baseDiscountInvoiced BigDecimal min(0) max(100000), baseGrandTotal BigDecimal min(0) max(100000), baseDiscountTaxCompensationAmount BigDecimal min(0) max(100000), baseDiscountTaxCompensationInvoiced BigDecimal min(0) max(100000), baseShippingAmount BigDecimal min(0) max(100000), baseShippingDiscountAmount BigDecimal min(0) max(100000), baseShippingDiscountTaxCompensationAmnt BigDecimal min(0) max(100000), baseShippingInclTax BigDecimal min(0) max(100000), baseShippingInvoiced BigDecimal min(0) max(100000), baseShippingTaxAmount BigDecimal min(0) max(100000), baseSubtotal BigDecimal min(0) max(100000), baseSubtotalInclTax BigDecimal min(0) max(100000), baseSubtotalInvoiced BigDecimal min(0) max(100000), baseTaxAmount BigDecimal min(0) max(100000), baseTaxInvoiced BigDecimal min(0) max(100000), baseTotalDue BigDecimal min(0) max(100000), baseTotalInvoiced BigDecimal min(0) max(100000), baseTotalInvoicedCost BigDecimal min(0) max(100000), baseTotalPaid BigDecimal min(0) max(100000), baseToGlobalRate BigDecimal min(0) max(100000), baseToOrderRate BigDecimal min(0) max(100000), billingAddressId Long min(0) max(1000000000000), createdAt ZonedDateTime, customerEmail String minlength(0) maxlength(254) pattern(/^[a-zA-Z0-9+&*-]+(?:\.[a-zA-Z0-9+&-]+)@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,7}$/), customerFirstname String minlength(0) maxlength(254), customerGroupId Integer min(0) max(20), customerId Long min(0) max(1000000000000), customerIsGuest Integer min(0) max(20), customerLastname String minlength(0) maxlength(254), customerNoteNotify Integer min(0) max(2147483647), discountAmount BigDecimal min(0) max(100000), discountInvoiced BigDecimal min(0) max(100000), emailSent Integer min(0) max(20), entityId Long min(0) max(1000000000000), globalCurrencyCode String minlength(0) maxlength(3), grandTotal BigDecimal min(0) max(100000), discountTaxCompensationAmount BigDecimal min(0) max(100000), discountTaxCompensationInvoiced BigDecimal min(0) max(100000), incrementId Long min(0) max(1000000000000), isVirtual Integer min(0) max(20), orderCurrencyCode String minlength(0) maxlength(3), protectCode String minlength(0) maxlength(254), quoteId Long min(0) max(1000000000000), remoteIp String minlength(0) maxlength(254), shippingAmount BigDecimal min(0) max(100000), shippingDescription String minlength(0) maxlength(254), shippingDiscountAmount BigDecimal min(0) max(100000), shippingDiscountTaxCompensationAmount BigDecimal min(0) max(100000), shippingInclTax BigDecimal min(0) max(100000), shippingInvoiced BigDecimal min(0) max(100000), shippingTaxAmount BigDecimal min(0) max(100000), state String minlength(0) maxlength(254), status String minlength(0) maxlength(254), storeCurrencyCode String minlength(0) maxlength(3), storeId Integer min(0) max(2147483647), storeName String minlength(0) maxlength(254), storeToBaseRate BigDecimal min(0) max(100000), storeToOrderRate BigDecimal min(0) max(100000), subtotal BigDecimal min(0) max(100000), subtotalInclTax BigDecimal min(0) max(100000), subtotalInvoiced BigDecimal min(0) max(100000), taxAmount BigDecimal min(0) max(100000), taxInvoiced BigDecimal min(0) max(100000), totalDue BigDecimal min(0) max(100000), totalInvoiced BigDecimal min(0) max(100000), totalItemCount Integer min(0) max(2147483647), totalPaid BigDecimal min(0) max(100000), totalQtyOrdered Integer min(0) max(2147483647), updatedAt ZonedDateTime, weight BigDecimal min(0) max(100000), statusHistories AnyBlob minbytes(0) maxbytes(65535) payment AnyBlob, parentItem AnyBlob, items AnyBlob, payment AnyBlob }
I was able to roll back to Gadle 8.7
Now getting error:
java.lang.NullPointerException: Cannot invoke "org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(java.sql.SQLException, String)" because the return value of "org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.sqlExceptionHelper()" is null
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.delegateWork(JdbcIsolationDelegate.java:116)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.getJdbcEnvironmentUsingJdbcMetadata(JdbcEnvironmentInitiator.java:290)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:123)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:77)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:130)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:238)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:215)
at org.hibernate.boot.model.relational.Database.
2024-06-12T08:49:09.619-07:00 ERROR 59314 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Failed to initialize JPA EntityManagerFactory: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] due to: Unable to determine Dialect without JDBC metadata (please set 'jakarta.persistence.jdbc.url' for common cases or 'hibernate.dialect' when a custom Dialect implementation must be provided) 2024-06-12T08:49:09.619-07:00 WARN 59314 --- [ restartedMain] 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]: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] due to: Unable to determine Dialect without JDBC metadata (please set 'jakarta.persistence.jdbc.url' for common cases or 'hibernate.dialect' when a custom Dialect implementation must be provided) 2024-06-12T08:49:09.644-07:00 INFO 59314 --- [ restartedMain] .s.b.a.l.ConditionEvaluationReportLogger :
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. 2024-06-12T08:49:09.662-07:00 ERROR 59314 --- [ restartedMain] 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]: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] due to: Unable to determine Dialect without JDBC metadata (please set 'jakarta.persistence.jdbc.url' for common cases or 'hibernate.dialect' when a custom Dialect implementation must be provided)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1788)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:337)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:205)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:952)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:335)
at com.plexus.order.writer.OrderWriterServiceApp.main(OrderWriterServiceApp.java:70)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:50)
Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] due to: Unable to determine Dialect without JDBC metadata (please set 'jakarta.persistence.jdbc.url' for common cases or 'hibernate.dialect' when a custom Dialect implementation must be provided)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:276)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:238)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:215)
at org.hibernate.boot.model.relational.Database.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
Can you please try with Node 20 and see if you experience the same issues?
Usually:
Caused by: org.hibernate.HibernateException: Unable to determine Dialect without JDBC metadata (please set 'jakarta.persistence.jdbc.url' for common cases or 'hibernate.dialect' when a custom Dialect implementation must be provided)
at
Means that database is not reachable.
It have been started with npm run services:up
?
Using Node 20.14.0: 2024-06-12T09:03:29.857-07:00 DEBUG 35663 --- [kground-preinit] org.jboss.logging : Logging Provider: org.jboss.logging.Slf4jLoggerProvider found via system property 2024-06-12T09:03:29.884-07:00 INFO 35663 --- [ restartedMain] c.p.order.writer.OrderWriterServiceApp : Starting OrderWriterServiceApp using Java 21.0.2 with PID 35663 (/Users/arthur.miller/Desktop/orderWritePOC/orderWritePOC/order-write-service-poc/build/classes/java/main started by arthur.miller in /Users/arthur.miller/Desktop/orderWritePOC/orderWritePOC/order-write-service-poc) 2024-06-12T09:03:29.884-07:00 DEBUG 35663 --- [ restartedMain] c.p.order.writer.OrderWriterServiceApp : Running with Spring Boot v3.3.0, Spring v6.1.8 2024-06-12T09:03:29.884-07:00 INFO 35663 --- [ restartedMain] c.p.order.writer.OrderWriterServiceApp : The following 2 profiles are active: "dev", "api-docs" 2024-06-12T09:03:31.758-07:00 INFO 35663 --- [ restartedMain] c.p.order.writer.config.WebConfigurer : Web application configuration, using profiles: dev 2024-06-12T09:03:31.758-07:00 INFO 35663 --- [ restartedMain] c.p.order.writer.config.WebConfigurer : Web application fully configured 2024-06-12T09:03:31.794-07:00 DEBUG 35663 --- [ restartedMain] c.p.o.writer.config.AsyncConfiguration : Creating Async Task Executor 2024-06-12T09:03:31.847-07:00 DEBUG 35663 --- [ restartedMain] c.p.o.w.config.LiquibaseConfiguration : Configuring Liquibase 2024-06-12T09:03:32.901-07:00 ERROR 35663 --- [ restartedMain] t.j.c.liquibase.AsyncSpringLiquibase : Liquibase could not start correctly, your database is NOT ready: Communications link failure__The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
:bootRun com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:815)
at com.mysql.cj.jdbc.ConnectionImpl.
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:104) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:149) at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:165) at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:88) at com.mysql.cj.NativeSession.connect(NativeSession.java:120) at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:935) at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:805) ... 32 common frames omitted Caused by: java.net.ConnectException: Connection refused at java.base/sun.nio.ch.Net.pollConnect(Native Method) at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:682) at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:549) at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:592) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) at java.base/java.net.Socket.connect(Socket.java:751) at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:153) at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:62) ... 35 common frames omitted
2024-06-12T09:03:34.207-07:00 WARN 35663 --- [ restartedMain] o.h.e.j.e.i.JdbcEnvironmentInitiator : HHH000342: Could not obtain connection to query metadata
java.lang.NullPointerException: Cannot invoke "org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(java.sql.SQLException, String)" because the return value of "org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.sqlExceptionHelper()" is null
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.delegateWork(JdbcIsolationDelegate.java:116)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.getJdbcEnvironmentUsingJdbcMetadata(JdbcEnvironmentInitiator.java:290)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:123)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:77)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:130)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:238)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:215)
at org.hibernate.boot.model.relational.Database.
2024-06-12T09:03:34.209-07:00 ERROR 35663 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Failed to initialize JPA EntityManagerFactory: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] due to: Unable to determine Dialect without JDBC metadata (please set 'jakarta.persistence.jdbc.url' for common cases or 'hibernate.dialect' when a custom Dialect implementation must be provided) 2024-06-12T09:03:34.209-07:00 WARN 35663 --- [ restartedMain] 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]: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] due to: Unable to determine Dialect without JDBC metadata (please set 'jakarta.persistence.jdbc.url' for common cases or 'hibernate.dialect' when a custom Dialect implementation must be provided) 2024-06-12T09:03:34.236-07:00 INFO 35663 --- [ restartedMain] .s.b.a.l.ConditionEvaluationReportLogger :
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. 2024-06-12T09:03:34.250-07:00 ERROR 35663 --- [ restartedMain] 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]: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] due to: Unable to determine Dialect without JDBC metadata (please set 'jakarta.persistence.jdbc.url' for common cases or 'hibernate.dialect' when a custom Dialect implementation must be provided)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1788)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:337)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:205)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:952)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:335)
at com.plexus.order.writer.OrderWriterServiceApp.main(OrderWriterServiceApp.java:70)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:50)
Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] due to: Unable to determine Dialect without JDBC metadata (please set 'jakarta.persistence.jdbc.url' for common cases or 'hibernate.dialect' when a custom Dialect implementation must be provided)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:276)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:238)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:215)
at org.hibernate.boot.model.relational.Database.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
Using npm run services:up arthur.miller@AL3224 order-write-service-poc % npm run services:up
order-writer-service@0.0.0 services:up docker compose -f src/main/docker/services.yml up --wait
[+] Running 3/3 ✘ mysql Error Head "https://registry-1.docker.io/v2/library/mysql/manifests/8.4.0": unauthorized: incorrect username or password 0.7s ✘ zookeeper Error context canceled 0.8s ✘ kafka Error context canceled 0.7s Error response from daemon: Head "https://registry-1.docker.io/v2/library/mysql/manifests/8.4.0": unauthorized: incorrect username or password arthur.miller@AL3224 order-write-service-poc %
Maybe a configuration step missing?
Having services database/kafka running is a requirement. This is an environment problem, you should check why you cannot download docker containers from docker repository.
Gatling is indeed failing to generate with the provided sample. It's probably related to no authentication type.
It's not clear if there an issue in generated application.
Overview of the issue
I used the following JDL: Using: OSX, JHipster 8.5, openjdk@21 I try to run ./gradlew and get the following:
Motivation for or Use Case
I cannot build or run the generated application
Reproduce the error
I ran the JDL, then ran ./gradlew
Related issues
I don't see it
Suggest a Fix
JHipster Version(s)
New generation using JHipster 8.5
JHipster configuration
JDL definitions
Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryBrowsers and Operating System
OSX: 14.3 M2 chipset