Author: kfujino
Date: Mon Mar 6 08:49:59 2017
New Revision: 1785609
URL: http://svn.apache.org/viewvc?rev=1785609&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.0.x/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml
Modified:
tomcat/tc8.0.x/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java
URL:
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java?rev=1785609&r1=1785608&r2=1785609&view=diff
==============================================================================
---
tomcat/tc8.0.x/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java
(original)
+++
tomcat/tc8.0.x/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java
Mon Mar 6 08:49:59 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.0.x/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml?rev=1785609&r1=1785608&r2=1785609&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml Mon Mar 6 08:49:59 2017
@@ -141,6 +141,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: [email protected]
For additional commands, e-mail: [email protected]