Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat stopped working again!

 
taash mg
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI

My Tomcat has suddenly stopped working and none of my pages are diaplayed not even Tomcat home
Actually i was editing my web.xml file and then my comp hanged but before it hanged i stopped midway and closed that file and stopped the server but after i restarted this has been the case...
when i start the server and the second window opens after saying starting Apache 4.1 it gives a few lines of exceptions. I can't see all of it, but partly, and that is

Any idea what is happening. i also finished the web.xml completely and then retrted agin but it just would display error message also for the Tomcat home page Error 500
Thanks
Taash
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[ERROR] Digester - -Parse Fatal Error at line 2 column 7: The XML declaration may only appear at the very beginning of the document. <org.xml.sax.SAXParseException: The XML declaration may only appear at the very beginning of the document.>

That would seem to indicate one of your xml files has been corrupted. Have you checked server.xml and web.xml ?

Also, make sure you don't have an old xalan.jar (or other xml parser jar file) in your CLASSPATH.
 
taash mg
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mike,
I checked all my XML files but they seem proper when i opened them in Dreamweaver. I Do not have any Xml parser files in my CLASSPATH nor xalan.jar. I also tried taking out all the code that i had put i tn the web.xml and keeping it empty as before, but that wouldn't work too

Thanks
Taash
 
Adam Hardy
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow Taash, you don't have much luck, do you?
Did you find any xml errors in your web.xml? Does it still have the DTD declaration? Have you got a backup of it? Perhaps you can do another install into another directory and take the fresh web.xml.

Adam
 
taash mg
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Adam,
Thanks a lot for guiding me. I actually was so frustrated for having to load Tomcat a 100 times earlier that this time i didn't think of reloading and checking my web.xml.
But it worked and i got rid of the FATAL Error

Thanks
Taash
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic