• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Server Tomcat v7.0 Server at localhost failed to start

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey,help me im struck here..i am not able to rectify this problem...
At first while starting the Apache tomcat server 7 with eclipse,i was getting error like this "several ports (8005, 8080, 8009) required by Tomcat v7.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s)."
Anyhow i rectify this error by changing port numbers.........but now it showing like this "Server Tomcat v7.0 Server at localhost failed to start."


May 11, 2013 10:26:35 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: C:\Program Files (x86)\Java\jdk1.6.0_22\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files (x86)/Java/jdk1.6.0_22/bin/../jre/bin/client;C:/Program Files (x86)/Java/jdk1.6.0_22/bin/../jre/bin;C:/Program Files (x86)/Java/jdk1.6.0_22/bin/../jre/lib/i386;C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Program Files (x86)\PC Connectivity Solution\;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\MySQL\MySQL Server 5.1\bin\;C:\Program Files (x86)\Java\jdk1.6.0_22\bin\;C:\Program Files\Common Files\Microsoft Shared\Windows Live;F:\Syed_Taha\Multi_Gallery\SOFTWARES\Eclipse\eclipse-jee-helios-SR2-win32\eclipse;
May 11, 2013 10:26:35 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:MyHomeWorkServlet' did not find a matching property.
May 11, 2013 10:26:35 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8888"]
May 11, 2013 10:26:35 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8090"]
May 11, 2013 10:26:35 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 804 ms
May 11, 2013 10:26:35 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
May 11, 2013 10:26:35 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.27
May 11, 2013 10:26:36 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8888"]
May 11, 2013 10:26:36 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8090"]
May 11, 2013 10:26:36 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 503 ms
May 11, 2013 10:26:36 PM org.apache.catalina.core.StandardServer await
SEVERE: StandardServer.await: create[localhost:8005]:
java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:427)
at org.apache.catalina.startup.Catalina.await(Catalina.java:757)
at org.apache.catalina.startup.Catalina.start(Catalina.java:703)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
May 11, 2013 10:26:36 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8888"]
May 11, 2013 10:26:36 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-bio-8090"]
May 11, 2013 10:26:36 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
May 11, 2013 10:26:36 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-8888"]
May 11, 2013 10:26:36 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-bio-8090"]
May 11, 2013 10:26:36 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8888"]
May 11, 2013 10:26:36 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8090"]
please take me out of this
 
Author and all-around good cowpoke
Posts: 13078
6
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

SEVERE: StandardServer.await: create[localhost:8005]:
java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)



Pretty obvious that some other process on your machine is using ports - If I had to bet I would say there is another copy of Tomcat running.

Did you perhaps install Tomcat as a service set to start up automatically?

It is problems like this that put me off using an environment like Eclipse. Just cant be sure what is going on where you can't see it.

Bill
 
syed taha
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Mr.William For your reply,
With your help i check what was the exact problem and i got to know that there two servers were running on same port number,finally i changed it now my server running successfully.
But i am not execute the servlet and i am getting this error
HTTP Status 404 - Servlet Myservlet is not available

--------------------------------------------------------------------------------

type Status report

message Servlet Myservlet is not available

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


--------------------------------------------------------------------------------

Apache Tomcat/7.0.27



May 12, 2013 10:18:29 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 (x86)\Java\jdk1.6.0_22\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files (x86)/Java/jdk1.6.0_22/bin/../jre/bin/client;C:/Program Files (x86)/Java/jdk1.6.0_22/bin/../jre/bin;C:/Program Files (x86)/Java/jdk1.6.0_22/bin/../jre/lib/i386;C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Program Files (x86)\PC Connectivity Solution\;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\MySQL\MySQL Server 5.1\bin\;C:\Program Files (x86)\Java\jdk1.6.0_22\bin\;C:\Program Files\Common Files\Microsoft Shared\Windows Live;F:\Syed_Taha\Multi_Gallery\SOFTWARES\Eclipse\eclipse-jee-helios-SR2-win32\eclipse;
May 12, 2013 10:18:29 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:syed' did not find a matching property.
May 12, 2013 10:18:29 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8888"]
May 12, 2013 10:18:29 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8090"]
May 12, 2013 10:18:29 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 749 ms
May 12, 2013 10:18:29 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
May 12, 2013 10:18:29 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.27
May 12, 2013 10:18:29 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8888"]
May 12, 2013 10:18:29 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8090"]
May 12, 2013 10:18:29 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 440 ms
May 12, 2013 10:19:14 AM org.apache.catalina.core.ApplicationContext log
INFO: Marking servlet Myservlet as unavailable
May 12, 2013 10:19:14 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Allocate exception for servlet Myservlet
java.lang.ClassNotFoundException: com.practice.taha.servlet
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:525)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:507)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:124)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1136)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:857)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:136)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
May 12, 2013 10:19:21 AM org.apache.catalina.core.StandardWrapperValve invoke
INFO: Servlet Myservlet is currently unavailable


 
Ranch Hand
Posts: 75
Tomcat Server Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

SEVERE: Allocate exception for servlet Myservlet
java.lang.ClassNotFoundException: com.practice.taha.servlet



did you uploaded your jar correctly? tomcat / your application can't find it.
 
syed taha
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
NO USE SIR,I ADD SERVLET-API JAR FILE......BUT STILL GETTING THE SAME.....PLEASE TAKE ME OUT OF HERE
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
K is correct, Tomcat cant find the class -or- does not think your servlet is a valid service.

The usual cause is either:
1. a mistake in the web.xml deployment descriptor - lets see it.
-or-
2. a mistake in directory layout/contents


Bill
 
Saloon Keeper
Posts: 24287
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
com.practice.taha.servlet is not a valid name for a servlet class. Class names should always begin with an upper-case letter. This rule is not always enforced, but it's most likely to cause trouble when you least want it to.

Within the WAR itself, the com.practice.taha.Servlet (note the correction!) should be the file "/WEB-INF/classes/com/practice/taha/Servlet.class".
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic