I am trying to load a WAR file to my Tomcat 7,
and I am using eclipse to start or stop the Server.
I pasted the war file in TOMCAT_HOME/webapps folder and I started the server.
The server Started fine and i got the below console message.
10 Dec, 2012 9:10:46 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: F:\Program Files\Java\jdk1.6.0_37\jre\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;F:/Program Files/Java/jre6/bin/client;F:/Program Files/Java/jre6/bin;F:/Program Files/Java/jre6/lib/i386;C:\Program Files\AMD APP\bin\x86;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\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Windows Live\Shared;C:\Program Files\QuickTime\QTSystem\;.;F:\Program Files\Java\jdk1.6.0_37\bin;F:\apache-maven-3.0.4\bin;;F:\eclipse-juno;;.
10 Dec, 2012 9:10:46 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8090"]
10 Dec, 2012 9:10:46 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
10 Dec, 2012 9:10:46 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 484 ms
10 Dec, 2012 9:10:46 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
10 Dec, 2012 9:10:46 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.33
10 Dec, 2012 9:10:46 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8090"]
10 Dec, 2012 9:10:46 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
10 Dec, 2012 9:10:46 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 211 ms
But when i try to access my application it gave me ERROR 404, File not Found.
I checked the application TOMCAT_HOME/webapps there i found both my war file and a folder of same name - "JavaServerFaces"
TOMCAT_HOME/webapps directory :
The Server is ON, war file is present, A folder structure is generated, but still i am not able to access my application which gives
HTTP Status 404 - /JavaServerFaces/xhtml/hello.xhtml
Any solutions for proper deployment and running of war file on tomcat 7?
In your console message, I do not find the deploying of "JavaServerFaces.war".
In eclipse,
open your server setting file,under "Server Location " check if the option "Use tomcat installation (.......) ".
if it is checked, then check the deploy name if it "webapps". if not then, change it to "webapps".
And if, this all are correct, then possibly your .war file is making fault.
There is problem with tomcat to start or stop with eclipse.
Its best to start and stop tomcat with the bat files in bin folder.
There are 3 steps to find error
1) copy the folder name which contains all application file and paste it into url. Now copy your servlet application url from web.xml and paste after folder name. If that works that means your Servlet application have some error..see the server console
2)On clicking on your application name in Manager App, and then your html file didn't run then there must be error in you your xml file try to rename your html file to index.xhtml
3)4** error shows that there is an error on xml or html file. while 5** series error shows there is error in your tomcat server.
Check the server setting in your eclipse. Check where the Configuration path is pointing. Also notice the Server location. By default it's Workspace Metadata, so set it to Tomcat Installation in your case.
Related
I have a jar that deploys and runs in a standalone tomcat 8.0.28 server with Java 8.0.66
I wish to run it from an embedded Tomcat to run integration tests.
The war deploys but fails to start, I ran out of ideas, I am getting the following error:
Dec 07, 2015 6:11:46 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-9191"]
Dec 07, 2015 6:11:46 PM org.apache.tomcat.util.net.NioSelectorPool
getSharedSelector
INFO: Using a shared selector for servlet write/read
Dec 07, 2015 6:11:46 PM org.apache.catalina.core.StandardService
startInternal
INFO: Starting service Tomcat
Dec 07, 2015 6:11:46 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.0.28
Dec 07, 2015 5:43:47 PM org.apache.catalina.startup.ContextConfig
getDefaultWebXmlFragment
INFO: No global web.xml found
Dec 07, 2015 5:43:47 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Tomcat].StandardHost[localhost].
StandardContext[/StrateboBackEnd]]
...
Caused by: org.apache.catalina.LifecycleException:
Failed to start component StandardEngine[Tomcat].StandardHost[localhost].
StandardContext[/myApp]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
... 6 more
Caused by: java.lang.NoSuchMethodError:
javax.servlet.ServletContext.getClassLoader()Ljava/lang/ClassLoader;
I have the following setup for the embed tomcat
final Tomcat tomcat = new Tomcat();
tomcat.setPort(9191);
File baseDir = new File(".");
Context context = tomcat.addContext("", baseDir.getAbsolutePath());
tomcat.addWebapp("/Myapp", "C://Users//Add//git//Myapp//build//libs//Myapp-1.1.war");
tomcat.enableNaming();
ContextResource res = new ContextResource();
res.setName("jdbc/myDatabase");
res.setType("javax.sql.DataSource");
res.setAuth("Container");
res.setProperty("username", "username");
res.setProperty("password", "password");
res.setProperty("driverClassName","net.sourceforge.jtds.jdbc.Driver");
res.setProperty("url", "jdbc:jtds:sqlserver://127.0.0.1:1433//myDatabase");
res.setProperty("maxTotal", "10");
res.setProperty("maxIdle", "10");
res.setProperty("maxWaitMillis", "10000");
res.setProperty("removeAbandonedTimeout","300");
res.setProperty("defaultAutoCommit","true");
context.getNamingResources().addResource(res);
tomcat.start();
tomcat.getServer().await();
I have a context.xml that I use for normal deployment but this does not get read in embedded from what I can tell.
Since the jar works on a standalone I know that the jar is not the problem
There is this Info line
INFO: No global web.xml found
Which might point to an issue but could not find a reference
Just in case here is the relevant part of my gradle file for dependencies
compile 'org.apache.tomcat:tomcat-util:8.0.28'
compile 'org.apache.tomcat.embed:tomcat-embed-core:8.0.28'
compile 'org.apache.tomcat.embed:tomcat-embed-jasper:8.0.28'
compile 'org.apache.tomcat.embed:tomcat-embed-logging-juli:8.0.28'
compile 'org.apache.tomcat:tomcat-dbcp:8.0.28'
Any suggestions greatly appreciated?
For an extra point is there any way to get tomcat to give better feedback as to what it is not liking?
After some research it looks like most of the questions on StackOverflow regarding embedded Tomcat 8 remain unanswered there does not seem to be interest or development in this area. As this was for integration testing I setup a tomcat server on my Jenkins machine and Jenkins pushes the war unto it, restarts it then runs the integration tests. This work even though it may not be the most elegant.
Trying to run my app with IntelliJ 13 and Apache tomcat 7.0.42. JDK1.6
Always getting the error Artifact app:war exploded: Server is not connected. Deploy is not available.
But when I deploy through terminal with catalina.sh start it works perfectly fine.
I referred this link for setup: http://confluence.jetbrains.com/display/IntelliJIDEA/Application+Servers
Any idea what am I missing?
Here is the Tomcat Catalina log:
Dec 29, 2014 11:43: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: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
Dec 29, 2014 11:43:29 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Dec 29, 2014 11:43:29 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Dec 29, 2014 11:43:29 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 614 ms
Dec 29, 2014 11:43:29 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Dec 29, 2014 11:43:29 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.42
Dec 29, 2014 11:43:29 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Dec 29, 2014 11:43:29 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Dec 29, 2014 11:43:29 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 44 ms
Dec 29, 2014 11:43:39 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /Users/yesuagg/apache-tomcat-7.0.42/webapps/manager
Exception in Event log
4:58:40 PM Compilation completed successfully with 104 warnings in 6 sec
4:58:42 PM Application Server was not connected before run configuration stop, reason:
java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused]
Please check this answer posted by Christian and also read that thread.
Tomcat deployment issue via IntelliJ
Simply try removing setenv.sh in $CATALINA_HOME/bin
I had this issue today and it wasn't due to setenv.sh as discussed on the other thread. In the end it was an issue with $CATALINA_BASE/conf/server.xml.
For some reason in our server.xml we were using a custom engine name for example
<Engine name="custom-value" defaultHost="localhost">
I tried again with a clean server.xml from tomcat 7.0.57 and the artifact deployed perfectly. After trial and error it came down to this one line.
Changing engine name to 'Catalina' as shown below value fixed our issue and allowed our exploded artifact to deploy using our customised server.xml
<Engine name="Catalina" defaultHost="localhost">
If you are seeing this issue try a clean server.xml and work backwards from there.
tomcat-7.0-doc RUNNING
(3.2) Set JRE_HOME or JAVA_HOME (required)
These variables are used to specify location of a Java Runtime
Environment or of a Java Development Kit that is used to start Tomcat.
The JRE_HOME variable is used to specify location of a JRE. The JAVA_HOME
variable is used to specify location of a JDK.
Using JAVA_HOME provides access to certain additional startup options that
are not allowed when JRE_HOME is used.
If both JRE_HOME and JAVA_HOME are specified, JRE_HOME is used.
In my case, Intellij IDEA doesn't support run tomcat8 installed from linux repositories.
/usr/share/tomcat/bin/catalina.sh start (not support)
/usr/share/tomcat/bin/catalina.sh run (supported)
Only tomcat8 installed from official website. I tried with distribution downloaded from http://tomcat.apache.org/download-80.cgi. So I got successful results.
The reason is in the catalina.sh file from linux distribution, where there isn't "run" command. But in the tomcat downloaded there is "run" command. catalina.sh_InstalledFromLinuxRepository
Do you set JAVA_OPTS anywhere in Tomcat bat/sh files?
If you do, make sure to keep previous values also - IDEA seems to use those to specify some connection options to Tomcat.
E.g. in .sh files do
JAVA_OPTS="<your new stuff> $JAVA_OPTS"
instead of just
JAVA_OPTS=<your new stuff>
P.S. Same answer as this actually: https://stackoverflow.com/a/28867346/307295
I have downloaded liferay bundle with tomcat.
I unpack it to my mac Applications/Administrating/liferay....
I have run ./startup.sh
And at the exnd I get: INFO: Server startup in 47781 ms
But when I open localhost:8080 in browser I get "No data received" like there is no site installed.
This is whole log:
Using CATALINA_BASE: /Applications/Administrating/liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40
Using CATALINA_HOME: /Applications/Administrating/liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40
Using CATALINA_TMPDIR: /Applications/Administrating/liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40/temp
Using JRE_HOME: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Using CLASSPATH: /Applications/Administrating/liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40/bin/bootstrap.jar:/Applications/Administrating/liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40/bin/tomcat-juli.jar
STSiMacVVU:bin vladimirvucetic$ tail -f ../logs/catalina.out
Oct 21, 2013 2:30:04 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Oct 21, 2013 2:30:04 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 665 ms
Oct 21, 2013 2:30:04 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Oct 21, 2013 2:30:04 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.40
Oct 21, 2013 2:30:04 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /Applications/Administrating/liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40/conf/Catalina/localhost/ROOT.xml
Loading jar:file:/Applications/Administrating/liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
Loading jar:file:/Applications/Administrating/liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
Oct 21, 2013 2:30:16 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
14:30:21,037 INFO [localhost-startStop-1][DialectDetector:71] Determine dialect for HSQL Database Engine 2
14:30:21,040 WARN [localhost-startStop-1][DialectDetector:86] Liferay is configured to use Hypersonic as its database. Do NOT use Hypersonic in production. Hypersonic is an embedded database useful for development and demo'ing purposes. The database settings can be changed in portal-ext.properties.
14:30:21,084 INFO [localhost-startStop-1][DialectDetector:136] Found dialect org.hibernate.dialect.HSQLDialect
14:30:36,629 WARN [localhost-startStop-1][PDFProcessorImpl:235] Liferay is not configured to use ImageMagick. For better quality document and image previews, install ImageMagick and enable it in portal-ext.properties or in the Server Administration control panel at: http://<server>/group/control_panel/manage/-/server/external-services
Starting Liferay Portal Community Edition 6.1.2 CE (Paton / Build 6102 / August 2, 2013)
14:30:41,605 INFO [localhost-startStop-1][BaseDB:478] Database supports case sensitive queries
14:30:42,056 INFO [localhost-startStop-1][ServerDetector:169] Server supports hot deploy
14:30:42,064 INFO [localhost-startStop-1][PluginPackageUtil:1046] Reading plugin package for the root context
14:30:44,914 INFO [localhost-startStop-1][AutoDeployDir:144] Auto deploy scanner started for /Applications/Administrating/liferay-portal-6.1.2-ce-ga3/deploy
Oct 21, 2013 2:30:48 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'Remoting Servlet'
Oct 21, 2013 2:30:49 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /Applications/Administrating/liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40/webapps/marketplace-portlet
Oct 21, 2013 2:30:50 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /Applications/Administrating/liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40/webapps/portal-compat-hook
Oct 21, 2013 2:30:51 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /Applications/Administrating/liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40/webapps/resources-importer-web
Oct 21, 2013 2:30:51 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /Applications/Administrating/liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40/webapps/welcome-theme
Oct 21, 2013 2:30:52 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Oct 21, 2013 2:30:52 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 47781 ms
What am I missing here?
A good starting point is to check if tomcat is receiving requests on port 8080 ; in your command-line type:
telnet localhost 8080
If you get a black/empty screen then tomcat is indeed listening on that port, otherwise you get a connection failure, then you need to doublecheck you tomcat configuration.
It looks like Liferay started up normally (but add more information - catalina.out or others, as gamerson requested in a comment)
Also:
Check Firewall settings (8080 might be blocked)
Your lsof output lists IPV6 (it's been long since I interpreted lsof
output and commandline - this might be normal, or not. You don't say
if you attempt an IPV4 connection)
Try to connect with a browser from that server. If it's a shell-only
server, use w3m or lynx on http://localhost:8080/
#user nobody;
worker_processes 1;
events {
worker_connections 1024;
}
http {
passenger_root /var/lib/gems/1.9.1/gems/passenger-4.0.5;
passenger_ruby /usr/bin/ruby1.9.1;
passenger_max_pool_size 10;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
server {
listen 80;
server_name localhost;
access_log /var/www/access.log;
error_log /var/www/error.log;
location / {
root /var/www/demo/public;
passenger_enabled on;
rails_env production;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
You haven't configured a connector port 8080 so you won't get a response. The only connector you have configured is for AJP on port 8009 as can be seen from the logs.
Oct 21, 2013 2:30:04 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
If you're running the server from Eclipse, Go to Servers -> ports and set 8080 for HTTP/1.1
If you're running a standalone Tomcat, go and edit tomcat/conf/server.xml and set
<Connector URIEncoding="UTF-8" connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
Make sure that the port 8080 is allowed from the server, and it's not used from another application
When the Server start, you should be able to read in the log this :
org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
My expectation would be to find this in the log:
24.10.2013 13:43:14 org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
24.10.2013 13:43:14 org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
this would indicate the protocol handler for 8080 to start.
My advice to find the root cause of your problem is:
Access localhost:8080 before you start Liferay. This might give you the same result, indicating that there's some other software running on port 8080.
If this didn't help: Download a Liferay tomcat bundle again, unzip unchanged to a new location, run that one unchanged as well - if this one works, compare both directories, especially tomcat's /conf/ directory.
If that doesn't work, check if your environment defines any of the variables CATALINA_HOME, CATALINA_BASE, LIFERAY_HOME.
You'll be able to see more of the logs that you posted by running just a single command like ./bin/catalina.sh run. This will run tomcat in the foreground, showing the logs from the beginning without the chance to miss something because the tail command came too late
There is probably some other process using port 8080. Check it with this command:
sudo netstat -lnp | grep ':8080'
Kill that running process
sudo kill -9 {PID}
For example
sudo kill -9 1234
Restart Tomcat (if installed as service)
service tomcat7 restart
I mistakenly had a environment variable for CATALINA_HOME setup a few months back pointing to a different tomcat setup this caused the port 8080 to be invoked by that older setup and thus getting reserved before its used by Liferay. Make sure your CATALINA_HOME variable is configured to point at the tomcat bundled with Liferay.
I've to start working on a web-app project for which I've Eclipse Indigo and Tomcat 7.0 installed. The environment also has JRE 7, Android SDK in it. But whenever I start the server, it gets timed out!
Moreover, I'm able to start the server outside Eclipse and sucessfully execute a web app in the browser. But to debug, I would rather have it in Eclipse.
The error message is:
Server Tomcat v7.0 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor.
In the console I get:
Mar 14, 2012 11:51:18 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\Java\jre7\bin;C:\WINNT\Sun\Java\bin;C:\WINNT\system32;C:\WINNT;C:/Program Files/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program Files/Java/jre7/lib/i386;C:\oracle\product\11.1.0\BIN\;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Executive Software\Diskeeper\;C:\Program Files\Pointsec\Pointsec Media Encryption\Program\;C:\Program Files\Windows Imaging\;C:\oracle\product\11.1.0\BIN;C:\Program Files\Reflection\;C:\eclipse;;.
Mar 14, 2012 11:51:18 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:AUDI_ASSIST_v2.0_WS_REDESIGN_Interceptor' did not find a matching property.
Mar 14, 2012 11:51:18 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-9080"]
Mar 14, 2012 11:51:18 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-9009"]
Mar 14, 2012 11:51:18 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 504 ms
Mar 14, 2012 11:51:18 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Mar 14, 2012 11:51:18 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.26
Mar 14, 2012 11:51:18 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [109] milliseconds.
Mar 14, 2012 11:51:18 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(D:\documents and settings\fahmf\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps\AUDI_ASSIST_v2.0_WS_REDESIGN_Interceptor\WEB-INF\lib\com.ibm.ws.webservices.thinclient_7.0.0.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Mar 14, 2012 11:51:20 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-9080"]
Mar 14, 2012 11:51:20 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-9009"]
Mar 14, 2012 11:51:20 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1697 ms
I have tried the solutions proposed in other questions on this forum like increasing the time out period,changing the port numbers, uninstalling & reinstalling Tomcat, changing the 'publisiing' option for the server but nothing seems to work.
Any help would be sincerely appreciated. Thanks in advance...
Just follow the Simple Steps
Double click on your desired server in the server-view , It will open the window and Right corner of the Window Timout option is availble and change time to 120 . it will work :)
For me the cause was Eclipse. Running the IDE with the '-clean' parameter solved it.
eclipse.exe -clean
Eclipse WTP usually tries to make sure that the web app is up by visiting the default page (/) of the app when you start the server. Until it gets an HTTP 200 (OK) response from that page - it thinks the app is not up. You are probably noticing the server icon (where you start tomcat from) still says "starting" with a green blinking.
I think Eclipse has a bug where it cannot handle a bunch of 302 on the page at / - which could happen if that page was redirecting to another page which was again redirecting to a login page.
SOLVED: That's it!!!! For me was compiling with JDK6 but running Tomcat with JDK7, WST uses the system properties and not the eclipse settings. I also configure the same JDK Version in eclipse and in System (check it with java -version in cmd line)
Details: I try to configure eclipse like describe here, but it didn´t solve the problem, then I notice in eclipse´s error log that tomcat was started with jre 1.7. in spite of my configurations.
I also try, in cmd line, 'java -version' and obtained '1.7' instead of expected '1.6'.
I also decide to configure java 1.6 (like in eclipse) in system panel but it didn´t solve the problem. I also desinstall jre 1.7 restart eclipse AND IT SUCCESS!.. It was a very usefull clue, thank you.
Verify the deployment-descriptor and check the value for <url-pattern>. This can be stopping tomcat to load.
You have to edit eclipse.ini and push to use Java 1.6
-vm
c:\Program Files\Java\jdk1.6.0_25\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-Xms40m
-Xmx512m
http://wiki.eclipse.org/Eclipse.ini#-vm_value:_Windows_Example
type Status report
message /mydirectory/index.jsp
description The requested resource (/mydirectory/index.jsp) is not available.
What could be the issue?
Here is the log file:
Jul 28, 2009 6:16:25 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Testing' did not find a matching property.
Jul 28, 2009 6:16:25 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:\Windows\system32;C:\Windows;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Intel\DMIX;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\10.0\DLLShared\;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\SlikSvn\bin\;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Sun\SDK\bin
Jul 28, 2009 6:16:25 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jul 28, 2009 6:16:25 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 447 ms
Jul 28, 2009 6:16:25 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jul 28, 2009 6:16:25 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
If you're using Eclipse 3.4 or 3.5 -- look at the Servers view in Eclipse. Against your server, you should see "Started" and "Synchronized". If it tells you to restart or republish, right-click on your server and do so.
Deploy your file again (you can drag your index.jsp file on to the server). Does it start this time?
If not, something could be wrong with your web.xml. Open the Console view and look at the server log -- do you notice any exceptions etc? You will need to resolve those.
First of all, check your server plug-in configuration:
When Tomcat within Eclipse publishes you Dynamic Web Project, all embedded tomcat useful files (conf, code, work) are stored in this following location:
<path_to_workspace>\.metadata\.plugins\org.eclipse.wst.server.core\tmp[0-9]
Check the deployment architecture, if you need more help regarding tomcat files architecture, see tomcat documentation