Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
-
---
-
---
Description
I was doing some misc modifications on Quickstarts and noticed that if we add the persistence.xml Jakarta property to execute an SQL script... WFLY tries to execute the script twice, which probably will fail!
You may use the Kitchensink quickstart to replicate the issue, just add the property as I did at https://github.com/wildfly/quickstart/compare/main...emmartins:quickstart:sqlscriptruntwice?expand=1
If you run "mvn clean install wildfly:deploy" on /kitchensink with such change you should see this on server log:
14:56:42,852 INFO [org.hibernate.tool.schema.internal.SchemaCreatorImpl] (ServerService Thread Pool -- 87) HHH000476: Executing import script 'vfs:/content/kitchensink.war/WEB-INF/classes/import.sql' 14:56:42,854 INFO [org.hibernate.tool.schema.internal.SchemaCreatorImpl] (ServerService Thread Pool -- 87) HHH000476: Executing import script 'vfs:/content/kitchensink.war/WEB-INF/classes/import.sql' 14:56:42,856 WARN [org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl] (ServerService Thread Pool -- 87) GenerationTarget encountered exception accepting command : Error executing DDL "insert into Member (id, name, email, phone_number) values (0, 'John Smith', 'john.smith@mailinator.com', '2125551212')" via JDBC Statement: org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "insert into Member (id, name, email, phone_number) values (0, 'John Smith', 'john.smith@mailinator.com', '2125551212')" via JDBC Statement