Using Tomcat 8.0.15 with Java 8
I need a certain WebApp to load first so I put the following in my server.xml:
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" className="com.my.class.MyCustomHost">
<Context docBase="app_to_load" path="/app_to_load"/>
</Host>
MyCustomHost looks like below:
public class MyCustomHost extends StandardHost {
public MyCustomHost () {
super();
this.children = new LinkedHashMap();
} }
This setup worked in Tomcat 7.0.42 (with Java 7) but in Tomcat 8.0.15 (with Java 8), I get the following error:
Apr 16, 2015 3:36:53 PM org.apache.tomcat.util.digester.Digester startElement SEVERE: Begin event threw error java.lang.IllegalAccessError at com.my.class.MyCustomHost.(MyCustomHost.java:18)
The solution I am trying to use was derived from here. Any input would help! Thanks!