Re: Bug in tomcat scripts?

2008-08-13 Thread Enrique Arizón




- Mensaje original 
De: Christopher Schultz [EMAIL PROTECTED]
Para: Tomcat Users List users@tomcat.apache.org
Enviado: martes, 12 de agosto, 2008 19:30:51
Asunto: Re: Bug in tomcat scripts?

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Enrique,

Enrique Arizón wrote:
| # rm -rf $(cwd)/..  /etc/init.d/tomcat5 restart

Does this seem like a good idea to you?

Hmm... I added 'rm -rf' to my script and now I can't find any files!

The use case was more complex actually. My tomcat app keeps some data in the 
.../webapp/MyApp directory. During unit tests I remove MyApp, redeploy it after 
compiling and restart tomcat. (Not such an unusual scenario). The case is that 
the remove  redeploy  restart is executed in a shell script, and if 
suddenly I execute it while in webapp/MyApp tomcat is destroyed.

 I can't imagine that this has anything to do with the scripts that ship with 
any version of Tomcat.

Maybe you could post the entire script and we can figure out why you might want 
to delete an entire directory tree just for the heck of it.

- -chris

After browsing the scripts it looks to be related with the makeHomeDir() 
function in the Mandriva /etc/init.d/tomcat5 script. (I attach the file in case 
you are interested).

Regards,

Enrique

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkihyMsACgkQ9CaO5/Lv0PCjfACggbCbf7ERUoJX0aYw59bhY7Qx
TRMAn2pLYxOQQMOnKRwHPZlKdhir6XeS
=wjpc
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Bug in tomcat scripts?

2008-08-12 Thread Enrique Arizón
I suddenly removed my cwd just prior to start tomcat. Briefly, the script would 
be similar to:

# rm -rf $(cwd)/..  /etc/init.d/tomcat5 restart

after which I got lot of errors and tomcat broke (broke == I reinstalled the 
rpm package to make it work again). The worst thing is that after the first run 
of the suicide command when executing:

 # /etc/init.d/tomcat5 start

doesn't work but doesn't display any errors and returns OK.


The error list is similar to:
shell-init: error retrieving current directory: getcwd: cannot access parent 
directories: No existe el fichero o el directorio
Deteniendo tomcat5: [  OK  ]
Iniciando tomcat5: shell-init: error retrieving current directory: getcwd: 
cannot access parent directories: File or directory doesn't exists.
shell-init: error retrieving current directory: getcwd: cannot access parent 
directories: File or directory doesn't exists.
pushd: error retrieving current directory: getcwd: cannot access parent 
directories: File or directory doesn't exists.
/bin/ln: creating symbolic link «[commons-collections-tomcat5].jar»: File or 
directory doesn't exists.
/bin/ln: creating symbolic link «[commons-dbcp-tomcat5].jar»: File or directory 
doesn't exists.
/bin/ln: creating symbolic link «[commons-el].jar»: File or directory doesn't 
exists.
/bin/ln: creating symbolic link «[commons-pool-tomcat5].jar»: File or directory 
doesn't exists.
/bin/ln: creating symbolic link «[ecj].jar»: File or directory doesn't exists.
/bin/ln: creating symbolic link «[jaf].jar»: File or directory doesn't exists.
/bin/ln: creating symbolic link «[jasper5-compiler].jar»: File or directory 
doesn't exists.
/bin/ln: creating symbolic link «[jasper5-runtime].jar»: File or directory 
doesn't exists.
/bin/ln: creating symbolic link «[javamail].jar»: File or directory doesn't 
exists.
/bin/ln: creating symbolic link «[jsp].jar»: File or directory doesn't exists.
/bin/ln: creating symbolic link «[servlet].jar»: File or directory doesn't 
exists.
/bin/ln: creating symbolic link «[tomcat5][naming-factory].jar»: File or 
directory doesn't exists.
/bin/ln: creating symbolic link «[tomcat5][naming-resources].jar»: File or 
directory doesn't exists.
/usr/share/java-utils/java-functions: line 247: popd: directory stack empty
shell-init: error retrieving current directory: getcwd: cannot access parent 
directories: File or directory doesn't exists.
pushd: error retrieving current directory: getcwd: cannot access parent 
directories: File or directory doesn't exists.
/bin/ln: creating symbolic link «[jaxp_parser_impl].jar»: File or directory 
doesn't exists.
/bin/ln: creating symbolic link «[xml-commons-jaxp-1.3-apis].jar»: File or 
directory doesn't exists.
/usr/share/java-utils/java-functions: line 247: popd: directory stack empty
shell-init: error retrieving current directory: getcwd: cannot access parent 
directories: File or directory doesn't exists.
pushd: error retrieving current directory: getcwd: cannot access parent 
directories: File or directory doesn't exists.
/bin/ln: creating symbolic link «[catalina-ant5].jar»: File or directory 
doesn't exists
...
/usr/share/java-utils/java-functions: line 247: popd: directory stack empty


 I was using tomcat5 from standard Mandriva 2008 but probably the error will 
apply to other Linux distros/OSes where tomcat use a shell to start up.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Bug in tomcat scripts?

2008-08-12 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Enrique,

Enrique Arizón wrote:
| # rm -rf $(cwd)/..  /etc/init.d/tomcat5 restart

Does this seem like a good idea to you?

Hmm... I added 'rm -rf' to my script and now I can't find any files!.

I can't imagine that this has anything to do with the scripts that ship
with any version of Tomcat.

Maybe you could post the entire script and we can figure out why you
might want to delete an entire directory tree just for the heck of it.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkihyMsACgkQ9CaO5/Lv0PCjfACggbCbf7ERUoJX0aYw59bhY7Qx
TRMAn2pLYxOQQMOnKRwHPZlKdhir6XeS
=wjpc
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Bug in tomcat scripts?

2008-08-12 Thread Tim Funk

The tomcat distribution doesn't contain any code which goes into /etc/init.d

The feature as described below needs to be addressed in the 
distribution. (Or the rpm creator)


-Tim

Enrique Arizón wrote:

I suddenly removed my cwd just prior to start tomcat. Briefly, the script would 
be similar to:

# rm -rf $(cwd)/..  /etc/init.d/tomcat5 restart

after which I got lot of errors and tomcat broke (broke == I reinstalled the rpm 
package to make it work again). The worst thing is that after the first run of the suicide 
command when executing:

 # /etc/init.d/tomcat5 start

doesn't work but doesn't display any errors and returns OK.


The error list is similar to:
shell-init: error retrieving current directory: getcwd: cannot access parent 
directories: No existe el fichero o el directorio
Deteniendo tomcat5: [  OK  ]
Iniciando tomcat5: shell-init: error retrieving current directory: getcwd: 
cannot access parent directories: File or directory doesn't exists.
shell-init: error retrieving current directory: getcwd: cannot access parent 
directories: File or directory doesn't exists.
pushd: error retrieving current directory: getcwd: cannot access parent 
directories: File or directory doesn't exists.
/bin/ln: creating symbolic link «[commons-collections-tomcat5].jar»: File or 
directory doesn't exists.
/bin/ln: creating symbolic link «[commons-dbcp-tomcat5].jar»: File or directory 
doesn't exists.
/bin/ln: creating symbolic link «[commons-el].jar»: File or directory doesn't 
exists.
/bin/ln: creating symbolic link «[commons-pool-tomcat5].jar»: File or directory 
doesn't exists.
/bin/ln: creating symbolic link «[ecj].jar»: File or directory doesn't exists.
/bin/ln: creating symbolic link «[jaf].jar»: File or directory doesn't exists.
/bin/ln: creating symbolic link «[jasper5-compiler].jar»: File or directory 
doesn't exists.
/bin/ln: creating symbolic link «[jasper5-runtime].jar»: File or directory 
doesn't exists.
/bin/ln: creating symbolic link «[javamail].jar»: File or directory doesn't 
exists.
/bin/ln: creating symbolic link «[jsp].jar»: File or directory doesn't exists.
/bin/ln: creating symbolic link «[servlet].jar»: File or directory doesn't 
exists.
/bin/ln: creating symbolic link «[tomcat5][naming-factory].jar»: File or 
directory doesn't exists.
/bin/ln: creating symbolic link «[tomcat5][naming-resources].jar»: File or 
directory doesn't exists.
/usr/share/java-utils/java-functions: line 247: popd: directory stack empty
shell-init: error retrieving current directory: getcwd: cannot access parent 
directories: File or directory doesn't exists.
pushd: error retrieving current directory: getcwd: cannot access parent 
directories: File or directory doesn't exists.
/bin/ln: creating symbolic link «[jaxp_parser_impl].jar»: File or directory 
doesn't exists.
/bin/ln: creating symbolic link «[xml-commons-jaxp-1.3-apis].jar»: File or 
directory doesn't exists.
/usr/share/java-utils/java-functions: line 247: popd: directory stack empty
shell-init: error retrieving current directory: getcwd: cannot access parent 
directories: File or directory doesn't exists.
pushd: error retrieving current directory: getcwd: cannot access parent 
directories: File or directory doesn't exists.
/bin/ln: creating symbolic link «[catalina-ant5].jar»: File or directory 
doesn't exists
...
/usr/share/java-utils/java-functions: line 247: popd: directory stack empty


 I was using tomcat5 from standard Mandriva 2008 but probably the error will 
apply to other Linux distros/OSes where tomcat use a shell to start up.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [programmazione] Bug in tomcat scripts?

2008-08-12 Thread Luca Cicale

i know my question could seem strange to you,  but pls:
why did you execute  rm -rf $(cwd)/..  /etc/init.d/tomcat5 restart?
And above all: where?
:-)

Luca



--
From: Enrique Arizón [EMAIL PROTECTED]
Sent: Tuesday, August 12, 2008 7:11 PM
To: users@tomcat.apache.org
Subject: [programmazione] Bug in tomcat scripts?

I suddenly removed my cwd just prior to start tomcat. Briefly, the script 
would be similar to:


# rm -rf $(cwd)/..  /etc/init.d/tomcat5 restart

after which I got lot of errors and tomcat broke (broke == I reinstalled 
the rpm package to make it work again). The worst thing is that after the 
first run of the suicide command when executing:


# /etc/init.d/tomcat5 start

doesn't work but doesn't display any errors and returns OK.


The error list is similar to:
shell-init: error retrieving current directory: getcwd: cannot access 
parent directories: No existe el fichero o el directorio

Deteniendo tomcat5: [  OK  ]
Iniciando tomcat5: shell-init: error retrieving current directory: getcwd: 
cannot access parent directories: File or directory doesn't exists.
shell-init: error retrieving current directory: getcwd: cannot access 
parent directories: File or directory doesn't exists.
pushd: error retrieving current directory: getcwd: cannot access parent 
directories: File or directory doesn't exists.
/bin/ln: creating symbolic link «[commons-collections-tomcat5].jar»: File 
or directory doesn't exists.
/bin/ln: creating symbolic link «[commons-dbcp-tomcat5].jar»: File or 
directory doesn't exists.
/bin/ln: creating symbolic link «[commons-el].jar»: File or directory 
doesn't exists.
/bin/ln: creating symbolic link «[commons-pool-tomcat5].jar»: File or 
directory doesn't exists.
/bin/ln: creating symbolic link «[ecj].jar»: File or directory doesn't 
exists.
/bin/ln: creating symbolic link «[jaf].jar»: File or directory doesn't 
exists.
/bin/ln: creating symbolic link «[jasper5-compiler].jar»: File or 
directory doesn't exists.
/bin/ln: creating symbolic link «[jasper5-runtime].jar»: File or directory 
doesn't exists.
/bin/ln: creating symbolic link «[javamail].jar»: File or directory 
doesn't exists.
/bin/ln: creating symbolic link «[jsp].jar»: File or directory doesn't 
exists.
/bin/ln: creating symbolic link «[servlet].jar»: File or directory doesn't 
exists.
/bin/ln: creating symbolic link «[tomcat5][naming-factory].jar»: File or 
directory doesn't exists.
/bin/ln: creating symbolic link «[tomcat5][naming-resources].jar»: File or 
directory doesn't exists.
/usr/share/java-utils/java-functions: line 247: popd: directory stack 
empty
shell-init: error retrieving current directory: getcwd: cannot access 
parent directories: File or directory doesn't exists.
pushd: error retrieving current directory: getcwd: cannot access parent 
directories: File or directory doesn't exists.
/bin/ln: creating symbolic link «[jaxp_parser_impl].jar»: File or 
directory doesn't exists.
/bin/ln: creating symbolic link «[xml-commons-jaxp-1.3-apis].jar»: File or 
directory doesn't exists.
/usr/share/java-utils/java-functions: line 247: popd: directory stack 
empty
shell-init: error retrieving current directory: getcwd: cannot access 
parent directories: File or directory doesn't exists.
pushd: error retrieving current directory: getcwd: cannot access parent 
directories: File or directory doesn't exists.
/bin/ln: creating symbolic link «[catalina-ant5].jar»: File or directory 
doesn't exists

...
/usr/share/java-utils/java-functions: line 247: popd: directory stack 
empty



I was using tomcat5 from standard Mandriva 2008 but probably the error 
will apply to other Linux distros/OSes where tomcat use a shell to start 
up.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]