Horacio de Oro writes:
> Tomcat started with jsvc:
> 
> fileName = "/tmp/test/something" => DOESN'T WORKS
> fileName = "/tmp/onedir" => THIS WORKS!!!
> 
> So, the problem is: Tomcat started with jsvc on Debian Woody:
>   - File.mkdirs() WORKS if it should make ONE directory.
>   - File.mkdirs() DOESN'T WORKS if it should make MORE THAN ONE directory.
> 
If you ask me, this is a java problem not a tomcat problem.

I did another test: I extended the daemon sample 'SimpleDaemon' to
create directories /tmp/bla/fasel and /tmp/blub using mkdirs
(just after the line 
        System.err.println("SimpleDaemon: started acceptor loop");
I added
        new File("/tmp/bla/fasel").mkdirs();
        new File("/tmp/blub").mkdirs();
)
/tmp/bla/fasel is not created /tmp/blub is.

So tomcat doesn't seem to be involved in the failure.
IMO the bug is either in java itself or in daemon.
And it must be some weird interaction with system libraries (pthread, libc)
since it occurs only on some systems.

After some further search I decided to look at javas and jsvc libraries
and the only difference is, java uses libpthread, jsvc doesn't.

If one changes that (that is adds -lpthread to the linking of jsvc in
daemon-1.0/src/native/unix/native/Makefile (that's autogenerated, but
I didn't want to search through the autoconf/automake stuff for the correct
place)
jsvc: jsvc-unix.o libservice.a
        $(LDCMD) $(LDFLAGS) jsvc-unix.o libservice.a -lpthread -o ../jsvc
instead of
jsvc: jsvc-unix.o libservice.a
        $(LDCMD) $(LDFLAGS) jsvc-unix.o libservice.a -o ../jsvc

the problem disapears. :-)

So the origin of the problem is somewhere in the details of debian woodys 
libc/libpthread.

I filed a bug report for commons daemon.
http://issues.apache.org/bugzilla/show_bug.cgi?id=30177

Morus

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to