Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
11.3
-
None
-
Windows 10 64 bit version running on an AMD A10 Acer Aspire laptop.
Description
Following this Spring MVC tutorial
I created a Gradle Project using https://start.spring.io/
I downloaded the project as a zip and unzipped it into the Netbeans project folder, opened this as a project in Netbeans and built it.
The error occurred during the first run of the project.
Running a second time produced this error:
Exception in thread "task-2" java.lang.IllegalStateException: EntityManagerFactory is closed
at org.hibernate.internal.SessionFactoryImpl.validateNotClosed(SessionFactoryImpl.java:507)
at org.hibernate.internal.SessionFactoryImpl.getProperties(SessionFactoryImpl.java:501)
at org.springframework.boot.autoconfigure.orm.jpa.DataSourceInitializedPublisher.findDataSource(DataSourceInitializedPublisher.java:105)
at org.springframework.boot.autoconfigure.orm.jpa.DataSourceInitializedPublisher.publishEventIfRequired(DataSourceInitializedPublisher.java:97)
at org.springframework.boot.autoconfigure.orm.jpa.DataSourceInitializedPublisher.access$100(DataSourceInitializedPublisher.java:50)
at org.springframework.boot.autoconfigure.orm.jpa.DataSourceInitializedPublisher$DataSourceSchemaCreatedPublisher.lambda$postProcessEntityManagerFactory$0(DataSourceInitializedPublisher.java:200)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)