Announcement Announcement Module
Collapse
No announcement yet.
ClassNotFoundException:org.springframework.web.con text.ContextLoaderListener Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    put spring.jar file in lib folder or your classpath and try...

    Comment


    • #3
      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..

      Comment


      • #4
        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

        Comment


        • #5
          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...

          Comment


          • #6
            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

            Comment


            • #7
              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, 09:35 AM.

              Comment


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

                Comment


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

                  Comment


                  • #10
                    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.

                    Comment


                    • #11
                      Hi

                      Much has changed since March Now all works when you use M2E (1.0.100.201108040103) + M2E-WTP (0.13.1.20110728-1800)

                      See:
                      Almost everything works out of the box (the only thing left - for me - is overlay filtering)

                      regards
                      Grzegorz Grzybek

                      Comment


                      • #12
                        For what it's worth, running a spring app from within eclipse can be a very frustrating experience, especially when insisting on the latest and greatest + maven. I found that the Maven dependencies are not included in WEB-INF/lib unless the project is configured as shown in the attached screenie. May it save you precious development time! Happy Hacking!!!

                        Attachment
                        Attached Files
                        Last edited by npg; Sep 9th, 2011, 06:59 AM.

                        Comment


                        • #13
                          If you correctly created your project from a Maven pom.xml file, then you should be able to add the Maven Dependencies this way:
                          Deployment Assembly / Add... / Java Build Path Entries / (select Maven Dependencies)

                          Comment


                          • #14
                            Having the same problem in a project set on flash builder. How can I add Maven support to solve this problem?

                            class org.springframework.web.context.ContextLoaderListe ner not found.

                            Thanks

                            Paolo

                            Comment


                            • #15
                              Hi ,
                              You can add maven dependency and for deployment using maven add the dependency in pom.xml

                              Comment

                              Working...
                              X