Tomcat 4.1 Debug Error What am I doing wrong?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   james_shallard
Posted On:   Monday, July 14, 2003 05:42 AM

Oh man – this one has been driving me crazy… I have been happily developing (and debugging) a Java based web app in Tomcat 3.1 for some time. Recently I have upgraded to the latest version of Tomcat (Version 4.1.24), and everything is working fine, except when it comes to debugging. I am debugging using the Visual Café IDE. I have written a debug class with a “main” function that I use to start tomcat within the debug environment. For Tomcat 3.1, I using the following: import org.apache.tomcat.startup.Tomcat; […] Tomcat.main(new String[] {}); […] When I start the debugger, this kicks off Tomcat, and everything wor   More>>

Oh man – this one has been driving me crazy…


I have been happily developing (and debugging) a Java based web app in Tomcat
3.1 for some time. Recently I have upgraded to the latest version of Tomcat
(Version 4.1.24), and everything is working fine, except when it comes to debugging.


I am debugging using the Visual Café IDE. I have written a debug class
with a “main” function that I use to start tomcat within the debug
environment. For Tomcat 3.1, I using the following:




import org.apache.tomcat.startup.Tomcat;

[…]

Tomcat.main(new String[] {});

[…]


When I start the debugger, this kicks off Tomcat, and everything works great.
However with Tomcat 4.1, things seem to have changed a little. After hunting
round a I found the following way to start Tomcat:


import org.apache.catalina.startup.Catalina;

[…]

org.apache.catalina.startup.Catalina.main(new String[] { "-config"
,"C:\tomcat\conf\server.xml","-debug" , "start"
});

[…]




This seems to start Tomcat fine, but as it initializes it throws the following
errors:



loading TomcatDebug.class for debugging...

TomcatDebug.class successfully loaded

Waiting for servlet server to finish initializing...

Loading browser for running servlet....

Browser for running servlet successfully loaded.

[INFO] Registry - -Loading registry information

[INFO] Registry - -Creating new Registry instance

[INFO] Registry - -Creating MBeanServer

[INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 8080

Starting service Tomcat-Standalone

Apache Tomcat/4.1.24

org.xml.sax.SAXParseException: The markup declarations contained or pointed
to by the document type declaration must be well-formed.

at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1213)

at org.apache.xerces.framework.XMLDTDScanner.reportFatalXMLError(XMLDTDScanner.java:651)



[...]



at org.apache.catalina.startup.Catalina.main(Catalina.java:165)

at TomcatDebug.main(TomcatDebug.java:12)

[ERROR] Digester - -Parse Fatal Error at line 1 column 3: The markup declarations
contained or pointed to by the document type declaration must be well-formed.


markup declarations contained or pointed to by the document type declaration
must be well-formed.>

org.xml.sax.SAXParseException: The markup declarations contained or pointed
to by the document type declaration must be well-formed.

at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1213)

at org.apache.xerces.framework.XMLDTDScanner.reportFatalXMLError(XMLDTDScanner.java:651)



[...]



[ERROR] Digester - -Parse Fatal Error at line 1 column 3: The markup declarations
contained or pointed to by the document type declaration must be well-formed.


markup declarations contained or pointed to by the document type declaration
must be well-formed.>



[...]



[ERROR] Digester - -Parse Fatal Error at line 1 column 3: The markup declarations
contained or pointed to by the document type declaration must be well-formed.


markup declarations contained or pointed to by the document type declaration
must be well-formed.>



[INFO] Http11Protocol - -Starting Coyote HTTP/1.1 on port 8080

[INFO] ChannelSocket - -JK2: ajp13 listening on 0.0.0.0/0.0.0.0:8009

[INFO] JkMain - -Jk running ID=0 time=15/109 config=c: omcatconfjk2.properties




This seems to imply a DTD error in my web.xml file, which was confirmed by looking
at the log file which showed the following:


[…]

2003-07-14 10:01:18 WebappLoader[/bizviz]: Deploy JAR /WEB-INF/lib/xalan.jar
to C: omcatwebapps izvizWEB-INFlibxalan.jar

2003-07-14 10:01:18 WebappLoader[/bizviz]: Deploy JAR /WEB-INF/lib/xerces.jar
to C: omcatwebapps izvizWEB-INFlibxerces.jar

2003-07-14 10:01:19 ContextConfig[/bizviz] Parse error in default web.xml

org.xml.sax.SAXException: Stopping after fatal error: The markup declarations
contained or pointed to by the document type declaration must be well-formed.

[…]


I tried reducing my web.xml down to the following (see below), but the same
error was still thrown:





PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

"http://java.sun.com/dtd/web-app_2_3.dtd">





I have also completely removed the web.xml file and still get the same error
– so I am starting to think that it is not actually the web.xml file that
is the problem. The same error also shows up when the “management”
web app (that ships with tomcat) initializes.


If anyone knows how to fix this bug I would be immensely grateful – I
have already spent more hours on it than I care to think about.


Thanks for any help / ideas.


James

   <<Less
About | Sitemap | Contact