Changeset 36631 for gs3-extensions


Ignore:
Timestamp:
2022-09-19T18:09:32+12:00 (19 months ago)
Author:
anupama
Message:

Bugfix for why GS3's tomcat wasn't starting on Windows when ant start was run: there need to be double quotes around the catalina.opts properties (including this webswing.catalina.opts) as the slashes in locations/paths can go boths way on Windows within the same property, and the backslash multiline separator doesn't seem to work on Windows either. This was hard to debug: pause did not work anywhere in the tomcat batch files launched one called by another when force-start-tomcat finally runs the execute command. The culprit was accidentally found in tomcat's catalina.bat, when after binary chopping to get to where the flashing DOS prompt was, I tried to print out the command being run under label doneSetArgs, and it just wouldn't print. Printing individual variables of the command that was being run worked, but there were weird Echo Is Off messages for empty variables that were a red herring. It wasn't until I tried to print out the full command again, by printing out the first part of the command then including the next var in it, then the next, and so on until CATALINA_OPTS was added into the execute command in catalina.bat, that I found the issue. Adding in the CATALINA_OPTS env var being passed in didn't print the line of the command all of a sudden. So I printed out catalina.opts in build.xml in force-start-tomcat, and then tried to reason what was different and looked at trac changes and previous errors in other additions to catalina.opts that broke tomcat running on Windows: It was that each individual catalina.opts property needs to be quoted, at least when they are filepaths. If the property is set in build.xml, use the HTML entity for doublequoting. However, since it is loaded from catalina-opts-extra.args for webswing, it needs literal doublequotes in the .args file. (And again, no backslash as multiline separator.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs3-extensions/webswing/trunk/web/etc/catalina-opts-extra.args.in

    r36490 r36631  
    1 -Dwebswing.warLocation=@gsdl3srchome@/packages/tomcat/webapps/webswing-server.war \
    2 -Dwebswing.configFile=@gsdl3srchome@/web/ext/webswing/etc/webswing.config \
    3 -Dwebswing.propertiesFile=@gsdl3srchome@/web/ext/webswing/etc/webswing.properties \
    4 -Dwebswing.tempDirBase=@gsdl3srchome@/web/ext/webswing/tmp \
    5 -Dwebswing.rootDir=@gsdl3srchome@/web/ext/webswing
     1-Dwebswing.warLocation="@gsdl3srchome@/packages/tomcat/webapps/webswing-server.war" -Dwebswing.configFile="@gsdl3srchome@/web/ext/webswing/etc/webswing.config" -Dwebswing.propertiesFile="@gsdl3srchome@/web/ext/webswing/etc/webswing.properties" -Dwebswing.tempDirBase="@gsdl3srchome@/web/ext/webswing/tmp" -Dwebswing.rootDir="@gsdl3srchome@/web/ext/webswing"
Note: See TracChangeset for help on using the changeset viewer.