I have some Java classes that are generated at runtime and compiled using a
JavaCompiler.CompilationTask
.
The generated code references classes that are in other projects that are maven dependencies of my project. Everything runs fine locally, but when I deploy to our dev Tomcat server, I get a bunch of
"package xxx does not exist"
and
"cannot find symbol"
errors in the compilation task. I checked the WEB-INF/lib directory of the Tomcat-deployed webapp project, and all of the jars are there, including the project dependencies. Isn't everything in the WEB-INF/lib
dir supposed to be available to a Tomcat project at runtime?
EDIT: Here is my context.xml:
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<Loader className="org.apache.catalina.loader.VirtualWebappLoader"
virtualClasspath="${catalina.home}/webapps/kdweb/WEB-INF/lib/acommons-0.0.1-SNAPSHOT.jar;${catalina.home}/webapps/kdweb/WEB-INF/lib/abizcommons-0.0.1-SNAPSHOT.jar;${catalina.home}/webapps/kdweb/WEB-INF/lib/kd_market_data-common-0.0.1-SNAPSHOT.jar;${catalina.home}/webapps/kdweb/WEB-INF/lib/aggregation-0.0.1-SNAPSHOT.jar;${catalina.home}/webapps/kdweb/WEB-INF/lib/apods-client-0.0.1-SNAPSHOT.jar;${catalina.home}/webapps/kdweb/WEB-INF/lib/framework-common-0.0.1-SNAPSHOT.jar" />
</Context>