glassfish icon indicating copy to clipboard operation
glassfish copied to clipboard

Can not connect to the default database

Open hantsy opened this issue 3 years ago • 1 comments

Environment Details

  • GlassFish Version (and build number):Glassfish 7.0.0-M7
  • JDK version: 17
  • OS: Windows 10
  • Database: built-in Derby, start up by asadmin start-database

Problem Description

Exception was thrown when performing operations on a running database.

Caused by: java.lang.IllegalStateException: Attempting to execute an operation on a closed EntityManagerFactory.

Steps to reproduce

Sample project: https://github.com/hantsy/jakartaee10-sandbox/tree/master/rest server.log

  1. start Glassfish and derby
  2. copy the build war to the domain1/autodeploy folder
  3. failed, due to there is an Ejb @Singleton,@Startup bean.

Impact of Issue

it is a blocking issue, I can not deploy and use my application.

Attached a copy of server.log.

hantsy avatar Jul 19 '22 16:07 hantsy

Could it be related to these issues? But then - is there any TCK test for that? If GlassFish passes all of them ... probably not. I see in the log there is also some issue with the UUID. Could it be the cause, missing conversion for Derby? EDIT: The UUID is not the cause, it is automatically converted to String. EDIT2: Hmm, it seems it reused the closed factory used to create a db scheme ... seems as a bug to me. Links are not related, they were really fixed.

https://github.com/eclipse-ee4j/glassfish/issues/20898 https://github.com/eclipse-ee4j/glassfish/issues/19187

dmatej avatar Jul 19 '22 19:07 dmatej