You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Borut Žagar <bo...@gmail.com> on 2005/05/19 01:13:02 UTC

Structuring WEB-INF/lib

Hi.
 
We are developing web application with Cocoon, Spring and Hibernate to be
run under JBoss AS. Since we have a lot of external JARS in WEB-INF/lib
directory, we want to structure this directory a bit. Idea is to make
subdirectories in WEB-INF/lib for spring, hibernate, cocoon, etc JARs
instead of keeping them all in a single directory.
 
In WEB-INF/web.xml I have defined extra-classpath param as follows:
<init-param>
    <param-name>extra-classpath</param-name>
    <param-value>WEB-INF\lib\spring;
WEB-INF\lib\hibernate</param-value>
</init-param>

We have also defined our own ContextLoaderListener in web.xml as following:

<listener>
    <listener-class>org.asolsme.webapp.Initializer</listener-class>
</listener>

The problem is when I run JBoss AS, the following error occurs:
 
01:04:05,729 ERROR [Engine] StandardContext[]Error configuring application
listener of class org.aso
lsme.webapp.Initializer
java.lang.ClassNotFoundException: org.asolsme.webapp.Initializer
 
 
Error occurs, because our class org.asolsme.webapp.Initializer is
referencing org.springframework..., which is not in classpath I presume.
But if I put Spring JARs in WEB-INF/lib, JBoss AS starts OK. It looks like
the extra-classpath param is ignored.
 
Can some1 offer advice on how to solve this?
 
Thanks!
 
regards
BZ