Note that there are some explanatory texts on larger screens.

plurals
  1. PODeploying a Spring-based WAR with its JAR dependencies externalized
    primarykey
    data
    text
    <p>I have a Spring app that has a lot of dependencies (18 megabytes of JAR files..) - Now, when I am testing on the remote Tomcat 6.0 server, I'd like to not have to upload that 19 megabytes of dependencies, and just upload the classes. Pretty simple, right?</p> <p>I can't get the damn thing to work. </p> <p>I'm using Eclipse 3.4, and if in Java Build Path->Order and Export I remove the export of all of the dependencies, I get a nice small WAR.</p> <p>So here's what I tried:</p> <p>I uploaded all of the libs to the server, and stuck them in common/lib in Tomcat. The directory didn't exist, so I created it and modified catalina.properties:</p> <pre><code>shared.loader=${catalina.home}/common/lib/*.jar </code></pre> <p>I've tried a bunch of other configs, but none worked. Restart the server, deployed war fails to start. Specifically:</p> <pre><code>SEVERE: Error configuring application listener of class org.springframework.web.context.ContextLoaderList$java.lang.ClassNotFoundException:org.springframework.web.context.ContextLoaderListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1 </code></pre> <p>It's dying trying to load the Log4J listener, which it can't find in its classpath. The spring lib that listener is in is in common/lib.</p> <p>Also - when I deploy the full 18 megabyte war, it works just fine. Everything inits and the app starts. Of course it works fine locally as well.</p> <p>Oh - and I've replaced the hardcoded logging JARs with the ones out of the extras folder to allow Log4j to work.</p> <p>Any help here? I have no idea why this isn't working.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload