Announcement Announcement Module
Collapse
No announcement yet.
Hello World Broken woth HTTP Status 404 for new and minimal Spring MVC project Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hello World Broken woth HTTP Status 404 for new and minimal Spring MVC project

    When I tried following the procedure for a minimal "Hello World" program following the directions for the first part of http://www.youtube.com/watch?v=gwdISLtlWic I received a 404 error.

    So all I have down is downloaded and installed 3.1.0-RELEASE-e3.8 and created a spring MVC project (as directed in the video) and then I do a "Run As" -> on server with the VMWare vFabric tc Server Developer Ed v2.7 I get a 404 for http://localhost:8080/demo

    I also tried tomcat 6 and tomcat 7 with no luck!
    It works for the guy in the YouTube video but not me!

    I'm running Java 1.7. I tried to install sts with 64 bit jvm and when it complained, I switched to 32 bit JVM. Tomcat 6 and Tomcat 7 are 64 bits wide. Does this matter? Surely the builtin server VMWar VFabrick TC server must the the correct number of bits!

    Can someone help me get hello world working?
    Thanks
    Siegfried

  • #2
    Hey Siegfried!

    What happens if you do a "clean" on the project and deploy after that clean build? That solves this issue in most of the cases...

    HTH,
    Martin

    Comment


    • #3
      Thanks for the suggestion. Unfortunately, it did not seem to help.
      Any other suggestions?
      Maybe I need a different (older) version?

      Comment


      • #4
        Hey Siegfried!

        How does the project look like in your workspace? Are there any errors showing up? Or is there anything related in the Error Log view? Maybe your problem is related to the Maven integration not being able to resolve all dependencies correctly. This is just a wild guess from here at the moment, but due to missing details, that is the only thing that comes to my mind here...

        The STS version 3.1.0.RELEASE for Eclipse 3.8 is definitely the right thing to use and running the MVC template project from it works for me, therefore the question for more details...

        -Martin

        Comment


        • #5
          Stack trace on TOMCAT 7 startup

          I'm getting some pop up dialogs about a java null pointer except when I start up STS. However, it is not consistent!

          I'm also getting a message about Egit -- the same one as described here: http://stackoverflow.com/questions/1...t-installation Apparently I can ignore this message?

          Can someone help me extract any clues from the console log?
          Code:
          Feb 24, 2013 8:05:07 PM 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: <long path.. removed>
          Feb 24, 2013 8:05:07 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
          WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:HelloSpringMVC' did not find a matching property.
          Feb 24, 2013 8:05:07 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
          WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:FirstLesson' did not find a matching property.
          Feb 24, 2013 8:05:08 PM org.apache.coyote.AbstractProtocol init
          INFO: Initializing ProtocolHandler ["http-bio-8080"]
          Feb 24, 2013 8:05:08 PM org.apache.coyote.AbstractProtocol init
          INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
          Feb 24, 2013 8:05:08 PM org.apache.catalina.startup.Catalina load
          INFO: Initialization processed in 1348 ms
          Feb 24, 2013 8:05:08 PM org.apache.catalina.core.StandardService startInternal
          INFO: Starting service Catalina
          Feb 24, 2013 8:05:08 PM org.apache.catalina.core.StandardEngine startInternal
          INFO: Starting Servlet Engine: Apache Tomcat/7.0.35
          Feb 24, 2013 8:05:09 PM org.apache.tomcat.util.scan.StandardJarScanner scan
          WARNING: Failed to scan JAR [file:/C:/Users/siegfried/Documents/spring-tool-suite-workspaces/HelloWorldSpringMVC/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/HelloSpringMVC/WEB-INF/lib/spring-web-3.1.1.RELEASE.jar] from WEB-INF/lib
          java.util.zip.ZipException: invalid CEN header (bad signature)
          	at java.util.zip.ZipFile.open(Native Method)
          	at java.util.zip.ZipFile.<init>(ZipFile.java:214)
          	at java.util.zip.ZipFile.<init>(ZipFile.java:144)
          	at java.util.jar.JarFile.<init>(JarFile.java:152)
          	at java.util.jar.JarFile.<init>(JarFile.java:89)
          	at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:93)
          	at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:69)
          <stack trace edited...>
          
          Feb 24, 2013 8:05:09 PM org.apache.catalina.startup.ContextConfig processServletContainerInitializers
          SEVERE: Failed to process JAR found at URL [jar:file:/C:/Users/siegfried/Documents/spring-tool-suite-workspaces/HelloWorldSpringMVC/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/HelloSpringMVC/WEB-INF/lib/spring-web-3.1.1.RELEASE.jar!/] for ServletContainerInitializers for context with name [/demo]
          Feb 24, 2013 8:05:09 PM org.apache.catalina.startup.ContextConfig configureStart
          SEVERE: Marking this application unavailable due to previous error(s)
          Feb 24, 2013 8:05:09 PM org.apache.catalina.startup.TldConfig tldScanJar
          WARNING: Failed to process JAR [jar:file:/C:/Users/siegfried/Documents/spring-tool-suite-workspaces/HelloWorldSpringMVC/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/HelloSpringMVC/WEB-INF/lib/spring-webmvc-3.1.1.RELEASE.jar!/] for TLD files
          java.util.zip.ZipException: invalid LOC header (bad signature)
          	at java.util.zip.ZipFile.read(Native Method)
          	at java.util.zip.ZipFile.access$1400(ZipFile.java:56)
          	at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:677)
          	at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:413)
          	at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
          	at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:122)
          	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager$RewindableInputStream.read(XMLEntityManager.java:2905)
          	at 
          <edited stack trace...>
          
          Feb 24, 2013 8:05:09 PM org.apache.catalina.startup.TldConfig tldScanJar
          WARNING: Failed to process JAR [jar:file:/C:/Users/siegfried/Documents/spring-tool-suite-workspaces/HelloWorldSpringMVC/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/HelloSpringMVC/WEB-INF/lib/spring-web-3.1.1.RELEASE.jar!/] for TLD files
          java.util.zip.ZipException: invalid CEN header (bad signature)
          	at java.util.zip.ZipFile.open(Native Method)
          	at java.util.zip.ZipFile.<init>(ZipFile.java:214)
          	at java.util.zip.ZipFile.<init>(ZipFile.java:144)
          	at java.util.jar.JarFile.<init>(JarFile.java:152)
          	at java.util.jar.JarFile.<init>(JarFile.java:89)
          	at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:93)
          	at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:69)
          	at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:98)
          	at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122)
          
          <edited stack trace ...>
          
          
          Feb 24, 2013 8:05:09 PM org.apache.catalina.core.StandardContext startInternal
          SEVERE: Error getConfigured
          Feb 24, 2013 8:05:09 PM org.apache.catalina.core.StandardContext startInternal
          SEVERE: Context [/demo] startup failed due to previous errors
          Feb 24, 2013 8:05:10 PM org.apache.tomcat.util.scan.StandardJarScanner scan
          WARNING: Failed to scan JAR [file:/C:/Users/siegfried/Documents/spring-tool-suite-workspaces/HelloWorldSpringMVC/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/FirstLesson/WEB-INF/lib/spring-web-3.1.1.RELEASE.jar] from WEB-INF/lib
          java.util.zip.ZipException: invalid CEN header (bad signature)
          	at java.util.zip.ZipFile.open(Native Method)
          	at java.util.zip.ZipFile.<init>(ZipFile.java:214)
          	at java.util.zip.ZipFile.<init>(ZipFile.java:144)
          	at java.util.jar.JarFile.<init>(JarFile.java:152)
          	at java.util.jar.JarFile.<init>(JarFile.java:89)
          	at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:93)
          	at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:69)
          	at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:98)
          
          <stack trace...>
          
          Feb 24, 2013 8:05:10 PM org.apache.catalina.startup.ContextConfig processServletContainerInitializers
          SEVERE: Failed to process JAR found at URL [jar:file:/C:/Users/siegfried/Documents/spring-tool-suite-workspaces/HelloWorldSpringMVC/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/FirstLesson/WEB-INF/lib/spring-web-3.1.1.RELEASE.jar!/] for ServletContainerInitializers for context with name [/src]
          Feb 24, 2013 8:05:10 PM org.apache.catalina.startup.ContextConfig configureStart
          SEVERE: Marking this application unavailable due to previous error(s)
          Feb 24, 2013 8:05:10 PM org.apache.catalina.startup.TldConfig tldScanJar
          WARNING: Failed to process JAR [jar:file:/C:/Users/siegfried/Documents/spring-tool-suite-workspaces/HelloWorldSpringMVC/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/FirstLesson/WEB-INF/lib/spring-webmvc-3.1.1.RELEASE.jar!/] for TLD files
          java.util.zip.ZipException: invalid LOC header (bad signature)
          	at java.util.zip.ZipFile.read(Native Method)
          	at java.util.zip.ZipFile.access$1400(ZipFile.java:56)
          	at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:677)
          	at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:413)
          	at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
          	at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:122)
          
          <stack trace edited>
          
          Feb 24, 2013 8:05:10 PM org.apache.catalina.startup.TldConfig tldScanJar
          WARNING: Failed to process JAR [jar:file:/C:/Users/siegfried/Documents/spring-tool-suite-workspaces/HelloWorldSpringMVC/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/FirstLesson/WEB-INF/lib/spring-web-3.1.1.RELEASE.jar!/] for TLD files
          java.util.zip.ZipException: invalid CEN header (bad signature)
          	at java.util.zip.ZipFile.open(Native Method)
          	at java.util.zip.ZipFile.<init>(ZipFile.java:214)
          	at java.util.zip.ZipFile.<init>(ZipFile.java:144)
          	at java.util.jar.JarFile.<init>(JarFile.java:152)
          	at java.util.jar.JarFile.<init>(JarFile.java:89)
          	at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:93)
          	at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:69)
          	at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:98)
          	at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122)
          	at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:89)
          
          <stack trace edited...>
          
          Feb 24, 2013 8:05:10 PM org.apache.catalina.core.StandardContext startInternal
          SEVERE: Error getConfigured
          Feb 24, 2013 8:05:10 PM org.apache.catalina.core.StandardContext startInternal
          SEVERE: Context [/src] startup failed due to previous errors
          Feb 24, 2013 8:05:10 PM org.apache.coyote.AbstractProtocol start
          INFO: Starting ProtocolHandler ["http-bio-8080"]
          Feb 24, 2013 8:05:10 PM org.apache.coyote.AbstractProtocol start
          INFO: Starting ProtocolHandler ["ajp-bio-8009"]
          Feb 24, 2013 8:05:10 PM org.apache.catalina.startup.Catalina start
          INFO: Server startup in 2042 ms

          Comment


          • #6
            Hey!

            The error log looks like the JAR files for your spring libraries are corrupt (maybe a virus scanner or a proxy interfered with them). I would delete the complete local Maven repository (~/.m2/repository) and let Eclipse/STS/Maven download the artifacts again. You can do that by deleting that Maven repo, and then go to your workspace and do an "Maven -> Update Project...". This should trigger the Maven integration to download the artifacts again.

            I would also un-deploy the app from the tc Server instance before and then re-deploy it afterwards.

            HTH,
            Martin

            Comment


            • #7
              Yahoo! That fixed it! Thanks!

              Comment


              • #8
                Hey!

                Glad to hear its working now!!!
                And thanks for letting us know!!!

                Cheers,
                -Martin

                Comment

                Working...
                X