Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Tomcat Hangs during startup

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My OS is winVista ultimate, I downloaded tomcat 6.0.18 and installed fine. when i run "startup" command, the dos window outputs a bunches of error regarding access denied when writing to log files. I don't want to paste the error code here because it is too long; what should i do now to find the problem?

I tried to start the server in netBean, it took a long time. and finally says it fails on startup. my netbean runs fine with pre-packaged glassfish.

how do i find out the ports to which the tomcat server listens to?
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

ting yun wrote:. I don't want to paste the error code here because it is too long; what should i do now to find the problem?


At least you can paste the part of error message, which can be helpful.

ting yun wrote:

how do i find out the ports to which the tomcat server listens to?



Look at the CATALINA_HOME/conf/server.xml, edit it to change port address.
 
Tim-Ting Chang
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Original error output from netBean output window:



Note: netBean informed me that tomcat failed on startup. when i tried to started again, netbean say port 8080 is already in use. there is no other application server running. when i open IE and type http://localhost:8080/ it hangs there for a long time (more than five minutes).

i also installed the glassfish that came with netBean and it worked fine when i start it under netBean.

I set TOMCAT_HOME = tomcat installation directory, and my JAVA_HOME is set to my J2SE sdk1.6.




 
Sagar Rohankar
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seems like you deleted some file, log files.

The only problem I think is to uninstall tomcat & reinstall..
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

ting yun wrote:Original error output from netBean output window:



first,start tomcat without using netbeans(using startup.bat) ,you get any error?
 
Tim-Ting Chang
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I typed "startup" under tomcat/bin another windows pop up with a lot of error msgs, eventhough it says "INFO: Server startup in 112ms", it still isn't working.

I open IE 7, Firefox and typed "http://localhost:8080". The browser just keep loading and loading and never finishes.

First time i tried using Windows service install, the second time unzip directory to c drive undre the default install directory. Both of them display same error. The reason i start tomcat under netBean is so that I can copy the error msg. but they are basically saying the same thing.

I installed websphere and ibm java 1.5 sdk. i thought it might conflict with tomcat so i removed the java 1.5 sdk implemented by ibm. when i read the output from tomcat, it also stated that it runs on sun's jre. It doesn't mention anything about sdk (or i am not awared of).

I am out of ideas now. usually we either install from .msi/.exe or unzip the binary, and that's all right? what else did i miss?

ting
 
Sagar Rohankar
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First uninstall all the instances of tomcat from your machine and then unzipped the tomcat which can be downloaded from tomcat.apache.org site on c drive and then run..
 
Tim-Ting Chang
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cool. I got it working.

I stepped down from 6.0 to 5.5 and use windows msi install. Everything works perfectly.

Thanks for the response. Much appriciated!

Ting
 
Greenhorn
Posts: 3
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim-Ting Chang wrote:Original error output from netBean output window:

[code]Using CATALINA_BASE: C:\Program Files\Apache Software Foundation\apache-tomcat-6.0.18
Using CATALINA_HOME: C:\Program Files\Apache Software Foundation\apache-tomcat-6.0.18
Using CATALINA_TMPDIR: C:\Program Files\Apache Software Foundation\apache-tomcat-6.0.18\temp
WARNING: Unexpected exception resolving reference
java.io.FileNotFoundException: C:\Program Files\Apache Software Foundation\apache-tomcat-6.0.18\conf\tomcat-users.xml.new (Access is denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
...
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)



The user running Tomcat has no create nor write permissions to the conf, log and mayby work or temp directories.
 
Ranch Hand
Posts: 1051
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please download zip files it is more effective..I think so
 
Greenhorn
Posts: 4
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know this post has been here a while, but hope my answer is at least somewhat helpful to anyone else running into this issue

I do not have a solution for the netBeans issue. I will be doing my development using Eclipse. But I may do a test with netBeans to see if I can come up with anything.

But for executing startup in command prompt (Windows 7 Professional here), I appear to have gotten rid of the error message and stack trace. I did this by doing "Run As..." and chosing my administrator account in Windows. So it seems when I first ran the command in DOS, I was running as a regular user, and had to tell Windows to run with higher privileges.

I'll keep this thread posted if I happen to run into anything that might help on netBeans. (unless someone else has found the solution already? )
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

In Netbean (I am using version 7.3):

In Windows 7 64-bit:

try exit the IDE and then restart it as Administrator

(right click the netbeans icon and select "run as admin")

solved the problem for me: no need for obscure changes in tomcat's files, paths, etc.

hope it helps
 
See ya later boys, I think I'm in love. Oh wait, she's just a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!