Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save scottmarlow/ec70cba2d091fc73fff0953b8a402aba to your computer and use it in GitHub Desktop.
Save scottmarlow/ec70cba2d091fc73fff0953b8a402aba to your computer and use it in GitHub Desktop.
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:
getPropertyValues:-1, DataTypes2$HibernateAccessOptimizeratimeDataatsData (com.sun.ts.tests.jpa.core.annotations.access.property)
getPropertyValuesToInsert:4846, AbstractEntityPersister (org.hibernate.persister.entity)
cloneAndSubstituteValues:355, AbstractSaveEventListener (org.hibernate.event.internal)
performSaveOrReplicate:309, AbstractSaveEventListener (org.hibernate.event.internal)
performSave:224, AbstractSaveEventListener (org.hibernate.event.internal)
saveWithGeneratedId:136, AbstractSaveEventListener (org.hibernate.event.internal)
entityIsTransient:177, DefaultPersistEventListener (org.hibernate.event.internal)
persist:95, DefaultPersistEventListener (org.hibernate.event.internal)
onPersist:79, DefaultPersistEventListener (org.hibernate.event.internal)
onPersist:55, DefaultPersistEventListener (org.hibernate.event.internal)
accept:-1, SessionImpl$$Lambda$2204/0x00007ff9c84e4cd8 (org.hibernate.internal)
fireEventOnEachListener:127, EventListenerGroupImpl (org.hibernate.event.service.internal)
firePersist:761, SessionImpl (org.hibernate.internal)
persist:745, SessionImpl (org.hibernate.internal)
persist:566, AbstractEntityManager (org.jboss.as.jpa.container)
createTestData:875, Client (com.sun.ts.tests.jpa.core.annotations.access.property)
setup:51, Client (com.sun.ts.tests.jpa.core.annotations.access.property)
invoke0:-1, NativeMethodAccessorImpl (jdk.internal.reflect)
invoke:77, NativeMethodAccessorImpl (jdk.internal.reflect)
invoke:43, DelegatingMethodAccessorImpl (jdk.internal.reflect)
invoke:569, Method (java.lang.reflect)
run:569, EETest (com.sun.ts.lib.harness)
run:115, ServiceEETest (com.sun.ts.lib.harness)
runTest:109, PMServletVehicle (com.sun.ts.tests.common.vehicle.pmservlet)
doGet:95, ServletVehicle (com.sun.ts.tests.common.vehicle.servlet)
doPost:115, ServletVehicle (com.sun.ts.tests.common.vehicle.servlet)
service:547, HttpServlet (jakarta.servlet.http)
service:614, HttpServlet (jakarta.servlet.http)
handleRequest:74, ServletHandler (io.undertow.servlet.handlers)
handleRequest:62, ServletSecurityRoleHandler (io.undertow.servlet.handlers.security)
handleRequest:68, ServletChain$1 (io.undertow.servlet.handlers)
handleRequest:36, ServletDispatchingHandler (io.undertow.servlet.handlers)
lambda$handleRequest$1:68, ElytronRunAsHandler (org.wildfly.elytron.web.undertow.server)
call:-1, ElytronRunAsHandler$$Lambda$2178/0x00007ff9c84ad000 (org.wildfly.elytron.web.undertow.server)
apply:-1, Scoped$$Lambda$2179/0x00007ff9c84ae4a0 (org.wildfly.security.auth.server)
apply:-1, Scoped$$Lambda$2180/0x00007ff9c84ae740 (org.wildfly.security.auth.server)
runAsFunctionEx:103, FlexibleIdentityAssociation (org.wildfly.security.auth.server)
runAsFunctionEx:161, Scoped (org.wildfly.security.auth.server)
runAs:73, Scoped (org.wildfly.security.auth.server)
handleRequest:67, ElytronRunAsHandler (org.wildfly.elytron.web.undertow.server)
handleRequest:68, RedirectDirHandler (io.undertow.servlet.handlers)
handleRequest:117, SSLInformationAssociationHandler (io.undertow.servlet.handlers.security)
handleRequest:57, ServletAuthenticationCallHandler (io.undertow.servlet.handlers.security)
handleRequest:43, PredicateHandler (io.undertow.server.handlers)
handleRequest:46, AbstractConfidentialityHandler (io.undertow.security.handlers)
handleRequest:64, ServletConfidentialityConstraintHandler (io.undertow.servlet.handlers.security)
handleRequest:43, AbstractSecurityContextAssociationHandler (io.undertow.security.handlers)
handleRequest:38, CleanUpHandler (org.wildfly.elytron.web.undertow.server.servlet)
handleRequest:43, PredicateHandler (io.undertow.server.handlers)
handleRequest:44, JACCContextIdHandler (org.wildfly.extension.undertow.security.jacc)
handleRequest:43, PredicateHandler (io.undertow.server.handlers)
handleRequest:51, GlobalRequestControllerHandler (org.wildfly.extension.undertow.deployment)
handleRequest:52, SendErrorPageHandler (io.undertow.servlet.handlers)
handleRequest:43, PredicateHandler (io.undertow.server.handlers)
handleFirstRequest:276, ServletInitialHandler (io.undertow.servlet.handlers)
call:135, ServletInitialHandler$2 (io.undertow.servlet.handlers)
call:132, ServletInitialHandler$2 (io.undertow.servlet.handlers)
call:48, ServletRequestContextThreadSetupAction$1 (io.undertow.servlet.core)
call:43, ContextClassLoaderSetupAction$1 (io.undertow.servlet.core)
lambda$create$0:1421, UndertowDeploymentInfoService$UndertowThreadSetupAction (org.wildfly.extension.undertow.deployment)
call:-1, UndertowDeploymentInfoService$UndertowThreadSetupAction$$Lambda$2161/0x00007ff9c847a368 (org.wildfly.extension.undertow.deployment)
lambda$create$0:1421, UndertowDeploymentInfoService$UndertowThreadSetupAction (org.wildfly.extension.undertow.deployment)
call:-1, UndertowDeploymentInfoService$UndertowThreadSetupAction$$Lambda$2161/0x00007ff9c847a368 (org.wildfly.extension.undertow.deployment)
lambda$create$0:1421, UndertowDeploymentInfoService$UndertowThreadSetupAction (org.wildfly.extension.undertow.deployment)
call:-1, UndertowDeploymentInfoService$UndertowThreadSetupAction$$Lambda$2161/0x00007ff9c847a368 (org.wildfly.extension.undertow.deployment)
lambda$create$0:1421, UndertowDeploymentInfoService$UndertowThreadSetupAction (org.wildfly.extension.undertow.deployment)
call:-1, UndertowDeploymentInfoService$UndertowThreadSetupAction$$Lambda$2161/0x00007ff9c847a368 (org.wildfly.extension.undertow.deployment)
lambda$create$0:1421, UndertowDeploymentInfoService$UndertowThreadSetupAction (org.wildfly.extension.undertow.deployment)
call:-1, UndertowDeploymentInfoService$UndertowThreadSetupAction$$Lambda$2161/0x00007ff9c847a368 (org.wildfly.extension.undertow.deployment)
dispatchRequest:256, ServletInitialHandler (io.undertow.servlet.handlers)
handleRequest:101, ServletInitialHandler$1 (io.undertow.servlet.handlers)
executeRootHandler:395, Connectors (io.undertow.server)
run:861, HttpServerExchange$1 (io.undertow.server)
run:35, ContextClassLoaderSavingRunnable (org.jboss.threads)
safeRun:1990, EnhancedQueueExecutor (org.jboss.threads)
doRunTask:1486, EnhancedQueueExecutor$ThreadBody (org.jboss.threads)
run:1348, EnhancedQueueExecutor$ThreadBody (org.jboss.threads)
run:1282, XnioWorker$WorkerThreadFactory$1$1 (org.xnio)
run:840, Thread (java.lang)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment