You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by kf...@apache.org on 2017/03/06 08:51:53 UTC

svn commit: r1785611 - in /tomcat/tc7.0.x/trunk: java/org/apache/catalina/ha/context/ReplicatedContext.java webapps/docs/changelog.xml

Author: kfujino
Date: Mon Mar  6 08:51:53 2017
New Revision: 1785611

URL: http://svn.apache.org/viewvc?rev=1785611&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=60806
To avoid ClassNotFoundException, make sure that the web application class loader is passed to ReplicatedContext.

Modified:
    tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java?rev=1785611&r1=1785610&r2=1785611&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java Mon Mar  6 08:51:53 2017
@@ -55,10 +55,9 @@ public class ReplicatedContext extends S
      */
     @Override
     protected synchronized void startInternal() throws LifecycleException {
-
+        super.startInternal();
         try {
             CatalinaCluster catclust = (CatalinaCluster)this.getCluster();
-            if (this.context == null) this.context = new ReplApplContext(this);
             if ( catclust != null ) {
                 ReplicatedMap<String,Object> map =
                         new ReplicatedMap<String,Object>(this,
@@ -66,9 +65,7 @@ public class ReplicatedContext extends S
                                 getName(),getClassLoaders());
                 map.setChannelSendOptions(mapSendOptions);
                 ((ReplApplContext)this.context).setAttributeMap(map);
-                if (getAltDDName() != null) context.setAttribute(Globals.ALT_DD_ATTR, getAltDDName());
             }
-            super.startInternal();
         }  catch ( Exception x ) {
             log.error("Unable to start ReplicatedContext",x);
             throw new LifecycleException("Failed to start ReplicatedContext",x);

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1785611&r1=1785610&r2=1785611&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Mar  6 08:51:53 2017
@@ -113,6 +113,11 @@
         <code>ClusterSingleSignOn</code>. The <code>accessTimeout</code> is used
         as a timeout period for PING in replication map. (kfujino)
       </add>
+      <fix>
+        <bug>60806</bug>: To avoid <code>ClassNotFoundException</code>, make
+        sure that the web application class loader is passed to
+        <code>ReplicatedContext</code>. (kfujino)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="WebSocket">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org