[
https://issues.apache.org/jira/browse/GERONIMO-5616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Forrest Xia updated GERONIMO-5616:
----------------------------------
Attachment: GERONIMO-5616_3.patch
This patch limit the dynamic import scope to org.apache.catalina.*. Please
review, then I will commit it. thanks!
> Tomcat native cluster not working because of ClassNotFoundException:
> org.apache.catalina.ha.session.SessionMessageImpl
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5616
> URL: https://issues.apache.org/jira/browse/GERONIMO-5616
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: Tomcat
> Affects Versions: 3.0
> Environment: Windows 7 x86
> sun jdk 1.6.0_20
> Reporter: Forrest Xia
> Assignee: Forrest Xia
> Fix For: 3.0
>
> Attachments: GERONIMO-5616.patch, GERONIMO-5616_2.patch,
> GERONIMO-5616_3.patch
>
>
> Configure the tomcat native cluster via these steps to reproduce this bug
> 1. Get a latest geronimo tomcat build and unzip it to a folder
> 2. Update var/catalina/server.xml to add these lines into <Engine>
> <Engine name="Catalina" defaultHost="${ServerHostname}" jvmRoute="server2">
>
> <!--Put the cluster just after Engine, not in the Host element-->
> <Cluster
> className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
> channelSendOptions="8">
> <Manager
> className="org.apache.catalina.ha.session.DeltaManager"
> expireSessionsOnShutdown="false" notifyListenersOnReplication="true"
> name="${clusterName}" channelSendOptions="6" mapSendOptions="6"/>
> <Channel
> className="org.apache.catalina.tribes.group.GroupChannel">
> <!--Update <server1_IP> with the real IP, for example,
> 9.1.2.3, the server2 must be in the same subnet as server1-->
> <Membership
> className="org.apache.catalina.tribes.membership.McastService"
> bind="localhost" address="228.0.0.4" port="45564" frequency="500"
> dropTime="3000" />
> <Receiver
> className="org.apache.catalina.tribes.transport.nio.NioReceiver"
> address="localhost" port="4000" autoBind="100" selectorTimeout="5000"
> maxThreads="6" />
> <Sender
> className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
> <Transport
> className="org.apache.catalina.tribes.transport.nio.PooledParallelSender" />
> </Sender>
> <Interceptor
> className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"
> interval="60"/>
>
> <Interceptor
> className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"
> />
> <Interceptor
> className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"
> />
> </Channel>
> <Valve
> className="org.apache.catalina.ha.tcp.ReplicationValve"
> filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;" />
> <Valve
> className="org.apache.catalina.ha.session.JvmRouteBinderValve" />
> <ClusterListener
> className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener" />
> <ClusterListener
> className="org.apache.catalina.ha.session.ClusterSessionListener" />
> </Cluster>
> 3. Copy this server to another folder and update the portoffset, so that the
> server can run in the same machine, note that change jvmRoute property to
> another value.
> 4. Start server1 and server2, the server will try to setup a dynamic
> clustering via multicast service. You will see an ClassNotFoundException when
> trying to setup the cluster as following:
> 2010-09-20 23:42:06,594 ERROR [GroupChannel] Unable to deserialize
> message:ClusterData[src=org.apache.catalina.tribes.membership.MemberImpl[tcp://{127,
> 0, 0, 1}:4000,{127, 0, 0, 1},4000, alive=15847, securePort=-1, UDP Port=-1,
> id={-69 -59 107 100 42 49 65 125 -87 88 55 -60 67 60 110 -25 }, payload={},
> command={}, domain={}, ]; id={102 -106 41 40 -55 -74 75 -106 -70 15 -66 -8
> -58 117 -11 -16 }; sent=2010-09-20 23:42:06.567]
> java.lang.ClassNotFoundException:
> org.apache.catalina.ha.session.SessionMessageImpl
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:494)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:247)
> at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:604)
> at
> java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
> at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
> at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
> at
> org.apache.catalina.tribes.io.XByteBuffer.deserialize(XByteBuffer.java:573)
> at
> org.apache.catalina.tribes.io.XByteBuffer.deserialize(XByteBuffer.java:555)
> at
> org.apache.catalina.tribes.group.GroupChannel.messageReceived(GroupChannel.java:258)
> at
> org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:80)
> at
> org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.messageReceived(TcpFailureDetector.java:112)
> at
> org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:80)
> at
> org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:80)
> at
> org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor.messageReceived(ThroughputInterceptor.java:90)
> at
> org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:80)
> at
> org.apache.catalina.tribes.group.ChannelCoordinator.messageReceived(ChannelCoordinator.java:258)
> at
> org.apache.catalina.tribes.transport.ReceiverBase.messageDataReceived(ReceiverBase.java:271)
> 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$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619)
> This exception will lead to session replication failures. I guess this is
> caused by classloader mechanism change. In the bundle classloader, there is
> no SessionMessageImpl class to be able to load.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.