YAJSW - Startup script to clear .lck files

371 views Asked by At

We use YAJSW (11.08) to wrap our java application as a service, but when switching to java 8, I noticed that if the application did not terminate gracefully, the .lck files generated by the logger, is not cleared.

We are in the process of switching to a new logger, but in the mean time I need a start up script to clear these .lck files.

I read here that YAJSW supports shell and groovy scritps, but the answer to this SO question answer claims it only supports groovy scripts.

As far as I can tell I need to indicate the STATE at which the script will be executed, so for me I assume that it's the START state.

I have added this to my wrapper.conf:

wrapper.script.START=scripts/clean-up.bat

What am I missing or doing wrong? Is running scripts not available in the version I'm using? Or are shell scripts really not supported?

EDIT: Updated YAJSW to version 11.11 (latest) - still does not work

1

There are 1 answers

0
TomG On

run the process from the console and see what error messages you get. I am running 11.11 with java 8 and I noticed that even though documentation specifies you want to say this: wrapper.script.START=scripts/clean-up.bat YAJSW already looks in the scripts directory by default, and you just have to make sure your script is in that directory. You can see the file not found error when running in the console. My problem now is that I am getting a 'returned 1' error. I am beginning to doubt that YAJSW will run .bat files as I have made mine very simple just to test and it still fails.