]
RH Bugzilla Integration commented on WFLY-4331:
-----------------------------------------------
baranowb <bbaranow(a)redhat.com> changed the Status of [bug
EJB Asynchronous pass POJO by reference leading to ClassCastException
errors in remote invocations
--------------------------------------------------------------------------------------------------
Key: WFLY-4331
URL:
https://issues.jboss.org/browse/WFLY-4331
Project: WildFly
Issue Type: Bug
Components: EJB
Affects Versions: 9.0.0.Alpha1
Reporter: Brad Maxwell
Assignee: Brad Maxwell
Fix For: 9.0.0.Beta1
When invoking EJB asynchronous in different deployments and returning a POJO object,
which will be retrieved using future.get, we have ClassCastException error.
{code}
12:53:50,147 ERROR [io.undertow.request] (default task-2) UT005023: Exception handling
request to /testejb-web/async: java.lang.ClassCastException: rh.test.ReturnObject cannot
be cast to rh.test.ReturnObject
at rh.test.AsyncServlet.doGet(AsyncServlet.java:29) [classes:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
[jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
[jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
[undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at
io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61)
[undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at
io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
[undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at
org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
[undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at
io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
[undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at
io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56)
[undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
[undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at
io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45)
[undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at
io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61)
[undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at
io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58)
[undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at
io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70)
[undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at
io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)
[undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
[undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at
org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
[undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
[undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at
io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:259)
[undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:246)
[undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at
io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:75)
[undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at
io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:165)
[undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197)
[undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:737)
[undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_51]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
{code}