I am using the latest release 11.06 to wrap a java application. It runs okay from the console, i.e., runcosole.bat. But when I try to start the service, i.e, starService.bat, the application failed to start due to the following exception:
Exception java.lang.IllegalArgumentException: Signal already used by VM: SIGTERM
If I run the following copied from the service property from the command line, nothing happens:
"D:\test\bin\work\test.exe" "-classpath" "D:\test\yajsw-stable-11.06\wrapper.jar" "-Xrs" "-Dwrapper.service=true" "-Dwrapper.working.dir=D:\ClassOne\MidTier_3_4_0_EM\bin" "-Dwrapper.config=D:\test\yajsw-stable-11.06\conf\wrapper.conf" "-Dwrapper.additional.1x=-Xrs" "-Djna_tmpdir=D:\TEMP" "org.rzo.yajsw.boot.WrapperServiceBooter"
The application has a few shutdown hooker:
// Process SIGTERM
// Process SIGINT
OS: Windows XP SP3
Could the problem be related to the -Xrs? Any ideas?
-Xrs and Signal handling do not work together. See java documentation for -Xrs.
Is there a reason why you are using signal handler instead of shutdown hook ?
The signal handling class is sun propriatary where as shutdown hooks are general.
yajsw adds -Xrs, to avoid the application from shuting down when a user logs-off.
Thank you. The same piece of code works fine with JSW. Any work around?
the only way to solve this is to remove -Xrs from the command file:
in WrappedJavaProcess.jvmOptions comment out
to build the jar files:
go to <yajsw>/build/gradle and execute gradlew.bat
For the next release i will add a configuration property so users can control if -Xrs is added automatically to the command line.
Thank you. I will try it out.
I recompiled the class, and now it works, thank you! Another observation is that YAJSW and our application are displaying same java command name in the task manager list if I specify the following:
wrapper.java.command = D:\\0_ClassOne\\MidTier_3_4_test\\bin\\work\\Wrap01.exe
In JSW, since it uses wrapper.exe instead of jar, I can rename it to any name I want. Can I do the same in YAJSW?
to use rename the jvm exe see the property:
note that java must be cleanly installed on the machine, eg not just copied. otherwise, the jvm will have issues finding the corresponding dll.
It works like a charm! Thank you! Initially I just gave a name to wrapper.java.customProcName property, e.g.:
and it did not work, and later I changed to the following:
then it worked.
for the next release a new property has been added:
setting it to false will inhibit setting -Xrs.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.