source: gs3-extensions/webswing/trunk/web/etc/ 36631

Last change on this file since 36631 was 36631, checked in by anupama, 3 months ago

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 size: 358 bytes
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/" -Dwebswing.tempDirBase="@gsdl3srchome@/web/ext/webswing/tmp" -Dwebswing.rootDir="@gsdl3srchome@/web/ext/webswing"
Note: See TracBrowser for help on using the repository browser.