geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paul.newp...@targetgroup.net
Subject Re: Spring class not found in 1.1 - classloader issue ?
Date Tue, 04 Jul 2006 11:31:03 GMT
We are using Rational Application Developer (RAD) from IBM (basically WSAD 
v 6)

The application is deployed as an EAR.

Within the application is a WAR file (front end), that has a model 
(backend) project on it's build path. The model gets automatically jarred 
up by RAD at EAR creation time and this JAR file is on the manifest class 
path of the WAR project.

Both backend and front end use Spring.

In the front end this just involves having Spring.jar on the WAR's 
manifest classpath MANIFEST.MF

Spring is used on the front end for ACEGI security, and dependency 
injection into Struts actions, as well as for linking into back end Spring 
based services in the model project. 

In order for Spring to load up its context files in the front end a 
listener is defined in the web.xml (see snippet below). It seems that 
Geronimo is failing to find the 
org.springframework.web.context.ContextLoaderListener listener class as it 
starts up. It should find this correctly as Spring.jar is defined in 
MANIFEST.MF.

This approach works in Geronimo 1.0 and Websphere 5.1 and  6, and is a 
standard approach we use when a WAR file has a dependency on a JAR file 
which we ship within the root of the EAR file.

        <context-param>
                <param-name>contextConfigLocation</param-name>
                <param-value>/WEB-INF/applicationContext.xml</param-value>
        </context-param>

        <!--  load a shared service layer parent application context -->
        <context-param>
                <param-name>locatorFactorySelector</param-name>
                <param-value>
                        net/targetgroup/tprweb/spring/beanRefContext.xml
                </param-value>
        </context-param>
        <context-param>
                <param-name>parentContextKey</param-name>
                <param-value>servicelayer-context</param-value>
        </context-param>
        <listener>
                <listener-class>
 org.springframework.web.context.ContextLoaderListener
                </listener-class>
        </listener>

Target
www.targetgroup.net

**********************************************************************
DISCLAIMER.
This message is intended only for the use of the Addressee and may
contain information that is PRIVILEGED and CONFIDENTIAL. 
If you are not the intended recipient you must not copy, 
distribute or take any action or reliance upon it. 
The content of this message may also contain personal 
views of an employee of this company and does
not necessarily represent the view of the company.
**********************************************************************
This message has been scanned by Norton Anti-Virus. 
It has also been scanned by MAILsweeper to enforce our e-mail 
policy. If you have any concerns or comments about the content 
of this message, please  e-mail support@targetgroup.net.
**********************************************************************



_____________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
Mime
View raw message