Hi André,

Now I understand the issue regarding the -jdpa option. I had not even considerred that one - if set, then CATALINA_OPTS would require 2 levels of escape, and, if not set, just one!

I have only been looking at the "start" block as called by startup.sh without using -security

exec (whatever) (whatever_java_opts) -Dcom.sun.jndi.ldap.connect.pool.protocol=plain ssl (whatever_follows)

which is pretty much what you are seeing, right ?

No, if I place echo at the start of the line that starts tomcat ("start" block, no -security) what I see is:

/usr/java/default/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/opt/bh-adws/conf/logging.properties -Xms128m -Xmx256m -Dcom.sun.jndi.ldap.connect.pool.protocol=\"plain ssl\" -Dcom.sun.jndi.ldap.connect.pool.timeout=10000 -Djava.endorsed.dirs=/opt/bh-adws/endorsed -classpath :/opt/bh-adws/bin/bootstrap.jar -Dcatalina.base=/opt/bh-adws -Dcatalina.home=/opt/bh-adws -Djava.io.tmpdir=/opt/bh-adws/temp org.apache.catalina.startup.Bootstrap start

using you suggestion below, and

/usr/java/default/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/opt/bh-adws/conf/logging.properties -Xms128m -Xmx256m -Dcom.sun.jndi.ldap.connect.pool.protocol="plain ssl" -Dcom.sun.jndi.ldap.connect.pool.timeout=10000 -Djava.endorsed.dirs=/opt/bh-adws/endorsed -classpath :/opt/bh-adws/bin/bootstrap.jar -Dcatalina.base=/opt/bh-adws -Dcatalina.home=/opt/bh-adws -Djava.io.tmpdir=/opt/bh-adws/temp org.apache.catalina.startup.Bootstrap start

if I use

CATALINA_OPTS='-Xms128m -Xmx256m -Dcom.sun.jndi.ldap.connect.pool.protocol="plain ssl" -Dcom.sun.jndi.ldap.connect.pool.timeout=10000'

as you can see, the quoting looks correct, yet the shell passes through 2 separate arguments for the property first as -Dcom.sun.jndi.ldap.connect.pool.protocol="plain and the seccond as ssl"

I think I am going to have to go with Rainer's suggestion of appending to conf/catalina.properties - not very nice, but should work.

Thanks for all your help,
Bap.


As far as system properties go - why does Sun insist on using them for configuration, with no alternatives for configuration within a given scope, not jvm wide?


Quoting André Warnier <a...@ice-sa.com>:

Sorry, I mistook "CATALINA_OPTS" for "JAVA_OPTS",
but

Bap wrote:
Hi André,

The solution you have suggested just introduces a new variable, but with exactly the same characteristics of the existing CATALINA_OPTS variable (unless I am missing something.)

Say that, originally in setenv.sh, you set CATALINA_OPTS as follows (in one single line) :

CATALINA_OPTS='-Dcom.sun.jndi.ldap.connect.pool.protocol="plain ssl"'

Then, in catalina.sh, a line such as the following :

CATALINA_OPTS="$CATALINA_OPTS $JPDA_OPTS"

would make CATALINA_OPTS now be :

-Dcom.sun.jndi.ldap.connect.pool.protocol="plain ssl"

then, at the next invocation, say here :

exec "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS ........

this would be seen as

exec (whatever) (whatever_java_opts) -Dcom.sun.jndi.ldap.connect.pool.protocol=plain ssl (whatever_follows)

which is pretty much what you are seeing, right ?

Now, what I am trying to tell you is :

the CATALINA_OPTS variable is used several times in the catalina.sh script, in a way that may make it difficult to determine how many times it is being so "interpolated" into itself before being finally used.
Each level of such interpolation, will remove one level of quoting.

By defining your own variable, and using it just once in catalina.sh, at least you know how many times it is being interpolated (just once), and you can quote it correctly.



Now, all this being said, why don't you try this in setenv.sh :

CATALINA_OPTS='-Dcom.sun.jndi.ldap.connect.pool.protocol=\"plain ssl\"'

And all of that being said, whoever decided that the property "com.sun.jndi.ldap.connect.pool.protocol" could be set to a value with embedded spaces ought to be exiled to a remote arctic island.
Together with whomever invented file paths with embedded spaces.
Together with whomever decided to install Tomcat by default in c:\program files\apache software foundation\.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to