1

I am trying to deploy my spring application in a server machine which having the tomcat 6.0.29 server. But tomcat server getting stop automatically while extracting the war.
In Catalina Log I have the following:

Jan 27, 2012 3:02:44 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive application.war  

In localhost.log

Jan 27, 2012 3:03:21 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext

There is no any stacktrace.

I tried to restart the tomcat but server getting stop while extracting the war file. I tried by increasing the JVM memory to 1024MB. Still same problem.

I have deployed the same war in my another testing server and it is working fine.

Any help...

vissu
  • 1,921
  • 7
  • 37
  • 52
  • Are you sure there are no errors in all of the Tomcat logs? Is Tomcat responsive or hangs? Can you make a thread dump using `jstack` or JVisualVM? – Tomasz Nurkiewicz Jan 27 '12 at 08:32
  • Hai Tomasz Nurkiewicz, Yes I do not have any errors stacktrace in tomcat logs. Tomcat got stopped immediately. And I will try jstack now for thread dump. – vissu Jan 27 '12 at 08:40
  • Is it the Tomcat java process which crashes ? – ndeverge Jan 27 '12 at 09:15
  • @nico_ekito, Tomcat getting Crash. – vissu Jan 27 '12 at 09:38
  • What version of the JVM are you using ? And which one (Oracle, OpenJDK, Gnu) ? – ndeverge Jan 27 '12 at 09:39
  • @nico_ekito,I am Using Oracle Jdk1.7.0. My main problem is **Facing problem in production server.** Working fine in my local machine and my testing server. – vissu Jan 27 '12 at 09:44
  • Try updating the logging level of Spring (DEBUG), and maybe you'll see the bean which crashes. – ndeverge Jan 27 '12 at 09:54

3 Answers3

1

Are you seeing something like this "SEVERE: Error listenerStart"? or none in the logs. If Tomcat fails there should be a thread dump and/or a heap dump in the startup directory. Also check the ports available from OS/firewall to bind with.

Enabling debug logging might help. (Change the log levels to DEBUG instead of INFO in the log files below)

Enabling Tomcat debug log: Refer to : How to set level logging to DEBUG in Tomcat 6?

Enabling Spring debug log:

You can enable spring debug logging mode (why its failing to deploy the webapp) by adding the logging.properties(name should match exactly) in your WEB-INF/classes directory

Refer to : SEVERE: Error listenerStart

Community
  • 1
  • 1
Rajendra
  • 1,703
  • 2
  • 16
  • 22
  • Roller and Eric B, Thank you for your information. But the exact problem is, my server Hard disk has some bad blocks. So registry is failing while I am trying to run the big application in tomcat. So I formatted the hard disk and installed all needed tools and tried to deploy the application again. Now it is working fine... Thanks again. – vissu Jan 31 '12 at 12:41
0

Last time I faced this problem it was due to the fact I was thinking that I am using h2database while the configurations were such that it was using mysql and of course there was no mysql server to connect to. I was using a maven project in eclipse and none of my changes were taking effect until I did

Project Properties-> Maven-> Update Project and then in

Servers Tab right click on the server name and Publish.

Check the jdbc.properties file in the webapp (in my case it was somewhere inside /.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/ folder) not in source code to see what are the final parameters for database connection.

0

How are you launching Tomcat? What OS is this? I have encountered this problem myself in the past when launching Tomcat on CentOS using a startup script. Usually had something to do with security settings of the files and/or of selinux preventing the writing/reading of certain filespaces on the disk.

Try running from the console using ./catalina.sh run and see if that works on the server (assuming it is a *nix server). If so, check ownership of all files and read/write permissions. Disable selinux (if currently enabled) momentarily to see if that makes any difference.

It's a bunch of trial and error when you don't have any further debug information available.

Eric B.
  • 23,425
  • 50
  • 169
  • 316