ClassNotFoundException: org.springframework.web.context.ContextLoaderListen
I created an empty Fusion Web Application(ADF) application, "TestSpring", with default project, "ViewController". I get Spring by Help -> Check for Updates -> Open Source and Partners Extensions. I added Spring 2.5.6 into my project classpath of "ViewController". But I get the following exception at runtime. Any help?
File: web.xml
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value> <!-- Empty spring bean config file -->
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
File: applicationContext.xml
<?xml version="1.0" encoding="windows-1252" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:lang="http://www.springframework.org/schema/lang"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx">
<!--Spring 2.5 Bean defintions go here-->
</beans>
<May 27, 2009 8:16:32 PM CST> <Error> <HTTP> <BEA-101371> <There was a failure when processing annotations for application D:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\o.j2ee\drs\TestSpring\TestSpring-ViewController-webapp. Please make sure that the annotations are valid. The error is org.springframework.web.context.ContextLoaderListener>
May 27, 2009 8:16:32 PM oracle.adf.share.config.ADFConfigFactory cleanUpApplicationState
INFO: Cleaning up application state
<May 27, 2009 8:16:32 PM CST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1243426579640' for task '0'. Error is: 'weblogic.application.ModuleException: Failed to load webapp: 'TestSpring-ViewController-context-root''
weblogic.application.ModuleException: Failed to load webapp: 'TestSpring-ViewController-context-root'
at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:387)
at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
Truncated. see log file for complete stacktrace
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
Truncated. see log file for complete stacktrace
>
<May 27, 2009 8:16:32 PM CST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'TestSpring'.>
<May 27, 2009 8:16:32 PM CST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.application.ModuleException: Failed to load webapp: 'TestSpring-ViewController-context-root'
at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:387)
at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
Truncated. see log file for complete stacktrace
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
Truncated. see log file for complete stacktrace
>
[Deployer:149034]An exception occurred for task [Deployer:149026]deploy application TestSpring on DefaultServer.: Failed to load webapp: 'TestSpring-ViewController-context-root'.
weblogic.application.ModuleException: Failed to load webapp: 'TestSpring-ViewController-context-root'
#### Deployment incomplete. #### May 27, 2009 8:16:33 PM
oracle.jdeveloper.deploy.DeployException
at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.doDeploymentAction(Jsr88RemoteDeployer.java:247)
at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.deployImpl(Jsr88RemoteDeployer.java:157)
at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
at oracle.jdevimpl.deploy.fwk.WrappedDeployer.deployImpl(WrappedDeployer.java:39)
at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
at oracle.jdeveloper.deploy.common.BatchDeployer.deployImpl(BatchDeployer.java:82)
at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
at oracle.jdevimpl.deploy.fwk.WrappedDeployer.deployImpl(WrappedDeployer.java:39)
at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
at oracle.jdevimpl.deploy.fwk.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:436)
at oracle.jdeveloper.deploy.DeploymentManager.deploy(DeploymentManager.java:209)
at oracle.jdevimpl.runner.adrs.AdrsStarter$5$1.run(AdrsStarter.java:1365)
Caused by: oracle.jdeveloper.deploy.DeployException
at oracle.jdevimpl.deploy.common.Jsr88DeploymentHelper.deployApplication(Jsr88DeploymentHelper.java:413)
at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.doDeploymentAction(Jsr88RemoteDeployer.java:238)
... 11 more
Caused by: oracle.jdeveloper.deploy.DeployException: Deployment Failed
at oracle.jdevimpl.deploy.common.Jsr88DeploymentHelper.deployApplication(Jsr88DeploymentHelper.java:395)
... 12 more
#### Cannot run application TestSpring due to error deploying to DefaultServer.
[Application TestSpring stopped and undeployed from Server Instance DefaultServer]