I have one .conf file that contains the following:
wrapper.app.parameter.2="C:\\Permuts\\Permutations12.txt"
wrapper.app.parameter.3="1234567890!@"
wrapper.app.parameter.4="479001600"
This service starts and runs successfully.
I have another .conf file that has ONE difference (the
# on parm 3).
wrapper.app.parameter.2="C:\\Permuts\\Permutations12.txt"
wrapper.app.parameter.3="1234567890!@#"
wrapper.app.parameter.4="479001600"
This service does NOT start, it returns:
WrapperSimpleApp: Encountered an error running main:
java.lang.ArrayIndexOutOfBoundsException: 2
java.lang.ArrayIndexOutOfBoundsException: 2
at
com.nacey.jason.Projects.Permutations.Start.main(Start.java:11)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:136)
at java.lang.Thread.run(Unknown Source)
Logged In: YES
user_id=228081
The error that you are getting is a problem with your
program. It should probably be a little more careful with
input parameters.
That said though, you are running into this issue because
the Wrapper configuration file treats the '#' character as a
comment character. Everything after and including that
character is ignored. Looking at this, the Wrapper should
really be ignoring '#' characters that are included in
double quotes. I have modified version 3.2.0 so it will
now do so.
If you want to include a '#' character that is not included
in quotes then you need to double it up; ##. This will
work in 3.2.0 and newer versions outside of double quotes,
or in your version within the quotes.
For now, change your configuration file to this:
wrapper.app.parameter.3=1234567890!@##
or
wrapper.app.parameter.3="1234567890!@##"
Note that the later will not work the same in version 3.2.0
as the first # will no longer be treated as an escape character.
Thanks for pointing this out.
Cheers,
Leif