PS: just tested your app (github) and didnt get any issue

any help to reproduce it?

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/2/7 Romain Manni-Bucau <[email protected]>

> the test is value == null or not so whatever you put to activate it it
> will be on.
>
> then the property "tomee.session-context.wrapper" can be direct or
> something else. Direct is the most efficient but only works for single
> instance since it uses directly the internal session of tomcat.
>
> Normally nothing more is needed to be configured while the instances are
> iso regarding the serialization (same JVM, same webapps deployed...)
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
> 2013/2/7 <[email protected]>
>
> Did you mean openejb.session-context = http (not true) ?
>>
>> I have checked that app is deployed on both nodes. Still have an
>> exception.
>> Are there some specific settings for CDI beans replication?
>> -----Ursprüngliche Nachricht-----
>> Von: Romain Manni-Bucau [mailto:[email protected]]
>> Gesendet: Donnerstag, 7. Februar 2013 11:59
>> An: [email protected]
>> Betreff: Re: AW: Passivation capable CDI beans replication across cluster
>> does not work
>>
>> when i got this error the app on a node was not yet deployed so the class
>> was not able to be found
>>
>> conf/system.properties:
>> openejb.session-context = true
>>
>> # optional normally
>> tomee.session-context.wrapper = http # or direct if single instance
>>
>> *Romain Manni-Bucau*
>> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
>> *Blog: **http://rmannibucau.wordpress.com/*<
>> http://rmannibucau.wordpress.com/>
>> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>> *Github: https://github.com/rmannibucau*
>>
>>
>>
>> 2013/2/7 <[email protected]>
>>
>> > Hi,
>> >
>> > Session replication is still not working. Just tested my
>> > application(JSF 2.0, EJB, CDI, CODI) and got exception after TomEE has
>> > tried to replicate the session.
>> > I would like to reproduce this exception in test app, but have no idea
>> > how to do it.
>> > Could you also please summarize, which properties in system.properties
>> > should I set, to get replication working?
>> >
>> > SEVERE: Manager [/CDP_v10]: Unable to receive message through TCP
>> > channel
>> > java.lang.RuntimeException: by java.lang.NoClassDefFoundError:
>> >
>> org/apache/myfaces/extensions/cdi/jsf/impl/scope/conversation/spi/EditableWindowContext
>> >         at
>> > javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:515)
>> >         at
>> > javassist.util.proxy.ProxyFactory.createClass2(ProxyFactory.java:492)
>> >         at
>> > javassist.util.proxy.ProxyFactory.createClass1(ProxyFactory.java:428)
>> >         at
>> > javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:420)
>> >         at
>> >
>> javassist.util.proxy.SerializedProxy.readResolve(SerializedProxy.java:85)
>> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> >         at
>> >
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>> >         at
>> >
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> >         at java.lang.reflect.Method.invoke(Method.java:601)
>> >         at
>> > java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1091)
>> >         at
>> >
>> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1780)
>> >         at
>> > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
>> >         at
>> > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
>> >         at
>> > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
>> >         at
>> >
>> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
>> >         at
>> > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
>> >         at
>> > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
>> >         at
>> > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
>> >         at
>> >
>> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
>> >         at
>> > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
>> >         at
>> java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
>> >         at
>> >
>> java.util.concurrent.ConcurrentHashMap.readObject(ConcurrentHashMap.java:1557)
>> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> >         at
>> >
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>> >         at
>> >
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> >         at java.lang.reflect.Method.invoke(Method.java:601)
>> >         at
>> > java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1004)
>> >         at
>> > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1866)
>> >         at
>> >
>> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
>> >         at
>> > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
>> >         at
>> > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
>> >         at
>> > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
>> >         at
>> >
>> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
>> >         at
>> > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
>> >         at
>> > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
>> >         at
>> > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
>> >         at
>> >
>> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
>> >         at
>> > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
>> >         at
>> java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
>> >         at
>> >
>> java.util.concurrent.ConcurrentHashMap.readObject(ConcurrentHashMap.java:1557)
>> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> >         at
>> >
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>> >         at
>> >
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> >         at java.lang.reflect.Method.invoke(Method.java:601)
>> >         at
>> > java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1004)
>> >         at
>> > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1866)
>> >         at
>> >
>> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
>> >         at
>> > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
>> >         at
>> > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
>> >         at
>> > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
>> >         at
>> >
>> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
>> >         at
>> > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
>> >         at
>> java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
>> >         at
>> >
>> java.util.concurrent.ConcurrentHashMap.readObject(ConcurrentHashMap.java:1557)
>> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> >         at
>> >
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>> >         at
>> >
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> >         at java.lang.reflect.Method.invoke(Method.java:601)
>> >         at
>> > java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1004)
>> >         at
>> > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1866)
>> >         at
>> >
>> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
>> >         at
>> > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
>> >         at
>> > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
>> >         at
>> > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
>> >         at
>> >
>> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
>> >         at
>> > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
>> >         at
>> > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
>> >         at
>> > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
>> >         at
>> >
>> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
>> >         at
>> > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
>> >         at
>> > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
>> >         at
>> > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
>> >         at
>> >
>> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
>> >         at
>> > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
>> >         at
>> java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
>> >         at
>> >
>> org.apache.catalina.ha.session.DeltaRequest$AttributeInfo.readExternal(DeltaRequest.java:378)
>> >         at
>> >
>> org.apache.catalina.ha.session.DeltaRequest.readExternal(DeltaRequest.java:268)
>> >         at
>> >
>> org.apache.catalina.ha.session.DeltaManager.deserializeDeltaRequest(DeltaManager.java:604)
>> >         at
>> >
>> org.apache.catalina.ha.session.DeltaManager.handleSESSION_DELTA(DeltaManager.java:1346)
>> >         at
>> >
>> org.apache.catalina.ha.session.DeltaManager.messageReceived(DeltaManager.java:1293)
>> >         at
>> >
>> org.apache.catalina.ha.session.DeltaManager.messageDataReceived(DeltaManager.java:1014)
>> >         at
>> >
>> org.apache.catalina.ha.session.ClusterSessionListener.messageReceived(ClusterSessionListener.java:92)
>> >         at
>> >
>> org.apache.catalina.ha.tcp.SimpleTcpCluster.messageReceived(SimpleTcpCluster.java:924)
>> >         at
>> >
>> org.apache.catalina.ha.tcp.SimpleTcpCluster.messageReceived(SimpleTcpCluster.java:905)
>> >         at
>> >
>> org.apache.catalina.tribes.group.GroupChannel.messageReceived(GroupChannel.java:278)
>> >         at
>> >
>> org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:84)
>> >         at
>> >
>> org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:84)
>> >         at
>> >
>> org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.messageReceived(TcpFailureDetector.java:114)
>> >         at
>> >
>> org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:84)
>> >         at
>> >
>> org.apache.catalina.tribes.group.ChannelCoordinator.messageReceived(ChannelCoordinator.java:253)
>> >         at
>> >
>> org.apache.catalina.tribes.transport.ReceiverBase.messageDataReceived(ReceiverBase.java:287)
>> >         at
>> >
>> org.apache.catalina.tribes.transport.nio.NioReplicationTask.drainChannel(NioReplicationTask.java:212)
>> >         at
>> >
>> org.apache.catalina.tribes.transport.nio.NioReplicationTask.run(NioReplicationTask.java:101)
>> >         at
>> >
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>> >         at
>> >
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>> >         at java.lang.Thread.run(Thread.java:722)
>> > Caused by: javassist.CannotCompileException: by
>> > java.lang.NoClassDefFoundError:
>> >
>> org/apache/myfaces/extensions/cdi/jsf/impl/scope/conversation/spi/EditableWindowContext
>> >         at
>> > javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:170)
>> >         at
>> > javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:507)
>> >         ... 95 more
>> > Caused by: java.lang.NoClassDefFoundError:
>> >
>> org/apache/myfaces/extensions/cdi/jsf/impl/scope/conversation/spi/EditableWindowContext
>> >         at java.lang.ClassLoader.defineClass1(Native Method)
>> >         at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
>> >         at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
>> >         at
>> >
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> >         at java.lang.reflect.Method.invoke(Method.java:601)
>> >         at
>> > javassist.util.proxy.FactoryHelper.toClass2(FactoryHelper.java:182)
>> >         at
>> > javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:164)
>> >         ... 96 more
>> > Caused by: java.lang.ClassNotFoundException:
>> >
>> org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.spi.EditableWindowContext
>> >         at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
>> >         at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
>> >         at java.security.AccessController.doPrivileged(Native Method)
>> >         at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
>> >         at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
>> >         at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
>> >         ... 103 more
>> >
>> >
>> > -----Ursprüngliche Nachricht-----
>> > Von: Romain Manni-Bucau [mailto:[email protected]]
>> > Gesendet: Freitag, 4. Januar 2013 15:57
>> > An: [email protected]
>> > Betreff: Re: AW: Passivation capable CDI beans replication across
>> > cluster does not work
>> >
>> > this issue should be fixed on trunk + it should work without the
>> > wrapper property now
>> >
>> > Romain Manni-Bucau
>> > Twitter: @rmannibucau
>> > Blog: http://rmannibucau.wordpress.com/
>> > LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> > Github: https://github.com/rmannibucau
>> >
>> >
>> >
>> > 2013/1/4  <[email protected]>:
>> > > Just tested with snapshot 1.5.2-20130104.041348-22:
>> > > -Dtomee.session-context.wrapper=http only - no effect both
>> > > -Dtomee.session-context.wrapper=http and
>> > > -Dopenejb.session-context=http
>> > - got exception:
>> > >
>> > > java.lang.ClassCastException: java.lang.String cannot be cast to
>> > javax.enterprise.context.spi.Contextual
>> > >
>> > org.apache.tomee.catalina.cdi.SessionContextBackedByHttpSession.key(Se
>> > ssionContextBackedByHttpSession.java:62)
>> > >
>> > org.apache.tomee.catalina.cdi.SessionContextBackedByHttpSession.access
>> > $000(SessionContextBackedByHttpSession.java:21)
>> > >
>> > org.apache.tomee.catalina.cdi.SessionContextBackedByHttpSession$HttpSe
>> > ssionMap.get(SessionContextBackedByHttpSession.java:223)
>> > >
>> > org.apache.tomee.catalina.cdi.SessionContextBackedByHttpSession$HttpSe
>> > ssionMap.putIfAbsent(SessionContextBackedByHttpSession.java:249)
>> > >
>> > org.apache.tomee.catalina.cdi.SessionContextBackedByHttpSession$HttpSe
>> > ssionMap.putIfAbsent(SessionContextBackedByHttpSession.java:164)
>> > >
>> > org.apache.webbeans.context.AbstractContext.createContextualBag(Abstra
>> > ctContext.java:82)
>> > >
>> > org.apache.webbeans.context.AbstractContext.initContextualBag(Abstract
>> > Context.java:72)
>> > >
>> > org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.initi
>> > ateBeanBag(NormalScopedBeanInterceptorHandler.java:73)
>> > >
>> > org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.<init
>> > >(NormalScopedBeanInterceptorHandler.java:62)
>> > >
>> > org.apache.webbeans.proxy.ProxyFactory.createInterceptorHandler(ProxyF
>> > actory.java:282)
>> > >
>> > org.apache.webbeans.proxy.ProxyFactory.createNormalScopedBeanProxy(Pro
>> > xyFactory.java:225)
>> > >
>> > org.apache.webbeans.container.BeanManagerImpl.getReference(BeanManager
>> > Impl.java:850)
>> > >
>> > org.apache.webbeans.container.InjectableBeanManager.getReference(Injec
>> > tableBeanManager.java:135)
>> > >
>> > org.apache.myfaces.extensions.cdi.core.api.provider.BeanManagerProvide
>> > r.getReference(BeanManagerProvider.java:216)
>> > >
>> > org.apache.myfaces.extensions.cdi.core.api.provider.BeanManagerProvide
>> > r.getContextualReference(BeanManagerProvider.java:176)
>> > >
>> > org.apache.myfaces.extensions.cdi.jsf2.impl.listener.phase.CodiLifecyc
>> > leWrapper.broadcastBeforeFacesRequestEvent(CodiLifecycleWrapper.java:1
>> > 57)
>> > >
>> > org.apache.myfaces.extensions.cdi.jsf2.impl.listener.phase.CodiLifecyc
>> > leWrapper.execute(CodiLifecycleWrapper.java:81)
>> > >
>> > > javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
>> > >
>> > > -----Ursprüngliche Nachricht-----
>> > > Von: Romain Manni-Bucau [mailto:[email protected]]
>> > > Gesendet: Freitag, 4. Januar 2013 14:00
>> > > An: [email protected]
>> > > Betreff: Re: AW: Passivation capable CDI beans replication across
>> > > cluster does not work
>> > >
>> > > did you try adding:
>> > >
>> > > -Dtomee.session-context.wrapper=http?
>> > >
>> > > Romain Manni-Bucau
>> > > Twitter: @rmannibucau
>> > > Blog: http://rmannibucau.wordpress.com/
>> > > LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> > > Github: https://github.com/rmannibucau
>> > >
>> > >
>> > >
>> > > 2013/1/4  <[email protected]>:
>> > >> But Apache CODI uses session to save its Conversation and Window
>> > >> Scopes
>> > (and I can see relevant attributes in session of first node which are
>> > not replicated to second node).
>> > >> Furthermore CODI scopes are replicated in another application
>> > >> servers
>> > which uses same technology stack(like IBM Websphere 8).
>> > >>
>> > >> -----Ursprüngliche Nachricht-----
>> > >> Von: Romain Manni-Bucau [mailto:[email protected]]
>> > >> Gesendet: Donnerstag, 3. Januar 2013 21:41
>> > >> An: [email protected]
>> > >> Betreff: Re: AW: Passivation capable CDI beans replication across
>> > >> cluster does not work
>> > >>
>> > >> Only the sessionscoped beans are replicated through tomcat
>> > session...other scoped are not (depend on the impl which probably
>> > doesnt use the session to store instances) Le 3 janv. 2013 19:49, <
>> > [email protected]> a écrit :
>> > >>
>> > >>> Hi,
>> > >>>
>> > >>> I have just uploaded test project reproducing the problem:
>> > >>> https://github.com/eiskonzept/tomee/
>> > >>> I have not reproduced exception, but WindowScoped beans are not
>> > >>> replicated(without exception)
>> > >>>
>> > >>> To reproduce the problem:
>> > >>> 1. Start two tomee instances:
>> > >>>         mvn clean package tomee:start -P node1
>> > >>>         mvn clean package tomee:start -P node2 2. Open index.xhtml
>> > >>> in test application context:
>> > >>>         http://localhost:8080/tomee_replication-1.0/index.xhtml
>> > >>> 3. Check created session in manager application of first node:
>> > >>>         http://localhost:8080/manager/html/sessions
>> > >>>
>> > >>>         There is parameter with something like this in its name:
>> > >>>
>> >
>> "org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.EditableWindowContextManagerProxy"
>> > >>> 4. Check replicated session in manager application of second node:
>> > >>>         http://localhost:8081/manager/html/sessions
>> > >>>
>> > >>>         There is no such parameter.
>> > >>>
>> > >>>
>> > >>>
>> > >>> -----Ursprüngliche Nachricht-----
>> > >>> Von: Romain Manni-Bucau [mailto:[email protected]]
>> > >>> Gesendet: Donnerstag, 3. Januar 2013 15:38
>> > >>> An: [email protected]
>> > >>> Betreff: Re: Passivation capable CDI beans replication across
>> > >>> cluster does not work
>> > >>>
>> > >>> Hi,
>> > >>>
>> > >>> is it possible for you to share a project reproducing it?
>> > >>>
>> > >>> the best would be a maven project with the tomee maven plugin
>> > >>> configured
>> > >>>
>> > >>> about failoverservice it is off by default and can be configured
>> > >>> on trunk (
>> > >>> https://issues.apache.org/jira/browse/TOMEE-698)
>> > >>>
>> > >>> Romain Manni-Bucau
>> > >>> Twitter: @rmannibucau
>> > >>> Blog: http://rmannibucau.wordpress.com/
>> > >>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> > >>> Github: https://github.com/rmannibucau
>> > >>>
>> > >>>
>> > >>>
>> > >>> 2013/1/2  <[email protected]>:
>> > >>> > cannot load the class
>> > >>>
>> >
>>
>
>

Reply via email to