[JIRA] (HHH-16572) jpa/core/query/flushmode TCK test failures
by Scott Marlow (JIRA)
Scott Marlow ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%... ) *commented* on HHH-16572 ( https://hibernate.atlassian.net/browse/HHH-16572?atlOrigin=eyJpIjoiYWUzYT... )
Re: jpa/core/query/flushmode TCK test failures ( https://hibernate.atlassian.net/browse/HHH-16572?atlOrigin=eyJpIjoiYWUzYT... )
I was just looking at the following TRACE output from deployment which hints that the problem may be in WildFly and not Hibernate:
2023-05-09 08:41:20,623 TRACE [org.jboss.as.jpa] (MSC service thread 1-5) added PersistenceUnitService (phase 2 of 2) for 'service jboss.persistenceunit."jpa_core_query_flushmode_vehicles.ear/jpa_core_query_flushmode_puservlet_vehicle_we
{{b.war#CTS-EM"'. PU is ready for injector action. }}
2023-05-09 08:41:20,732 INFO [org.jboss.as.jpa] (ServerService Thread Pool – 227) WFLYJPA0010: Starting Persistence Unit (phase 2 of 2) Service 'jpa_core_query_flushmode_vehicles.ear/jpa_core_query_flushmode_puservlet_vehicle_web.war#C
{{TS-EM' }}
2023-05-09 08:41:20,732 INFO [org.jboss.as.jpa] (ServerService Thread Pool – 232) WFLYJPA0010: Starting Persistence Unit (phase 2 of 2) Service 'jpa_core_query_flushmode_vehicles.ear/jpa_core_query_flushmode_pmservlet_vehicle_web.war#C
{{TS-EM-NOTX' }}
2023-05-09 08:41:20,732 INFO [org.jboss.as.jpa] (ServerService Thread Pool – 231) WFLYJPA0010: Starting Persistence Unit (phase 2 of 2) Service 'jpa_core_query_flushmode_vehicles.ear/jpa_core_query_flushmode_puservlet_vehicle_web.war#C
{{TS-EM2' }}
2023-05-09 08:41:20,732 INFO [org.jboss.as.jpa] (ServerService Thread Pool – 88) WFLYJPA0010: Starting Persistence Unit (phase 2 of 2) Service 'jpa_core_query_flushmode_vehicles.ear/jpa_core_query_flushmode_pmservlet_vehicle_web.war#CT
{{S-EM2' }}
{{2023-05-09 08:41:20,732 INFO [org.jboss.as.jpa] (ServerService Thread Pool – 225) WFLYJPA0010: Starting Persistence Unit (phase 2 of 2) Service 'jpa_core_query_flushmode_vehicles.ear#CTS-EM' }}
2023-05-09 08:41:20,732 INFO [org.jboss.as.jpa] (ServerService Thread Pool – 230) WFLYJPA0010: Starting Persistence Unit (phase 2 of 2) Service 'jpa_core_query_flushmode_vehicles.ear/jpa_core_query_flushmode_pmservlet_vehicle_web.war#C
{{TS-EM' }}
{{2023-05-09 08:41:20,732 INFO [org.jboss.as.jpa] (ServerService Thread Pool – 226) WFLYJPA0010: Starting Persistence Unit (phase 2 of 2) Service 'jpa_core_query_flushmode_vehicles.ear#CTS-EM-NOTX' }}
2023-05-09 08:41:20,732 INFO [org.jboss.as.jpa] (ServerService Thread Pool – 229) WFLYJPA0010: Starting Persistence Unit (phase 2 of 2) Service 'jpa_core_query_flushmode_vehicles.ear/jpa_core_query_flushmode_puservlet_vehicle_web.war#C
{{TS-EM-NOTX' }}
{{2023-05-09 08:41:20,732 INFO [org.jboss.as.jpa] (ServerService Thread Pool – 228) WFLYJPA0010: Starting Persistence Unit (phase 2 of 2) Service 'jpa_core_query_flushmode_vehicles.ear#CTS-EM2' }}
2023-05-09 08:41:20,782 TRACE [org.jboss.as.jpa] (ServerService Thread Pool – 227) rewrite entity class 'com/sun/ts/tests/jpa/common/schema30/Department' using transformer 'org.hibernate.jpa.internal.enhance.EnhancingClassTransformerImp
{{l' for 'jpa_core_query_flushmode_vehicles.ear/jpa_core_query_flushmode_puservlet_vehicle_web.war#CTS-EM2' }}
2023-05-09 08:41:20,782 TRACE [org.jboss.as.jpa] (ServerService Thread Pool – 225) rewrite entity class 'com/sun/ts/tests/jpa/common/schema30/Department' using transformer 'org.hibernate.jpa.internal.enhance.EnhancingClassTransformerImp
{{l' for 'jpa_core_query_flushmode_vehicles.ear#CTS-EM2' }}
2023-05-09 08:41:20,782 TRACE [org.jboss.as.jpa] (ServerService Thread Pool – 88) rewrite entity class 'com/sun/ts/tests/jpa/common/schema30/Department' using transformer 'org.hibernate.jpa.internal.enhance.EnhancingClassTransformerImpl
{{' for 'jpa_core_query_flushmode_vehicles.ear/jpa_core_query_flushmode_pmservlet_vehicle_web.war#CTS-EM2' }}
2023-05-09 08:41:20,782 TRACE [org.jboss.as.jpa] (ServerService Thread Pool – 230) rewrite entity class 'com/sun/ts/tests/jpa/common/schema30/Department' using transformer 'org.hibernate.jpa.internal.enhance.EnhancingClassTransformerImp
{{l' for 'jpa_core_query_flushmode_vehicles.ear/jpa_core_query_flushmode_pmservlet_vehicle_web.war#CTS-EM2' }}
2023-05-09 08:41:20,782 TRACE [org.jboss.as.jpa] (ServerService Thread Pool – 226) rewrite entity class 'com/sun/ts/tests/jpa/common/schema30/Department' using transformer 'org.hibernate.jpa.internal.enhance.EnhancingClassTransformerImp
{{l' for 'jpa_core_query_flushmode_vehicles.ear#CTS-EM2' }}
2023-05-09 08:41:20,782 TRACE [org.jboss.as.jpa] (ServerService Thread Pool – 228) rewrite entity class 'com/sun/ts/tests/jpa/common/schema30/Department' using transformer 'org.hibernate.jpa.internal.enhance.EnhancingClassTransformerImp
{{l' for 'jpa_core_query_flushmode_vehicles.ear#CTS-EM2' }}
2023-05-09 08:41:20,782 TRACE [org.jboss.as.jpa] (ServerService Thread Pool – 229) rewrite entity class 'com/sun/ts/tests/jpa/common/schema30/Department' using transformer 'org.hibernate.jpa.internal.enhance.EnhancingClassTransformerImp
{{l' for 'jpa_core_query_flushmode_vehicles.ear/jpa_core_query_flushmode_puservlet_vehicle_web.war#CTS-EM2' }}
2023-05-09 08:41:20,782 TRACE [org.jboss.as.jpa] (ServerService Thread Pool – 231) rewrite entity class 'com/sun/ts/tests/jpa/common/schema30/Department' using transformer 'org.hibernate.jpa.internal.enhance.EnhancingClassTransformerImp
{{l' for 'jpa_core_query_flushmode_vehicles.ear/jpa_core_query_flushmode_puservlet_vehicle_web.war#CTS-EM2' }}
2023-05-09 08:41:20,782 TRACE [org.jboss.as.jpa] (ServerService Thread Pool – 232) rewrite entity class 'com/sun/ts/tests/jpa/common/schema30/Department' using transformer 'org.hibernate.jpa.internal.enhance.EnhancingClassTransformerImp
{{l' for 'jpa_core_query_flushmode_vehicles.ear/jpa_core_query_flushmode_pmservlet_vehicle_web.war#CTS-EM2' }}
{{2023-05-09 08:41:20,953 TRACE [org.jboss.as.jpa] (ServerService Thread Pool – 231) entity class 'com/sun/ts/tests/jpa/common/schema30/Department' was rewritten }}
{{2023-05-09 08:41:20,953 TRACE [org.jboss.as.jpa] (ServerService Thread Pool – 88) entity class 'com/sun/ts/tests/jpa/common/schema30/Department' was rewritten }}
{{2023-05-09 08:41:20,953 TRACE [org.jboss.as.jpa] (ServerService Thread Pool – 232) entity class 'com/sun/ts/tests/jpa/common/schema30/Department' was rewritten }}
{{2023-05-09 08:41:20,953 TRACE [org.jboss.as.jpa] (ServerService Thread Pool – 225) entity class 'com/sun/ts/tests/jpa/common/schema30/Department' was rewritten }}
{{2023-05-09 08:41:20,953 TRACE [org.jboss.as.jpa] (ServerService Thread Pool – 228) entity class 'com/sun/ts/tests/jpa/common/schema30/Department' was rewritten }}
{{2023-05-09 08:41:20,953 TRACE [org.jboss.as.jpa] (ServerService Thread Pool – 227) entity class 'com/sun/ts/tests/jpa/common/schema30/Department' was rewritten }}
{{2023-05-09 08:41:20,953 TRACE [org.jboss.as.jpa] (ServerService Thread Pool – 226) entity class 'com/sun/ts/tests/jpa/common/schema30/Department' was rewritten }}
{{2023-05-09 08:41:20,953 TRACE [org.jboss.as.jpa] (ServerService Thread Pool – 230) entity class 'com/sun/ts/tests/jpa/common/schema30/Department' was rewritten }}
{{2023-05-09 08:41:20,953 TRACE [org.jboss.as.jpa] (ServerService Thread Pool – 229) entity class 'com/sun/ts/tests/jpa/common/schema30/Department' was rewritten }}
{{2023-05-09 08:41:20,954 TRACE [org.jboss.as.jpa] (ServerService Thread Pool – 229) save entity class 'com/sun/ts/tests/jpa/common/schema30/Department' to /tmp/jpa/com/sun/ts/tests/jpa/common/schema30/Department.class }}
{{2023-05-09 08:41:20,954 TRACE [org.jboss.as.jpa] (ServerService Thread Pool – 231) save entity class 'com/sun/ts/tests/jpa/common/schema30/Department' to /tmp/jpa/com/sun/ts/tests/jpa/common/schema30/Department.class }}
{{2023-05-09 08:41:20,954 TRACE [org.jboss.as.jpa] (ServerService Thread Pool – 226) save entity class 'com/sun/ts/tests/jpa/common/schema30/Department' to /tmp/jpa/com/sun/ts/tests/jpa/common/schema30/Department.class }}
{{2023-05-09 08:41:20,954 TRACE [org.jboss.as.jpa] (ServerService Thread Pool – 230) save entity class 'com/sun/ts/tests/jpa/common/schema30/Department' to /tmp/jpa/com/sun/ts/tests/jpa/common/schema30/Department.class }}
{{2023-05-09 08:41:20,954 TRACE [org.jboss.as.jpa] (ServerService Thread Pool – 88) save entity class 'com/sun/ts/tests/jpa/common/schema30/Department' to /tmp/jpa/com/sun/ts/tests/jpa/common/schema30/Department.class }}
{{2023-05-09 08:41:20,954 TRACE [org.jboss.as.jpa] (ServerService Thread Pool – 232) save entity class 'com/sun/ts/tests/jpa/common/schema30/Department' to /tmp/jpa/com/sun/ts/tests/jpa/common/schema30/Department.class }}
2023-05-09 08:41:20,954 TRACE [org.jboss.as.jpa] (ServerService Thread Pool – 225) save entity class 'com/sun/ts/tests/jpa/common/schema30/Department' to /tmp/jpa/com/sun/ts/tests/jpa/common/schema30/Department.class
I suspect that WildFly (JPA/Persistence container) needs to ensure that only one thread at a time enhances the same application defined class. The above output seems racy to me. I'll try a quick hack to validate.
( https://hibernate.atlassian.net/browse/HHH-16572#add-comment?atlOrigin=ey... ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-16572#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=EmailN... ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100225- sha1:b79b7f6 )
2 years, 11 months