Scott Marlow (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiZjY0NGEwYjZh...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-15717?atlOrigin=eyJpIjoiZjY0NG...
) HHH-15717 (
https://hibernate.atlassian.net/browse/HHH-15717?atlOrigin=eyJpIjoiZjY0NG...
) SQL script executed twice when using persistence.xml
jakarta.persistence.sql-load-script-source property (
https://hibernate.atlassian.net/browse/HHH-15717?atlOrigin=eyJpIjoiZjY0NG...
)
Issue Type: Bug Affects Versions: 6.1.3 Assignee: Unassigned Created: 14/Nov/2022 12:08 PM
Environment: To build wildfly locally (note the `wildfly-28.0.0.Beta1-SNAPSHOT` reference
may need to change to a newer WF release):
git clone
https://github.com/wildfly/wildfly/ (
https://github.com/wildfly/wildfly/ )
cd wildfly
./build.sh clean install -DskipTests=true
cd dist/target/wildfly-28.0.0.Beta1-SNAPSHOT/bin
./standalone.sh
git clone
https://github.com/emmartins/quickstart/ (
https://github.com/emmartins/quickstart/ )
cd quickstart/kitchensink
git checkout sqlscriptruntwice
mvn clean install wildfly:deploy
Priority: Major Reporter: Scott Marlow (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
As per
https://issues.redhat.com/browse/WFLY-16864 (
https://issues.redhat.com/browse/WFLY-16864 ) , the
https://github.com/emmartins/quickstart/tree/sqlscriptruntwice (
https://github.com/emmartins/quickstart/tree/sqlscriptruntwice ) (kitchensink folder)
contains a test that when run against WildFly with Hibernate ORM 6.1.5.Final (or earlier
6.x ORM releases), will reproduce the failure mentioned in WFLY-16864
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(a)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(a)mailinator.com', '2125551212')" via JDBC
Statement
The first run of the database script is from
https://github.com/hibernate/hibernate-orm/blob/09299e1f417a193dabf0e020f...
(
https://github.com/hibernate/hibernate-orm/blob/09299e1f417a193dabf0e020f...
) and the second is from
https://github.com/hibernate/hibernate-orm/blob/09299e1f417a193dabf0e020f...
(
https://github.com/hibernate/hibernate-orm/blob/09299e1f417a193dabf0e020f...
)
I just reproduced this again but didn’t verify that the same lines of code are reached.
(
https://hibernate.atlassian.net/browse/HHH-15717#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15717#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100210- sha1:583150f )