You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by pa...@targetgroup.net on 2006/07/04 11:38:00 UTC

Spring class not found in 1.1 - classloader issue ?

I'm deploying an app that works fine in 1.0.

It deploys OK in 1.1 but fails on start up as it cannot find a Spring 
class. Do I have to do somethign special in 1.1 if I am using Spring ?

10:33:55,509 ERROR [[/SV2WebServices]] Error configuring application 
listener of class org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: 
org.springframework.web.context.ContextLoaderListener in classloader 
default/SV2Test_SV2WebServices.war/1-default/car
        at 
org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:249)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at 
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3675)
        at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4162)
        at 
org.apache.geronimo.tomcat.GeronimoStandardContext.access$201(GeronimoStandardContext.java:67)
        at 
org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:337)
        at 
org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:31)
        at 
org.apache.geronimo.tomcat.GeronimoStandardContext.start(GeronimoStandardContext.java:192)
        at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
        at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
        at 
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
        at 
org.apache.geronimo.tomcat.TomcatContainer.addContext(TomcatContainer.java:313)
        at 
org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$$9370b073.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at 
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
        at 
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
        at 
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
        at 
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
        at 
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
        at 
org.apache.geronimo.tomcat.TomcatContainer$$EnhancerByCGLIB$$c61853e6.addContext(<generated>)
        at 
org.apache.geronimo.tomcat.TomcatWebAppContext.doStart(TomcatWebAppContext.java:448)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:981)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:267)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:540)
        at 
org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379)
        at 
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:374)
        at 
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:411)
        at 
org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187)
        at 
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:512)
        at 
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:493)
        at 
org.apache.geronimo.kernel.config.SimpleConfigurationManager$$FastClassByCGLIB$$ce77a924.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at 
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
        at 
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
        at 
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
        at 
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
        at 
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
        at 
org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$ac63015f.startConfiguration(<generated>)
        at 
org.apache.geronimo.console.configmanager.ConfigManagerPortlet.processAction(ConfigManagerPortlet.java:82)
        at 
org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:229)
        at 
org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:158)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at 
org.apache.pluto.core.PortletServlet.service(PortletServlet.java:153)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
        at 
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
        at 
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
        at 
org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:120)
        at 
org.apache.pluto.invoker.impl.PortletInvokerImpl.action(PortletInvokerImpl.java:68)
        at 
org.apache.pluto.PortletContainerImpl.processPortletAction(PortletContainerImpl.java:164)
        at 
org.apache.pluto.portalImpl.core.PortletContainerWrapperImpl.processPortletAction(PortletContainerWrapperImpl.java:82)
        at org.apache.pluto.portalImpl.Servlet.doGet(Servlet.java:227)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at 
org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:52)
        at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
        at 
org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:342)
        at 
org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:31)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
        at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
        at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:534) 

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

Re: Re: Re: Spring class not found in 1.1 - classloader issue ?

Posted by pa...@targetgroup.net.
If I override the Geronimo Spring classes to be hidden as in the 
deployment plan I still get the same error, either with  spring.jar in the 
lib dir of the web app or as a dependency in the deployment plan

<application application-name="Target Select Test"
        xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1"
        xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1"
        xmlns:security="http://geronimo.apache.org/xml/ns/security-1.1">
        <sys:environment>
                <sys:moduleId>
                        <sys:groupId>default</sys:groupId>
                        <sys:artifactId>SV2TestA</sys:artifactId>
                        <sys:version>1-default</sys:version>
                        <sys:type>car</sys:type>
                </sys:moduleId>
                <sys:dependencies>
                        <sys:dependency>
                                <sys:groupId>sv2</sys:groupId>
 <sys:artifactId>mysqlproperties</sys:artifactId>
                                <sys:version>1.1</sys:version>
                                <sys:type>jar</sys:type>
                        </sys:dependency>
 
                </sys:dependencies>
                <sys:hidden-classes>
                        <sys:filter>org.springframework</sys:filter>
                </sys:hidden-classes>

                <sys:non-overridable-classes />
        </sys:environment>

        <module>
                <web>TPRWeb.war</web>
                <web-app 
xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
 xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1">
                        <sys:environment>
                                <sys:moduleId>
                                        <sys:groupId>default</sys:groupId>
 <sys:artifactId>TPRWeb</sys:artifactId>
 <sys:version>1-default</sys:version>
                                        <sys:type>car</sys:type>
                                </sys:moduleId>
                                <sys:dependencies />
                                <sys:hidden-classes>
 <sys:filter>org.springframework</sys:filter>
                                </sys:hidden-classes>

                                <sys:non-overridable-classes />
                        </sys:environment>
                        <context-root>TPRWebTest</context-root>
                </web-app>
        </module>
</application>

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

Re: Re: Re: Spring class not found in 1.1 - classloader issue ?

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
That shouldn't be applicable to 1.1 -- it's supposed to behave that
way by default.  Still, might be worth testing to see if the
workaround added in 1.1 is broken.

Thanks,
     Aaron

On 7/4/06, Chris Wilkes <cw...@ladro.com> wrote:
> Try putting the spring.jar in the WEB-INF/lib and then putting
>   <hidden-classes>
>                 <filter>org.springframework</filter>
>   </hidden-classes>
> in your geronimo-web.xml file.  See
>   http://www.savoirtech.com/roller/page/jgenender?entry=trouble_deploying_your_web_apps
>
> Chris
>
> On Tue, Jul 04, 2006 at 01:51:07PM +0100, paul.newport@targetgroup.net wrote:
> > If I put Spring.jar in the WEB-INF/lib dir I get the same problem as
> > before.
> >
> > If I redeploy with a dependency on spring-1.2.8.jar in the repository I
> > also get the same error (both with and without spring.jar in the lib dir
> > of the web app).
> >
> > (dependency snippet).
> >
> > <sys:dependency>
> >         <sys:groupId>sv2</sys:groupId>
> >         <sys:artifactId>spring</sys:artifactId>
> >         <sys:version>1.2.8</sys:version>
> >         <sys:type>jar</sys:type>
> > </sys:dependency>
> >
> >
> > This looks very similar to a problem I have had before which was
> > classloader related. See here:
> >
> > http://forum.springframework.org/showthread.php?t=25856&highlight=geronimo
> >
> > PS I still get the problem with nothing at all in the lib dir (bit
> > obviously something in the manifest !).
> >
> > 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
>

Re: Re: Spring class not found in 1.1 - classloader issue ?

Posted by Chris Wilkes <cw...@ladro.com>.
Try putting the spring.jar in the WEB-INF/lib and then putting 
  <hidden-classes>
		<filter>org.springframework</filter>
  </hidden-classes>
in your geronimo-web.xml file.  See
  http://www.savoirtech.com/roller/page/jgenender?entry=trouble_deploying_your_web_apps

Chris

On Tue, Jul 04, 2006 at 01:51:07PM +0100, paul.newport@targetgroup.net wrote:
> If I put Spring.jar in the WEB-INF/lib dir I get the same problem as 
> before.
> 
> If I redeploy with a dependency on spring-1.2.8.jar in the repository I 
> also get the same error (both with and without spring.jar in the lib dir 
> of the web app).
> 
> (dependency snippet).
> 
> <sys:dependency>
>         <sys:groupId>sv2</sys:groupId>
>         <sys:artifactId>spring</sys:artifactId>
>         <sys:version>1.2.8</sys:version>
>         <sys:type>jar</sys:type>
> </sys:dependency>
>  
> 
> This looks very similar to a problem I have had before which was 
> classloader related. See here:
> 
> http://forum.springframework.org/showthread.php?t=25856&highlight=geronimo
> 
> PS I still get the problem with nothing at all in the lib dir (bit 
> obviously something in the manifest !).
> 
> 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

Re: Re: Spring class not found in 1.1 - classloader issue ?

Posted by pa...@targetgroup.net.
If I put Spring.jar in the WEB-INF/lib dir I get the same problem as 
before.

If I redeploy with a dependency on spring-1.2.8.jar in the repository I 
also get the same error (both with and without spring.jar in the lib dir 
of the web app).

(dependency snippet).

<sys:dependency>
        <sys:groupId>sv2</sys:groupId>
        <sys:artifactId>spring</sys:artifactId>
        <sys:version>1.2.8</sys:version>
        <sys:type>jar</sys:type>
</sys:dependency>
 

This looks very similar to a problem I have had before which was 
classloader related. See here:

http://forum.springframework.org/showthread.php?t=25856&highlight=geronimo

PS I still get the problem with nothing at all in the lib dir (bit 
obviously something in the manifest !).

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

Re: Re: Spring class not found in 1.1 - classloader issue ?

Posted by pa...@targetgroup.net.
I fixed this in 1.0 via the hidden classes filter for org.apache.axis.


"By the way I think some facet of this problem, or at least similar 
symptoms are in 1.0. 

I have switched some Web Service client code from using RAD generated code 
that use IBM/Websphere  specific jar files to RAD generated code that uses 
Axis instead. 

Again I have a jar (axis.jar) on my manifest class path and in my EAR. In 
this case when I try and call my proxy class I get the following when I 
execute the line: 

 _call.setScopedProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, 
Boolean.FALSE); "

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

Re: Re: Spring class not found in 1.1 - classloader issue ?

Posted by pa...@targetgroup.net.
By the way I think some facet of this problem, or at least similar 
symptoms are in 1.0.

I have switched some Web Service client code from using RAD generated code 
that use IBM/Websphere  specific jar files to RAD generated code that uses 
Axis instead.

Again I have a jar (axis.jar) on my manifest class path and in my EAR. In 
this case when I try and call my proxy class I get the following when I 
execute the line:

 _call.setScopedProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, 
Boolean.FALSE);


Error:

java.lang.NoSuchMethodError: 
org.apache.axis.client.Call.setScopedProperty(Ljava/lang/String;Ljava/lang/Object;)V
 
net.targetgroup.targetprocessmanager.server.TPMInvokeServiceSoapBindingStub.invokeProcess(TPMInvokeServiceSoapBindingStub.java:83)

Sorry to slightly confuse the issue with two separate but related 
problems, but would be interested to know whetther the fix is the same of 
different for 1.0 and 1.1.



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

Re: Re: Spring class not found in 1.1 - classloader issue ?

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
Can you try putting the Spring JAR in WEB-INF/lib (or in the Geronimo
repository and add a dependency on it to your web plan)?  That would
tell us whether the problem is that we're not using the MANIFEST
Class-Path for the WAR file.

Thanks,
     Aaron

On 7/4/06, paul.newport@targetgroup.net <pa...@targetgroup.net> wrote:
>
> 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
>

Re: Spring class not found in 1.1 - classloader issue ?

Posted by pa...@targetgroup.net.
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

Re: Spring class not found in 1.1 - classloader issue ?

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
Can you explain the packaging of your application and how you include Spring?

Thanks,
    Aaron

On 7/4/06, paul.newport@targetgroup.net <pa...@targetgroup.net> wrote:
>
> I'm deploying an app that works fine in 1.0.
>
> It deploys OK in 1.1 but fails on start up as it cannot find a Spring class.
> Do I have to do somethign special in 1.1 if I am using Spring ?
>
> 10:33:55,509 ERROR [[/SV2WebServices]] Error configuring application
> listener of class
> org.springframework.web.context.ContextLoaderListener
> java.lang.ClassNotFoundException:
> org.springframework.web.context.ContextLoaderListener in
> classloader
> default/SV2Test_SV2WebServices.war/1-default/car
>         at
> org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:249)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
>         at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3675)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4162)
>         at
> org.apache.geronimo.tomcat.GeronimoStandardContext.access$201(GeronimoStandardContext.java:67)
>         at
> org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:337)
>         at
> org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:31)
>         at
> org.apache.geronimo.tomcat.GeronimoStandardContext.start(GeronimoStandardContext.java:192)
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>         at
> org.apache.geronimo.tomcat.TomcatContainer.addContext(TomcatContainer.java:313)
>         at
> org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$$9370b073.invoke(<generated>)
>         at
> net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>         at
> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
>         at
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
>         at
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
>         at
> org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
>         at
> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
>         at
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
>         at
> org.apache.geronimo.tomcat.TomcatContainer$$EnhancerByCGLIB$$c61853e6.addContext(<generated>)
>         at
> org.apache.geronimo.tomcat.TomcatWebAppContext.doStart(TomcatWebAppContext.java:448)
>         at
> org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:981)
>         at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:267)
>         at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
>         at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124)
>         at
> org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:540)
>         at
> org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379)
>         at
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:374)
>         at
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:411)
>         at
> org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187)
>         at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:512)
>         at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:493)
>         at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager$$FastClassByCGLIB$$ce77a924.invoke(<generated>)
>         at
> net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>         at
> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
>         at
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
>         at
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
>         at
> org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
>         at
> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
>         at
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
>         at
> org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$ac63015f.startConfiguration(<generated>)
>         at
> org.apache.geronimo.console.configmanager.ConfigManagerPortlet.processAction(ConfigManagerPortlet.java:82)
>         at
> org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:229)
>         at
> org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:158)
>         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
>         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>         at
> org.apache.pluto.core.PortletServlet.service(PortletServlet.java:153)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>         at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
>         at
> org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
>         at
> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
>         at
> org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:120)
>         at
> org.apache.pluto.invoker.impl.PortletInvokerImpl.action(PortletInvokerImpl.java:68)
>         at
> org.apache.pluto.PortletContainerImpl.processPortletAction(PortletContainerImpl.java:164)
>         at
> org.apache.pluto.portalImpl.core.PortletContainerWrapperImpl.processPortletAction(PortletContainerWrapperImpl.java:82)
>         at
> org.apache.pluto.portalImpl.Servlet.doGet(Servlet.java:227)
>         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
>         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>         at
> org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:52)
>         at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
>         at
> org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:342)
>         at
> org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:31)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>         at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
>         at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
>         at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>         at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>         at java.lang.Thread.run(Thread.java:534)
>
> 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
>