Announcement Announcement Module
Collapse
No announcement yet.
404 error in eclipse after running Spring App...(message: Servlet dispatcher is not a Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 404 error in eclipse after running Spring App...(message: Servlet dispatcher is not a

    Hi all,

    I have this example ( http://www.vaannila.com/spring/sprin...gration-1.html ) in my eclipse IDE and have Tomcat 7 running on it.
    I have followed the exact tutorial still i am getting the irritating 404 file not found error.

    The message is : message Servlet dispatcher is not available

    and


    description The requested resource (Servlet dispatcher is not available) is not available.

    .
    I dont know why its not finding the dispatcher-servlet.xml......

    Thank you

    Mike

  • #2
    hi all

    hi all,

    that error is gone after i imported couple of jar files in the WEB-INF/lib folder...But there is now a new error there. Can you help me in this..?

    This is the error i am getting:



    Apr 18, 2011 11:10:52 AM org.apache.catalina.core.AprLifecycleListener init
    INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;.;C:\WINDOWS\Sun\Java\bin;C:\W INDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:/Program Files/Java/jre6/lib/i386;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\Sys tem32\Wbem;C:\Program Files\Java\jdk1.6.0\bin;C:\Program Files\Java\jdk1.6.0\bin;.;;C:\Documents and Settings\Mayank Kalbhor\My Documents\Downloads\eclipse-jee-helios-SR2-win32\eclipse;
    Apr 18, 2011 11:10:53 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Vanila' did not find a matching property.
    Apr 18, 2011 11:10:53 AM org.apache.coyote.AbstractProtocolHandler init
    INFO: Initializing ProtocolHandler ["http-bio-8181"]
    Apr 18, 2011 11:10:53 AM org.apache.coyote.AbstractProtocolHandler init
    INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
    Apr 18, 2011 11:10:53 AM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 772 ms
    Apr 18, 2011 11:10:53 AM org.apache.catalina.core.StandardService startInternal
    INFO: Starting service Catalina
    Apr 18, 2011 11:10:53 AM org.apache.catalina.core.StandardEngine startInternal
    INFO: Starting Servlet Engine: Apache Tomcat/7.0.8
    Apr 18, 2011 11:10:53 AM org.apache.catalina.core.ApplicationContext log
    INFO: Marking servlet dispatcher as unavailable
    Apr 18, 2011 11:10:53 AM org.apache.catalina.core.StandardContext loadOnStartup
    SEVERE: Servlet /Vanila threw load() exception
    java.lang.ClassNotFoundException: org.springframework.context.ApplicationListener
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1676)
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1521)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(Unknown Source)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknow n Source)
    at org.apache.catalina.loader.WebappClassLoader.findC lassInternal(WebappClassLoader.java:2818)
    at org.apache.catalina.loader.WebappClassLoader.findC lass(WebappClassLoader.java:1148)
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1643)
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1521)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(Unknown Source)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknow n Source)
    at org.apache.catalina.loader.WebappClassLoader.findC lassInternal(WebappClassLoader.java:2818)
    at org.apache.catalina.loader.WebappClassLoader.findC lass(WebappClassLoader.java:1148)
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1643)
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1521)
    at org.apache.catalina.core.DefaultInstanceManager.lo adClass(DefaultInstanceManager.java:415)
    at org.apache.catalina.core.DefaultInstanceManager.lo adClassMaybePrivileged(DefaultInstanceManager.java :397)
    at org.apache.catalina.core.DefaultInstanceManager.ne wInstance(DefaultInstanceManager.java:118)
    at org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:1048)
    at org.apache.catalina.core.StandardWrapper.load(Stan dardWrapper.java:996)
    at org.apache.catalina.core.StandardContext.loadOnSta rtup(StandardContext.java:4834)
    at org.apache.catalina.core.StandardContext$3.call(St andardContext.java:5155)
    at org.apache.catalina.core.StandardContext$3.call(St andardContext.java:5150)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unkn own Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Apr 18, 2011 11:10:53 AM org.apache.coyote.AbstractProtocolHandler start
    INFO: Starting ProtocolHandler ["http-bio-8181"]
    Apr 18, 2011 11:10:53 AM org.apache.coyote.AbstractProtocolHandler start
    INFO: Starting ProtocolHandler ["ajp-bio-8009"]
    Apr 18, 2011 11:10:53 AM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 473 ms
    Apr 18, 2011 11:10:54 AM org.apache.catalina.core.StandardWrapperValve invoke
    INFO: Servlet dispatcher is currently unavailable


    Do you guys know what is this? I tried googling but did not help.

    Thank you

    Mike

    Comment


    • #3
      You havn't spring in your classpath.

      in the link you gave, you have a lib a library (after "You need to have the following lib files in the WEB-INF/lib directory.") Check all library are included.

      Comment


      • #4
        hi

        Thanks for your reply.. what do you mean by spring not in my classpath...

        I have included the spring jars in project>add jars...do you mean this?

        Please clarify for the newbie

        Thank you

        Mike

        Comment


        • #5
          Originally posted by mikecalbor View Post
          that error is gone after i imported couple of jar files in the WEB-INF/lib folder...

          SEVERE: Servlet /Vanila threw load() exception
          java.lang.ClassNotFoundException: org.springframework.context.ApplicationListener
          at ...
          You added some library in your WEB-INF/lib folder...
          BUT you always have a class not found exeption on a Spring class. That means Spring is not in the WEB-INF/lib

          You added the lib in the eclipse project, but how did you launch your project? With eclipse and "Run on server" or manually...

          Comment


          • #6
            hi again

            With eclipse and "Run on server"........I running like this

            Comment


            • #7
              You can ignore the error report about apr. That is just saying that some native libraries that make Tomcat faster are not installed.

              Which Spring libraries have you added to your application?

              Comment


              • #8
                hi

                spring,spring-beans,spring-context,spring-core,spring-web,spring-webflow,spring-webmvc,standard

                And some of hibernate jars and other springframework jars..

                all are in the Libraries folder.

                In the WEB-INF/lib folder i have

                spring-web,spring-webflow,spring-mvc



                Thank you

                mike

                Comment


                • #9
                  You need to have all the jars in WEB-INF/lib so that they are picked up at runtime.

                  Comment

                  Working...
                  X