Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1242085

Summary: [GSS](6.4.z) ClassNotFoundException when session replication is triggered
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Shay Matasaro <smatasar>
Component: CDI/WeldAssignee: Bartek Spyrko-Smietanko <bspyrkos>
Status: CLOSED CURRENTRELEASE QA Contact: Matous Jobanek <mjobanek>
Severity: unspecified Docs Contact:
Priority: high    
Version: 6.3.0CC: amelicha, bmaxwell, bspyrkos, cdewolf, chaowan, istudens, jharting, maschmid, mjobanek, paul.ferraro, pmuir, rhusar, sdouglas
Target Milestone: CR1   
Target Release: EAP 6.4.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-17 10:52:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1235744, 1245728, 1246463    
Attachments:
Description Flags
demo test app none

Description Shay Matasaro 2015-07-10 21:07:48 UTC
Steps to reproduce:

1) Use the attached demo app, which is the same as the example project in JBoss Developer Studio 8.1.0.GA via "File - New - JBoss Central - Java EE EAR Project" wizard.

2) deploy the app to two clustered eap 6.3 servers

3) point  the browser to the first server , and register a new user

4) point the browser to the second server , and the below stack trace is thrown.

Comment 1 Shay Matasaro 2015-07-10 21:09:28 UTC
16:51:46,808 WARN  [org.jboss.as.clustering.web.infinispan] (http-/127.0.0.1:8180-1) JBAS010322: Failed to load session DR8BkKvLhPfb8XVKkb16Nbe3: java.lang.RuntimeException: JBAS010333: Failed to load session attributes for session: DR8BkKvLhPfb8XVKkb16Nbe3
	at org.jboss.as.clustering.web.infinispan.DistributedCacheManager$2.invoke(DistributedCacheManager.java:229)
	at org.jboss.as.clustering.web.infinispan.DistributedCacheManager$2.invoke(DistributedCacheManager.java:212)
	at org.jboss.as.clustering.infinispan.invoker.SimpleCacheInvoker.invoke(SimpleCacheInvoker.java:34)
	at org.jboss.as.clustering.infinispan.invoker.BatchCacheInvoker.invoke(BatchCacheInvoker.java:48)
	at org.jboss.as.clustering.infinispan.invoker.RetryingCacheInvoker.invoke(RetryingCacheInvoker.java:85)
	at org.jboss.as.clustering.web.infinispan.DistributedCacheManager$ForceSynchronousCacheInvoker.invoke(DistributedCacheManager.java:550)
	at org.jboss.as.clustering.web.infinispan.DistributedCacheManager.getData(DistributedCacheManager.java:238)
	at org.jboss.as.clustering.web.infinispan.DistributedCacheManager.getSessionData(DistributedCacheManager.java:196)
	at org.jboss.as.web.session.DistributableSessionManager.loadSession(DistributableSessionManager.java:1429) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
	at org.jboss.as.web.session.DistributableSessionManager.findSession(DistributableSessionManager.java:688) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
	at org.jboss.as.web.session.DistributableSessionManager.findSession(DistributableSessionManager.java:84) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
	at org.apache.catalina.connector.Request.doGetSession(Request.java:2629) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
	at org.apache.catalina.connector.Request.getSession(Request.java:2381) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
	at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:791) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
	at org.jboss.weld.context.beanstore.http.LazySessionBeanStore.getSession(LazySessionBeanStore.java:73) [weld-core-1.1.23.Final-redhat-1.jar:1.1.23.Final-redhat-1]
	at org.jboss.weld.context.beanstore.http.LazySessionBeanStore.<init>(LazySessionBeanStore.java:59) [weld-core-1.1.23.Final-redhat-1.jar:1.1.23.Final-redhat-1]
	at org.jboss.weld.context.http.HttpSessionContextImpl.associate(HttpSessionContextImpl.java:28) [weld-core-1.1.23.Final-redhat-1.jar:1.1.23.Final-redhat-1]
	at org.jboss.weld.context.http.HttpSessionContextImpl.associate(HttpSessionContextImpl.java:16) [weld-core-1.1.23.Final-redhat-1.jar:1.1.23.Final-redhat-1]
	at org.jboss.weld.servlet.WeldListener.requestInitialized(WeldListener.java:205) [weld-core-1.1.23.Final-redhat-1.jar:1.1.23.Final-redhat-1]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:134) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_80]
Caused by: org.jboss.weld.resources.spi.ResourceLoadingException: java.lang.ClassNotFoundException: org.jboss.tools.example.controller.MemberController from [Module "deployment.javaee6earPOC-ear.ear:main" from Service Module Loader]
	at org.jboss.as.weld.WeldModuleResourceLoader.classForName(WeldModuleResourceLoader.java:74) [jboss-as-weld-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
	at org.jboss.weld.injection.FieldInjectionPoint$SerializationProxy.getInjectionTargetClass(FieldInjectionPoint.java:214) [weld-core-1.1.23.Final-redhat-1.jar:1.1.23.Final-redhat-1]
	at org.jboss.weld.injection.FieldInjectionPoint$SerializationProxy.readResolve(FieldInjectionPoint.java:210) [weld-core-1.1.23.Final-redhat-1.jar:1.1.23.Final-redhat-1]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_80]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_80]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_80]
	at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_80]
	at org.jboss.marshalling.reflect.SerializableClass.callReadResolve(SerializableClass.java:413)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1270)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
	at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1712)
	at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1628)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1269)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadCollectionObject(RiverUnmarshaller.java:180)
	at org.jboss.marshalling.river.RiverUnmarshaller.readCollectionData(RiverUnmarshaller.java:773)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:649)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
	at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1712)
	at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1628)
	at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1591)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1269)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
	at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1712)
	at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1628)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1269)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
	at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1712)
	at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1628)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1269)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadCollectionObject(RiverUnmarshaller.java:180)
	at org.jboss.marshalling.river.RiverUnmarshaller.readCollectionData(RiverUnmarshaller.java:773)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:649)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
	at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1712)
	at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1628)
	at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1591)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1269)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
	at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1712)
	at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1628)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1269)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
	at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1712)
	at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1628)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1269)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
	at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)
	at org.jboss.as.clustering.SimpleMarshalledValue.get(SimpleMarshalledValue.java:122)
	at org.jboss.as.clustering.web.impl.SessionAttributeMarshallerImpl.unmarshal(SessionAttributeMarshallerImpl.java:72)
	at org.jboss.as.clustering.web.infinispan.FineSessionAttributeStorage.load(FineSessionAttributeStorage.java:82)
	at org.jboss.as.clustering.web.infinispan.DistributedCacheManager$2.invoke(DistributedCacheManager.java:227)
	... 26 more
Caused by: java.lang.ClassNotFoundException: org.jboss.tools.example.controller.MemberController from [Module "deployment.javaee6earPOC-ear.ear:main" from Service Module Loader]
	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final-redhat-1]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final-redhat-1]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final-redhat-1]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final-redhat-1]
	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final-redhat-1]
	at org.jboss.as.weld.WeldModuleResourceLoader.classForName(WeldModuleResourceLoader.java:68) [jboss-as-weld-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
	... 86 more

Comment 4 Shay Matasaro 2015-07-13 16:13:27 UTC
Created attachment 1051466 [details]
demo test app

Comment 5 Shay Matasaro 2015-07-13 16:14:30 UTC
Hi Chao,

attached is the demo app

Cheers,
Shay

Comment 6 Radoslav Husar 2015-07-14 08:48:09 UTC
Can you confirm that these are the sources of that demo app? 

https://github.com/jboss-developer/jboss-eap-archetypes/tree/6.4.x-develop/jboss-javaee6-webapp-archetype

Comment 13 Bartek Spyrko-Smietanko 2015-07-21 12:29:09 UTC
Created https://issues.jboss.org/browse/WELD-1999

The issue seems to have been introduced with WELD-1111. When the bean using InjectionPoint is deserialized, weld tries to load the target class, but it only has access to the EAR's module and cannot load a class in the WAR sub-deployment.

The issue only affects WELD 1.1

Comment 15 Ivo Studensky 2015-07-23 11:25:02 UTC
Upstream fix has not been accepted.

Comment 21 Matous Jobanek 2015-09-25 10:16:24 UTC
Verified in EAP 6.4.4.CP.CR3

Comment 22 Petr Penicka 2017-01-17 10:52:30 UTC
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.