This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/ByteBuddyState.java b/hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/ByteBuddyState.java | |
index 2bdfb646bf..613604561c 100644 | |
--- a/hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/ByteBuddyState.java | |
+++ b/hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/ByteBuddyState.java | |
@@ -237,22 +237,25 @@ public final class ByteBuddyState { | |
catch (ClassNotFoundException e) { | |
// Ignore | |
} | |
- try { | |
- return make( makeClassFunction.apply( byteBuddy, new FixedNamingStrategy( className ) ) ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load:217, ByteBuddyState (org.hibernate.bytecode.internal.bytebuddy) | |
loadProxy:133, ByteBuddyState (org.hibernate.bytecode.internal.bytebuddy) | |
buildProxy:57, ByteBuddyProxyHelper (org.hibernate.proxy.pojo.bytebuddy) | |
postInstantiate:56, ByteBuddyProxyFactory (org.hibernate.proxy.pojo.bytebuddy) | |
createProxyFactory:280, EntityRepresentationStrategyPojoStandard (org.hibernate.metamodel.internal) | |
resolveProxyFactory:169, EntityRepresentationStrategyPojoStandard (org.hibernate.metamodel.internal) | |
<init>:135, EntityRepresentationStrategyPojoStandard (org.hibernate.metamodel.internal) | |
resolveStrategy:48, ManagedTypeRepresentationResolverStandard (org.hibernate.metamodel.internal) | |
<init>:517, AbstractEntityPersister (org.hibernate.persister.entity) | |
<init>:116, SingleTableEntityPersister (org.hibernate.persister.entity) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Class<?> load(Class<?> referenceClass, String className, BiFunction<ByteBuddy, NamingStrategy, DynamicType.Builder<?>> makeClassFunction) { | |
if (result.getClassLoader() == referenceClass.getClassLoader()) { | |
try { | |
return referenceClass.getClassLoader().loadClass(className); | |
} | |
catch (ClassNotFoundException e) { | |
// Ignore | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2025-06-09 14:48:56,493 INFO [org.hibernate.bytecode.internal.bytebuddy.ByteBuddyState] (ServerService Thread Pool -- 10) xxx ByteBuddyState.load detected problem where loading generated class "com.sun.ts.tests.jpa.core.annotations.access.property.DataTypes2$HibernateAccessOptimizeratimeDataatsData" from a subdeployment is actually loading the generated class in the ear lib. | |
Details: referenceClass.getClassLoader() == ModuleClassLoader for Module "deployment.jpa_core_annotations_access_property_vehicles.ear.jpa_core_annotations_access_property_pmservlet_vehicle_web.war" from Service Module Loader | |
Loaded class classloader = ModuleClassLoader for Module "deployment.jpa_core_annotations_access_property_vehicles.ear" from Service Module Loader | |
2025-06-09 14:48:56,493 ERROR [stderr] (ServerService Thread Pool -- 10) java.lang.Exception: Stack trace | |
2025-06-09 14:48:56,493 ERROR [stderr] (ServerService Thread Pool -- 10) at java.base/java.lang.Thread.dumpStack(Thread.java:1389) | |
2025-06-09 14:48:56,493 ERROR [stde |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2025-06-06 10:48:36,337 INFO [stdout] (default task-1) ************************************************************ | |
2025-06-06 10:48:36,337 INFO [stdout] (default task-1) * props file set to "/tmp/smarlow-cts-props.txt" | |
2025-06-06 10:48:36,337 INFO [stdout] (default task-1) ************************************************************ | |
2025-06-06 10:48:36,337 INFO [stdout] (default task-1) In doPost! | |
2025-06-06 10:48:36,340 INFO [stdout] (default task-1) ServletVehicle - got InputStream | |
2025-06-06 10:48:36,347 INFO [stdout] (default task-1) read properties!!! | |
2025-06-06 10:48:36,372 INFO [stdout] (default task-1) got outputstream | |
2025-06-06 10:48:36,467 INFO [org.hibernate.persister.entity.AbstractEntityPersister] (default task-1) xxx AbstractEntityPersister.getPropertyValuesToInsert called with entity DataTypes[id: 1, Character: a, Short: 100, Integer: 500, Long: 300, Double: 50.0, Float: 1.0, CharacterArrayData: [a],, ByteArrayData: [100],, shouldNotPersist: null] class from classloader ModuleClassLo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test.log:[javatest.batch] 06-05-2025 19:04:04: SVR-ERROR: java.lang.ClassCastException: class com.sun.ts.tests.jpa.core.annotations.access.mappedsc.FullTimeEmployee cannot be cast to class com.sun.ts.tests.jpa.core.annotations.access.mappedsc.FullTimeEmployee (com.sun.ts.tests.jpa.core.annotations.access.mappedsc.FullTimeEmployee is in unnamed module of loader 'deployment.jpa_core_anno_access_mappedsc_vehicles.ear.jpa_core_anno_access_mappedsc_puservlet_vehicle_web.war' @1fc5fb10; com.sun.ts.tests.jpa.core.annotations.access.mappedsc.FullTimeEmployee is in unnamed module of loader 'deployment.jpa_core_anno_access_mappedsc_vehicles.ear' @349ae008) | |
test.log:[javatest.batch] 06-05-2025 19:05:14: SVR-ERROR: java.lang.ClassCastException: class com.sun.ts.tests.jpa.core.annotations.access.mappedsc.FullTimeEmployee cannot be cast to class com.sun.ts.tests.jpa.core.annotations.access.mappedsc.FullTimeEmployee (com.sun.ts.tests.jpa.core.annotations.access.mappedsc.FullTimeEmployee is in unnamed module of loader 'dep |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
org.jboss.arquillian.container.spi.client.container.DeploymentException: Cannot deploy jpa_transaction.jar: {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => {"WFLYCTL0080: Failed services" => {"jboss.persistenceunit.\"jpa_transaction.jar#unsynchronized\"" => "jakarta.persistence.PersistenceException: [PersistenceUnit: unsynchronized] Unable to build Hibernate SessionFactory | |
Caused by: jakarta.persistence.PersistenceException: [PersistenceUnit: unsynchronized] Unable to build Hibernate SessionFactory | |
Caused by: org.hibernate.MappingException: Could not instantiate persister org.hibernate.persister.entity.SingleTableEntityPersister | |
Caused by: java.lang.IllegalStateException: There is no field invocationTarget$2b5kal2 defined on class org.jboss.as.test.integration.jpa.transaction.Employee$HibernateAccessOptimizer5address5name | |
Caused by: java.lang.NoSuchFieldException: invocationTarget$2b5kal2"}}}} | |
org.jboss.arquillian.container.spi.clien |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Test settings: | |
export testName=propertyTypeTest1_from_pmservlet | |
export testFolder=jpa/core/annotations/access/property | |
export wildflytckroot=$PWD | |
export singlecpu=yes | |
2. Test notes: | |
Note that the EAR deployment contains jpa_core_annotations_access_property_pmservlet_vehicle_web.war (I'll refer to this war as pmservlet_vehicle_web.war) which is used for this test run. Other contained wars are deployed but not used in this test run. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In the below getPropertyValuesToInsert() (line 12) we have the entity (war classloader) and the accessOptimizer (ear classloader): | |
entity.getClass().getClassLoader() = "deployment.jpa_core_annotations_access_property_vehicles.ear.jpa_core_annotations_access_property_pmservlet_vehicle_web.war" | |
accessOptimizer.getClass().getClassLoader() = ModuleClassLoader for Module "deployment.jpa_core_annotations_access_property_vehicles.ear" | |
The ClassCastException is actually thrown from the generated DataTypes2$HibernateAccessOptimizeratimeDataatsData | |
ClassCastException callstack: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2025-05-30 11:03:13,959 INFO [stdout] (ServerService Thread Pool -- 3) 1: xxx AggregatedClassLoader.findClass( org.jboss.as.test.integration.jpa.hhh18901.DataTypes_) using classloader deployment.hhh18901.ear | |
2025-05-30 11:03:13,959 INFO [stdout] (ServerService Thread Pool -- 3) 2: xxx AggregatedClassLoader.findClass( org.jboss.as.test.integration.jpa.hhh18901.DataTypes_) using classloader [email protected] | |
2025-05-30 11:03:13,959 INFO [stdout] (ServerService Thread Pool -- 3) 3: xxx AggregatedClassLoader.findClass( org.jboss.as.test.integration.jpa.hhh18901.DataTypes_) using classloader deployment.hhh18901.ear | |
2025-05-30 11:03:13,959 INFO [stdout] (ServerService Thread Pool -- 3) 4: xxx AggregatedClassLoader.findClass( org.jboss.as.test.integration.jpa.hhh18901.DataTypes_) using classloader app | |
2025-05-30 11:03:13,959 INFO [org.hibernate.boot.registry.classloading.internal.AggregatedClassLoader] (ServerService Thread Pool -- 3) xxx AggregatedClassLoader.newClassLoaderIterator AFTER TCCL = dep |
NewerOlder