glassfish
glassfish copied to clipboard
Can not connect to the default database
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
- start Glassfish and derby
- copy the build war to the domain1/autodeploy folder
- failed, due to there is an Ejb
@Singleton,@Startupbean.
Impact of Issue
it is a blocking issue, I can not deploy and use my application.
Attached a copy of server.log.
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