[weld-issues] [JBoss JIRA] Issue Comment Edited: (WELD-863) Replication of EJB Session Beans does not work in cluster

Jozef Hartinger (JIRA) jira-events at lists.jboss.org
Tue Aug 9 04:24:24 EDT 2011


    [ https://issues.jboss.org/browse/WELD-863?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619562#comment-12619562 ] 

Jozef Hartinger edited comment on WELD-863 at 8/9/11 4:22 AM:
--------------------------------------------------------------

I tested the .ear with two standalone as7 instances with standalone-ha configuration and replication still does not work. I can see the following message in the server log:

{noformat}
10:19:06,933 WARN  [org.jboss.as.clustering.web.infinispan.DistributedCacheManager] (http--127.0.0.1-8180-1) Problem accessing session [nQ****V2mfaX]: java.lang.RuntimeException: Failed to load session attributes for session: nQ****V2mfaX
10:19:06,933 DEBUG [org.jboss.as.clustering.web.infinispan.DistributedCacheManager] (http--127.0.0.1-8180-1) Problem accessing session [nQ****V2mfaX]: java.lang.RuntimeException: Failed to load session attributes for session: nQ****V2mfaX: java.lang.RuntimeException: Failed to load session attributes for session: nQ****V2mfaX
        at org.jboss.as.clustering.web.infinispan.DistributedCacheManager.getRuntimeException(DistributedCacheManager.java:82)
        at org.jboss.as.clustering.web.infinispan.DistributedCacheManager$3.invoke(DistributedCacheManager.java:285)
        at org.jboss.as.clustering.web.infinispan.DistributedCacheManager$3.invoke(DistributedCacheManager.java:268)
        at org.jboss.as.clustering.infinispan.invoker.RetryingCacheInvoker.invoke(RetryingCacheInvoker.java:67)
        at org.jboss.as.clustering.web.infinispan.DistributedCacheManager.getData(DistributedCacheManager.java:294)
        at org.jboss.as.clustering.web.infinispan.DistributedCacheManager.getSessionData(DistributedCacheManager.java:250)
        at org.jboss.as.web.session.DistributableSessionManager.loadSession(DistributableSessionManager.java:1410) [jboss-as-web-7.1.0.Alpha1-SNAPSHOT.jar:7.1.0.Alpha1-SNAPSHOT]
        at org.jboss.as.web.session.DistributableSessionManager.findSession(DistributableSessionManager.java:701) [jboss-as-web-7.1.0.Alpha1-SNAPSHOT.jar:7.1.0.Alpha1-SNAPSHOT]
        at org.jboss.as.web.session.DistributableSessionManager.findSession(DistributableSessionManager.java:84) [jboss-as-web-7.1.0.Alpha1-SNAPSHOT.jar:7.1.0.Alpha1-SNAPSHOT]
        at org.apache.catalina.connector.Request.doGetSession(Request.java:2618) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
        at org.apache.catalina.connector.Request.getSession(Request.java:2375) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
        at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:841) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
        at org.jboss.weld.context.beanstore.http.LazySessionBeanStore.getSession(LazySessionBeanStore.java:68) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
        at org.jboss.weld.context.beanstore.http.LazySessionBeanStore.<init>(LazySessionBeanStore.java:60) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
        at org.jboss.weld.context.http.HttpSessionContextImpl.associate(HttpSessionContextImpl.java:36) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
        at org.jboss.weld.context.http.HttpSessionContextImpl.associate(HttpSessionContextImpl.java:17) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
        at org.jboss.weld.servlet.WeldListener.requestInitialized(WeldListener.java:154) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
        at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
Caused by: java.lang.ClassNotFoundException: ss.weld.examples.translator.SentenceParsernslator from [Module "deployment.weld-translator.ear.weld-translator.war:main" from Service Module Loader]
        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358)
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)
        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:307)
        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:101)
        at java.lang.Class.forName0(Native Method) [:1.6.0_24]
        at java.lang.Class.forName(Class.java:247) [:1.6.0_24]
        at org.jboss.marshalling.AbstractClassResolver.loadClass(AbstractClassResolver.java:135)
        at org.jboss.marshalling.AbstractClassResolver.resolveClass(AbstractClassResolver.java:116)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:868)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:898)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:898)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1310)
        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:1673)
        at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1589)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1231)
        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:1673)
        at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1589)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1231)
        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:1673)
        at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1589)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1231)
        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:1673)
        at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1589)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1231)
        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.doReadMapObject(RiverUnmarshaller.java:195)
        at org.jboss.marshalling.river.RiverUnmarshaller.readMapData(RiverUnmarshaller.java:791)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:682)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
        at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:37)
        at org.jboss.as.clustering.SimpleMarshalledValue.get(SimpleMarshalledValue.java:84)
        at org.jboss.as.clustering.web.impl.SessionAttributeMarshallerImpl.unmarshal(SessionAttributeMarshallerImpl.java:70)
        at org.jboss.as.clustering.web.infinispan.CoarseSessionAttributeStorage.load(CoarseSessionAttributeStorage.java:65)
        at org.jboss.as.clustering.web.infinispan.DistributedCacheManager$3.invoke(DistributedCacheManager.java:283)
        ... 23 more
{noformat}

      was (Author: jharting):
    I tested the .ear with two standalone as7 instances with standalone-ha configuration and replication still does not work. I can see the following message in the server log:

10:19:06,933 WARN  [org.jboss.as.clustering.web.infinispan.DistributedCacheManager] (http--127.0.0.1-8180-1) Problem accessing session [nQ****V2mfaX]: java.lang.RuntimeException: Failed to load session attributes for session: nQ****V2mfaX
10:19:06,933 DEBUG [org.jboss.as.clustering.web.infinispan.DistributedCacheManager] (http--127.0.0.1-8180-1) Problem accessing session [nQ****V2mfaX]: java.lang.RuntimeException: Failed to load session attributes for session: nQ****V2mfaX: java.lang.RuntimeException: Failed to load session attributes for session: nQ****V2mfaX
        at org.jboss.as.clustering.web.infinispan.DistributedCacheManager.getRuntimeException(DistributedCacheManager.java:82)
        at org.jboss.as.clustering.web.infinispan.DistributedCacheManager$3.invoke(DistributedCacheManager.java:285)
        at org.jboss.as.clustering.web.infinispan.DistributedCacheManager$3.invoke(DistributedCacheManager.java:268)
        at org.jboss.as.clustering.infinispan.invoker.RetryingCacheInvoker.invoke(RetryingCacheInvoker.java:67)
        at org.jboss.as.clustering.web.infinispan.DistributedCacheManager.getData(DistributedCacheManager.java:294)
        at org.jboss.as.clustering.web.infinispan.DistributedCacheManager.getSessionData(DistributedCacheManager.java:250)
        at org.jboss.as.web.session.DistributableSessionManager.loadSession(DistributableSessionManager.java:1410) [jboss-as-web-7.1.0.Alpha1-SNAPSHOT.jar:7.1.0.Alpha1-SNAPSHOT]
        at org.jboss.as.web.session.DistributableSessionManager.findSession(DistributableSessionManager.java:701) [jboss-as-web-7.1.0.Alpha1-SNAPSHOT.jar:7.1.0.Alpha1-SNAPSHOT]
        at org.jboss.as.web.session.DistributableSessionManager.findSession(DistributableSessionManager.java:84) [jboss-as-web-7.1.0.Alpha1-SNAPSHOT.jar:7.1.0.Alpha1-SNAPSHOT]
        at org.apache.catalina.connector.Request.doGetSession(Request.java:2618) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
        at org.apache.catalina.connector.Request.getSession(Request.java:2375) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
        at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:841) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
        at org.jboss.weld.context.beanstore.http.LazySessionBeanStore.getSession(LazySessionBeanStore.java:68) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
        at org.jboss.weld.context.beanstore.http.LazySessionBeanStore.<init>(LazySessionBeanStore.java:60) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
        at org.jboss.weld.context.http.HttpSessionContextImpl.associate(HttpSessionContextImpl.java:36) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
        at org.jboss.weld.context.http.HttpSessionContextImpl.associate(HttpSessionContextImpl.java:17) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
        at org.jboss.weld.servlet.WeldListener.requestInitialized(WeldListener.java:154) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]
        at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
Caused by: java.lang.ClassNotFoundException: ss.weld.examples.translator.SentenceParsernslator from [Module "deployment.weld-translator.ear.weld-translator.war:main" from Service Module Loader]
        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358)
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)
        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:307)
        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:101)
        at java.lang.Class.forName0(Native Method) [:1.6.0_24]
        at java.lang.Class.forName(Class.java:247) [:1.6.0_24]
        at org.jboss.marshalling.AbstractClassResolver.loadClass(AbstractClassResolver.java:135)
        at org.jboss.marshalling.AbstractClassResolver.resolveClass(AbstractClassResolver.java:116)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:868)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:898)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:898)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1310)
        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:1673)
        at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1589)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1231)
        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:1673)
        at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1589)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1231)
        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:1673)
        at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1589)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1231)
        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:1673)
        at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1589)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1231)
        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.doReadMapObject(RiverUnmarshaller.java:195)
        at org.jboss.marshalling.river.RiverUnmarshaller.readMapData(RiverUnmarshaller.java:791)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:682)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
        at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:37)
        at org.jboss.as.clustering.SimpleMarshalledValue.get(SimpleMarshalledValue.java:84)
        at org.jboss.as.clustering.web.impl.SessionAttributeMarshallerImpl.unmarshal(SessionAttributeMarshallerImpl.java:70)
        at org.jboss.as.clustering.web.infinispan.CoarseSessionAttributeStorage.load(CoarseSessionAttributeStorage.java:65)
        at org.jboss.as.clustering.web.infinispan.DistributedCacheManager$3.invoke(DistributedCacheManager.java:283)
        ... 23 more
  
> Replication of EJB Session Beans does not work in cluster
> ---------------------------------------------------------
>
>                 Key: WELD-863
>                 URL: https://issues.jboss.org/browse/WELD-863
>             Project: Weld
>          Issue Type: Bug
>    Affects Versions: 1.1.0.Final, 1.1.1.Final
>         Environment: JBossAS 6 SNAPSHOT (from 2011-03-02) - built in hudson
>            Reporter: Martin Gencur
>            Assignee: Ales Justin
>             Fix For: TBC
>
>         Attachments: weld-translator.ear
>
>
> I tested this feature with JSF/Translator example and I needed to do a few changes to test this feature. My fork of weld-core with the changes can be found at: https://github.com/mgencur/core/tree/cluster-test. I'll also attach a packaged ear of the app which I used.
> Steps to reproduce the bug:
> 1) deploy the attached weld-translator.ear file or checkout my changes from github and build the application
> 2) start first and second instance of the JBossAS to create a cluster (can be found at https://github.com/weld/core/blob/master/examples/README.md)
> 3) deploy the app
> 4) go to your web browser and disable cookies
> 5) go to http://localhost:8080/weld-translator, enter some text and click "Translate"
> 6) now change the port number in the address to 8180 and refresh (note that there should be also jsessionid included in the URL)
> 7) now the text you entered into the text area should be still there (since the value is stored in a field of SFSB which is clustered, but instead, you get the following exception at the slave JBossAS instance:
> 12:00:16,662 WARN  [org.jboss.web.tomcat.service.session.distributedcache.ispn.DistributedCacheManager] Problem accessing session [hz****59+A__]: org.jboss.weld.exceptions.WeldException: WELD-001500 Failed to deserialize proxy object
> Note that if you then go to the first address (with port 8080) and then again to 8180 - from now the replication works fine. But IMHO this is not desired behaviour, the second (backup) JBoss instance should be ready immediately
> The question is if the changes of the application are the right ones. There is nobody here who could confirm this. Please pay attention to it and comment this issue if it's not correct.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list