You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Ren� Salle <re...@wanadoo.fr> on 2000/07/10 23:45:52 UTC

Problems in win32 environment

I'm running the last tomcat's binary nightly build available, i.e. the one
posted on 7/5/00 (by the way, why are there only 0 bytes posts since then?),
on both win98 and winnt 4.0 (sp6) for test purposes.

I'm using sun's JDK 1.3 in both cases.

I've noticed what could be seen as two problems:

1/ All the .bat batches coming with tomcat are using Unix oses convention
for end of line, i.e. only one byte (0x0a). That's bad, for bat files rely
on end of lines to parse instructions, and 0x0a isn't recognized for such.

Many MS system's users seem to complain about this. It's sometime possible
to remedy to that by editing these files and writing them back on disk, but
this depend on the text editor you're using, many on this platform don't
correct this problem.

2/ Similarly, the same is happening to log files. Though globally improved,
on MS platform they are readable only after 'UNIX->DOS EOL char' conversion.

That's true of these three, with this configuration:

    <Logger name="tc_log"
            path="logs/tomcat.log"
            customOutput="yes"
            verbosityLevel = "DEBUG"
            timestamp="yes" />

    <Logger name="servlet_log"
            path="logs/servlet.log"
            customOutput="yes"
            verbosityLevel = "DEBUG"
            timestamp="yes" />

    <Logger name="JASPER_LOG"
            path="logs/jasper.log"
            customOutput="yes"
            verbosityLevel = "DEBUG"
            timestamp="yes" />

Though for tc_log, end of lines are correct when exceptions are reported.

I was thinking that Java took care of that kind of cross-platform problems
(using println instead of print "...\n" etc.).

The 3.1 release of tomcat wasn't behaving like that, if I remember well. So
I was wondering if something went bad since then.


RE: Problems in win32 environment

Posted by Ren� Salle <re...@wanadoo.fr>.
> I'm running the last tomcat's binary nightly build available,
> i.e. the one posted on 7/5/00 (by the way, why are there only 0
> bytes posts since then?),

What I mean is: the last binary build there:
http://jakarta.apache.org/builds/tomcat/nightly/
that was not 0 byte long (tomcat-20000705.zip).

> Again, I'm not sure why this is failing for you; please confirm that
> TomcatLogger.java has the code
>     static char[] newline;
>     static {
> 	String separator = System.getProperty("line.separator", "\n");
> 	newline = separator.toCharArray();

You're right, nothing like that in my file
\TOMCAT_HOME\src\org\apache\tomcat\logging\TomcatLogger.java

I'll install the last _source_ build and let you know.

> Now I know something's fishy -- this is the old server.xml
> configuration;

I was mentioning it to give opportunity to track down these problems to my
personal settings.


RE: Problems in win32 environment

Posted by Ren� Salle <re...@wanadoo.fr>.
I've downloaded the _very last_ (at the time of this writting) sources
releases of tomcat, ;-)

namely:

jakarta-ant-20000710.src.zip
jakarta-tools-20000710.src.zip
jakarta-servletapi-20000710.src.zip
jakarta-tomcat-20000710.src.zip

from

http://jakarta.apache.org/builds/tomcat/nightly/src/

Build all that, and Tomcat is running fine. Nice and clean log files, MS-DOS
style end of lines. :-)

Still, out of zip, all .bat's files are unix style and can't run on Win98
(but, to my surprise, run fine on WinNT).

AFAIK all text files, README and .xml configuration files might be illegible
on all win32 platform depending on the text editor used.


Re: Problems in win32 environment

Posted by Alex Chaffee <gu...@edamame.stinky.com>.
> 1/ All the .bat batches coming with tomcat are using Unix oses convention
> for end of line, i.e. only one byte (0x0a). That's bad, for bat files rely
> on end of lines to parse instructions, and 0x0a isn't recognized for such.

I agree that this should be fixed.  However, I'm not sure why it's not
working -- the build.xml file has the line

  <fixcrlf srcdir="${tomcat.build}" includes="*.bat" cr="add"/>

Maybe it's an Ant bug?

> 2/ Similarly, the same is happening to log files. Though globally improved,
> on MS platform they are readable only after 'UNIX->DOS EOL char' conversion.

Again, I'm not sure why this is failing for you; please confirm that
TomcatLogger.java has the code

    static char[] newline;
    static {
	String separator = System.getProperty("line.separator", "\n");
	newline = separator.toCharArray();
    }
    ...
			    writer.write(logEntry.toString());
			    writer.write(newline);


I've been developing on Windows 98 for a few weeks (on the road) and my
log files are perfectly legible :-)

Another problem on Windows 95/98 is that the line in tomcat.bat that
adds lib/*.jar to the classpath just plain doesn't work.  I'm not a
good wnough DOS BAT hacker to fix this (though I just spent 1/2 hour
trying :-(

> 
> That's true of these three, with this configuration:
> 
>     <Logger name="tc_log"
>             path="logs/tomcat.log"
>             customOutput="yes"
>             verbosityLevel = "DEBUG"
>             timestamp="yes" />


Now I know something's fishy -- this is the old server.xml
configuration; the new server.xml doesn't have customOutput or
timestamp attributes. (The default is now yes for both.)  So, please
make sure you really are using the current build; if you're absolutely
sure, then let me know and we can try to debug it.

Hmm, I think I'll add a log entry with the version info at startup, to
help with the "absolutely sure" factor...


-- 
Alex Chaffee                       mailto:alex@jguru.com
jGuru - Java News and FAQs         http://www.jguru.com/alex/
Creator of Gamelan                 http://www.gamelan.com/
Founder of Purple Technology       http://www.purpletech.com/
Curator of Stinky Art Collective   http://www.stinky.com/