With Tomcat 8.0.32 everything works fine, but with Tomcat 8.5.4 the DevLoader does not work.
[DevLoader] Starting DevLoader modified by e.siffert (August 04 2014) for Tomcat 8: Apache Tomcat/8.5.4
[DevLoader] Error: Unable to install WebappClassLoader, received ClassLoader was null !
Regards, Georg
My solution:
package org.apache.catalina.loader;
import java.io.File;
import java.io.FileFilter;
import java.io.FileReader;
import java.io.IOException;
import java.io.LineNumberReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.StringTokenizer;
import javax.servlet.ServletContext;
import org.apache.catalina.Globals;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.util.ServerInfo;
public class DevLoader extends WebappLoader {
}
@Gregor: Could you please provide some bits of explanation on what you changed? And maybe highlight what you have changed?
When having enough understood I am happy to apply the patch and do a fresh DevLoader release.
I did the same patch before seeing the version above... Looks like I searched the wrong place!
Anyway, the problem comes from Tomcat 8.5.x (8.5.5 in my case) using a
ParallelWebappClassLoaderinstead of aWebappClassLoader. However, both classes extendWebappClassLoaderBase, which defines theaddURL()method required later in thestartInternal()method.By the way, while doing my own patch (which is similar to the one above including some Java 7 code optimization — looks like Georg Nepp and I had the same ideas), I configured the project to use Maven and I tricked my
pom.xmlfile into generating a JAR identical in structure to the original, including theDevLoader.javasource file. It you are interested in using Maven to facilitate dependency and build management, please tell me and I will provide you with my Maven project structure.@Gregor Nepp: I applied your change and uploaded a new DevLoader jar file. Thank you for your patch!
@Jean-Francois Morin: I'd be happy to have the DevLoader build automated. I did not consider yet to automate it at all because I only once had to build a new jar. Please open a new ticket containing a patch and maybe a few bits of explanation.