You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2014/08/28 00:43:50 UTC

[Bug 56895] New: catalina.bat does not properly compose JAVA_OPTS

https://issues.apache.org/bugzilla/show_bug.cgi?id=56895

            Bug ID: 56895
           Summary: catalina.bat does not properly compose JAVA_OPTS
           Product: Tomcat 7
           Version: 7.0.54
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Integration
          Assignee: dev@tomcat.apache.org
          Reporter: lucastheisen@apache.org

When composing JAVA_OPTS, the current bat script uses this approach:

set JAVA_OPTS=%JAVA_OPTS% %OTHER_STUFF%

However, this leads to issues if the existing JAVA_OPTS had some sort of escape
sequence in it.  For example, in my setenv.bat, I add some proxy info:

SET "JAVA_OPTS=-Dhttp.proxyHost=myproxy.localdomain
-Dhttp.nonProxyHosts=*.localdomain^|localhost^|appserver.localdomain"

Using the existing approach, the escape sequence ^| gets processed into |
leaving the next evaluation to treat it as a command pipe, which causes
immediate failure.

If instead you use this approach:

set "JAVA_OPTS=%JAVA_OPTS% %OTHER_STUFF%"

Then those escape sequences are preserved.  Here is the patch for version
7.0.54:

--- catalina.bat_ORIGINAL       2014-08-27 18:37:05.173641700 -0400
+++ catalina.bat        2014-08-27 18:06:22.779721000 -0400
@@ -176,12 +176,12 @@
 if not exist "%CATALINA_BASE%\conf\logging.properties" goto noJuliConfig
 set
LOGGING_CONFIG=-Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties"
 :noJuliConfig
-set JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%
+set "JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%"

 if not "%LOGGING_MANAGER%" == "" goto noJuliManager
 set
LOGGING_MANAGER=-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
 :noJuliManager
-set JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER%
+set "JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER%"

 rem ----- Execute The Requested Command
---------------------------------------

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56895] catalina.bat does not properly compose JAVA_OPTS

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56895

Chuck Caldarale <ch...@unisys.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|7.0.57                      |7.0.54

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56895] catalina.bat does not properly compose JAVA_OPTS

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56895

Marco <ma...@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|7.0.54                      |7.0.57

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56895] catalina.bat does not properly compose JAVA_OPTS

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56895

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
                 OS|                            |All

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
Fixed in 8.0.x for 8.0.12 onwards and in 7.0.x for 7.0.56 onwards.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56895] catalina.bat does not properly compose JAVA_OPTS

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56895

--- Comment #2 from Ognjen Blagojevic <og...@gmail.com> ---
(In reply to Mark Thomas from comment #1)
> Fixed in 8.0.x for 8.0.12 onwards and in 7.0.x for 7.0.56 onwards.

FTR, 8.0.12 was already released at the moment the patch is applied. 8.0.13 iz
skipped, therefore, it is 8.0.14 onwards.

-Ognjen

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org