You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2007/09/10 15:08:31 UTC

DO NOT REPLY [Bug 43339] New: - Special characters like german umlauts in server.xml comments cause server to stop working

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43339>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43339

           Summary: Special characters like german umlauts in server.xml
                    comments cause server to stop working
           Product: Tomcat 4
           Version: 4.1.31
          Platform: PC
        OS/Version: Windows Server 2003
            Status: NEW
          Severity: minor
          Priority: P3
         Component: Unknown
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: jan.schejbal@peiker.de


A comment placed in the section
<Service name="Tomcat-Standalone">
of the server.xml config file contained a german Umlaut (like in "Diese
�nderungen k�nnen"). This caused the server to refuse to start up - the service
was stopped as soon as it was started, reporting "The Java Virtual Machine has
exited with a code of 1, the service is being stopped." to the Windows event
log. The comment was inserted just before
<Connector className="org.apache.catalina.connector.http.HttpConnector"

Workaround: Dont use umlauts.

Fix: Inside comments, everything should be ignored except --> (dash dash greater
than)

This bug is very annoying, as the user gets no information about what causes the
 error, not even something like "error in config".

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 43339] - Special characters like german umlauts in server.xml comments cause server to stop working

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43339>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43339





------- Additional Comments From jan.schejbal@peiker.de  2007-09-10 07:51 -------
OK, I thought that inside comments ANYTHING (including binary garbage) is to be
ignored until the comment end tag. This seems not to be the case, so it is ok
that the config was not accepted (although it would probably be more
user-friendly to just skip wrong comment content even if it is not required).

But there is still the problem that no senseful error message is given to the
user (at least I did not find any). I am leaving this bug at "resolved invalid"
because I am not sure if this is considered a bug and if it is, probably a new
bug report should be opened. 

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 43339] - Special characters like german umlauts in server.xml comments cause server to stop working

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43339>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43339





------- Additional Comments From bugzilla@schoenhaber.de  2007-09-10 08:25 -------
> OK, I thought that inside comments ANYTHING (including binary garbage) is to
> be
> ignored until the comment end tag. This seems not to be the case, so it is ok
> that the config was not accepted (although it would probably be more
> user-friendly to just skip wrong comment content even if it is not required).

You still didn't get the point: it's a *requirement* for a XML-parser to abort
processing when an error (including what you call "binary garbage") is
encountered. Whether or not the error is inside a comment or not is completely
irrelevant. The fact that you added non-UTF-8 characters without declaring the
encoding used, broke server.xml. In fact, it isn't even an XML file anymore,
after that change.
Again: this is a matter of how XML and XML-parsers work, not a matter of a
choice made by Tomcat. If you want to find out more, read the XML specs.

> But there is still the problem that no senseful error message is given to the
> user (at least I did not find any). I am leaving this bug at "resolved
> invalid" because I am not sure if this is considered a bug and if it is,
> probably a new bug report should be opened.

I do get a senseful error message right on the console if I start Tomcat by
catalina.bat run
Chances are, you'll also find a message if you look into Tomcat's logs.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 43339] - Special characters like german umlauts in server.xml comments cause server to stop working

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43339>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43339


bugzilla@schoenhaber.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




------- Additional Comments From bugzilla@schoenhaber.de  2007-09-10 07:13 -------
server.xml is an XML file. If you break it by adding characters to it not
encoded in the default UTF-8 encoding without declaring the encoding used, every
standards-compliant XML-parser will refuse to process it. So does Tomcat's XML
parser.
If there's any error on Tomcat's side, it's the missing XML-declaration at the
start of server.xml. But that isn't of relevance here (and I didn't bother to
check whether this has changed with the current version of the 4.1.x branch).

So, the "fix" is to have an UTF-8-encoded server.xml or to declare the encoding
used if it's different from UTF-8 (the default for an XML file without an
explicit declaration of the encoding).

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org