Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: ClassNotFoundException:org.springframework.web.con text.ContextLoaderListener

  1. #1
    Join Date
    Sep 2008
    Posts
    2

    Thumbs down ClassNotFoundException:org.springframework.web.con text.ContextLoaderListener

    Hi guys

    I'm newbie and study springframework webservice(with Apache CXF)

    I have some questions about 'ContextLoaderListener '

    in web.xml

    Code:
    <context-param>
    		<param-name>contextConfigLocation</param-name>
    		<param-value>classpath:beans.xml</param-value>
    	</context-param>
    
    	<listener>
    		<listener-class>
    			org.springframework.web.context.ContextLoaderListener
    		</listener-class>
    	</listener>
    then, these ERRORs are shown
    Code:
    Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
    java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
    	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3773)
    	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    	at org.apache.catalina.core.StandardService.start(StandardService.java:516)
    	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    	at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

    about tutorial..
    cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html

    help me plz guys..TT

  2. #2
    Join Date
    Sep 2008
    Posts
    3

    Default

    put spring.jar file in lib folder or your classpath and try...

  3. #3
    Join Date
    Sep 2008
    Posts
    2

    Smile thank you for your answer

    I resovled this problem..

    cause, tomcat is not recogized librarys in folder

    I'll use build tools (ant or maven..)

    thanks..

  4. #4
    Join Date
    Aug 2009
    Posts
    1

    Default Error configuring application listener org.springframework.web.context.contextloaderl

    When im trying to integrate JSF and SPring 2.5.0 RC1 im getting the below error.
    SEVERE: Error configuring application listener of class org.springframework.web.context.ContextLoaderListe ner
    java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListe ner
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1386)
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1232)
    at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:3743)
    at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4252)
    at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase.java:760)
    at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:740)
    at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:544)
    at org.apache.catalina.startup.HostConfig.deployWAR(H ostConfig.java:831)
    at org.apache.catalina.startup.HostConfig.deployWARs( HostConfig.java:720)
    at org.apache.catalina.startup.HostConfig.deployApps( HostConfig.java:490)
    at org.apache.catalina.startup.HostConfig.start(HostC onfig.java:1150)
    at org.apache.catalina.startup.HostConfig.lifecycleEv ent(HostConfig.java:311)
    at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(LifecycleSupport.java:120)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1022)
    at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:736)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1014)
    at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(Sta ndardService.java:448)
    at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:700)
    at org.apache.catalina.startup.Catalina.start(Catalin a.java:552)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:295)
    at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:433)

    Wht could be the prob for the following? Any help is appreciated....
    Thanks in advance

    Basu

  5. #5
    Join Date
    Sep 2008
    Posts
    3

    Default

    Hi Basu,

    As I mention put spring.jar that come with the dist in the coresponding spring version.
    If you dont want the whole spring modules you can just include spring-web.jar in your class path.try it...

  6. #6
    Join Date
    Oct 2008
    Location
    Poland, Wrocław
    Posts
    424

    Default

    If you're using Eclipse and Maven, then the problem is with one particular project settings option:
    project properties -> Java EE Module Dependencies -> Maven Dependencies
    the last option must be checked (which isn't by default).

    regards
    Grzegorz Grzybek

  7. #7
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Posts
    434

    Default update

    in later versions the same effect can be had in Maven projects by checking "Automatically update dependencies" in Project Properties -> Spring -> Dependency Management.
    Last edited by MiB; Mar 21st, 2011 at 08:35 AM.

  8. #8
    Join Date
    Dec 2009
    Posts
    3

    Default

    I fixed the error with Maven by going to project properties -> Deployment Assembley and adding the Maven Dependency Build Path entry

  9. #9
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Posts
    434

    Default

    Thanks, this fixed the problem that my dependencies showed up in the root of the project layout.

  10. #10
    Join Date
    Aug 2011
    Posts
    1

    Default

    Quote Originally Posted by mcgin View Post
    I fixed the error with Maven by going to project properties -> Deployment Assembley and adding the Maven Dependency Build Path entry
    Hi, Can you pls explain how exactly you added the Maven Dependency Build path.

    I am trying to do the same but in java build path entry I dont see any thing related to maven.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •