Author: kfujino
Date: Mon Mar  6 08:47:13 2017
New Revision: 1785608

URL: http://svn.apache.org/viewvc?rev=1785608&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/tc8.5.x/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java
    tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/tc8.5.x/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java?rev=1785608&r1=1785607&r2=1785608&view=diff
==============================================================================
--- 
tomcat/tc8.5.x/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java 
(original)
+++ 
tomcat/tc8.5.x/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java 
Mon Mar  6 08:47:13 2017
@@ -56,19 +56,16 @@ 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<>(
                         this, catclust.getChannel(),DEFAULT_REPL_TIMEOUT,
                         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(sm.getString("replicatedContext.startUnable", 
getName()),x);
             throw new 
LifecycleException(sm.getString("replicatedContext.startFailed", getName()),x);

Modified: tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml?rev=1785608&r1=1785607&r2=1785608&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml Mon Mar  6 08:47:13 2017
@@ -225,6 +225,11 @@
         <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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to