my dog learned polymorphism*
The moose likes Spring and the fly likes HTTP Status 404 - Servlet appServlet is not available Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "HTTP Status 404 - Servlet appServlet is not available" Watch "HTTP Status 404 - Servlet appServlet is not available" New topic
Author

HTTP Status 404 - Servlet appServlet is not available

Arian Zand
Greenhorn

Joined: May 28, 2012
Posts: 9
Hi I have a Webapplication and yesterday everything was ok when I tried to run my project.
Today I wanted to run my project and get the error :HTTP Status 404 - Servlet appServlet is not available

I dont know how eclipse sunddely dont find my appServlet because i have nothing chanched in my web.xml or another file.

This is my error



29-mei-2012 16:56:56 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:\Win dows\system32;C:\Windows;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\Sys tem32\Wbem;C:\Windows\System32\WindowsPowerShell\v 1.0\;C:\Program Files (x86)\Windows Live\Shared;;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Prog ram Files (x86)\Microsoft SQL Server\100\DTS\Binn\;D:\Semester2\Webontwikkeling\ apache-maven-3.0.4-bin\apache-maven-3.0.4\bin;JAVA_HOME%\bin;C:\Program Files (x86)\VDownloader;C:\Program Files\TortoiseSVN\bin;.
29-mei-2012 16:56:56 org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:SpringMVCOefeningen' did not find a matching property.
29-mei-2012 16:56:57 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
29-mei-2012 16:56:57 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1285 ms
29-mei-2012 16:56:57 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
29-mei-2012 16:56:57 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.33
29-mei-2012 16:56:58 org.apache.catalina.core.ApplicationContext log
INFO: Marking servlet appServlet as unavailable
29-mei-2012 16:56:58 org.apache.catalina.core.ApplicationContext log
SEVERE: Error loading WebappClassLoader
context: /SpringMVCOefeningen
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@5a5 e5a50
org.springframework.web.servlet.DispatcherServlet
java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet
at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1526)
at org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:1095)
at org.apache.catalina.core.StandardWrapper.load(Stan dardWrapper.java:993)
at org.apache.catalina.core.StandardContext.loadOnSta rtup(StandardContext.java:4421)
at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4734)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:840)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:463)
at org.apache.catalina.core.StandardService.start(Sta ndardService.java:525)
at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalin a.java:595)
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:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:414)
29-mei-2012 16:56:58 org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /SpringMVCOefeningen threw load() exception
java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet
at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1526)
at org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:1095)
at org.apache.catalina.core.StandardWrapper.load(Stan dardWrapper.java:993)
at org.apache.catalina.core.StandardContext.loadOnSta rtup(StandardContext.java:4421)
at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4734)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:840)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:463)
at org.apache.catalina.core.StandardService.start(Sta ndardService.java:525)
at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalin a.java:595)
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:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:414)
29-mei-2012 16:56:58 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
29-mei-2012 16:56:58 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
29-mei-2012 16:56:58 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/44 config=null
29-mei-2012 16:56:58 org.apache.catalina.startup.Catalina start
INFO: Server startup in 1584 ms
29-mei-2012 16:56:59 org.apache.catalina.core.StandardWrapperValve invoke
INFO: Servlet appServlet is currently unavailable
This us my web.xml

Code:


Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1646
    
    7

You are getting a class not found error.

java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet

Do you have spring-mvc in your POM? How are you deploying this to Tomcat? Make sure the libs are getting properly deployed/bundled.


[How To Ask Questions][Read before you PM me]
Arian Zand
Greenhorn

Joined: May 28, 2012
Posts: 9
Bill Gorder wrote:You are getting a class not found error.

java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet

Do you have spring-mvc in your POM? How are you deploying this to Tomcat? Make sure the libs are getting properly deployed/bundled.


Hey Bill Gorder

Im new in Spring MVC/Java, How can i be sure that my libs are properly deploying?
So i have a few dependecies in my pom of Spring

Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1646
    
    7

Well you have a dependency (spring-webmvc) that should pull in that class. So next step is to check your deploy directory on tomcat and make sure the spring-webmvc.jar is in there. You can see this link for more information about tomcat and deploying applications.

http://tomcat.apache.org/tomcat-7.0-doc/deployer-howto.html

I would start your search for the jar here:




You can also use a zip program to inspect your application jar that maven builds and places in your target directory and making sure that your dependencies are being packaged correctly in there.

P.S.

I notice you have an unused property at the bottom '<spring.version>3.0.0.RELEASE</spring.version> '

You should use this instead of supplying the version for every dependency then you only need to change it in one place. Also the latest version is 3.1.1-RELEASE

You could also try pulling in spring-web although you really should have what you need with the webmvc

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
Arian Zand
Greenhorn

Joined: May 28, 2012
Posts: 9
Bill Gorder wrote:Well you have a dependency (spring-webmvc) that should pull in that class. So next step is to check your deploy directory on tomcat and make sure the spring-webmvc.jar is in there. You can see this link for more information about tomcat and deploying applications.

http://tomcat.apache.org/tomcat-7.0-doc/deployer-howto.html

I would start your search for the jar here:




You can also use a zip program to inspect your application jar that maven builds and places in your target directory and making sure that your dependencies are being packaged correctly in there.

P.S.

I notice you have an unused property at the bottom '<spring.version>3.0.0.RELEASE</spring.version> '

You should use this instead of supplying the version for every dependency then you only need to change it in one place. Also the latest version is 3.1.1-RELEASE

You could also try pulling in spring-web although you really should have what you need with the webmvc

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>



Problem Solved! I deleted my Tomcat server and it works now :-)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTTP Status 404 - Servlet appServlet is not available
 
Similar Threads
Compiler Not Found, Despite Installing JDK
apache tomcat 6.0.14 not starting
HTTP Status 503 - This application is not currently available
Servlet is not working
Can't get JPA with hibernate running using tomcat