Hello list members,
For people who runs Mac OS X to host Tomcat container and wants to automatically start up with "launchd", in order to startup geoserver successfully, it is suggested that you set EnvironmentVariable as
<key>EnvironmentVariables</key> <dict> <key>CATALINA_HOME</key> <string>/Library/Tomcat</string> <key>JAVA_OPTS</key> <string>-Djava.awt.headless=true</string> </dict>
by adding "-Djava.awt.headless=true" to JAVA_OPTS in a launchd plist file.
I try to describe what I experienced below. Please feel free to correct me as I am a newbie to jsp and Tomcat.
I found this when recently I installed IPT-RC3 and the accompanying geoserver, it was strange that the geoserver couldn't successfully startup after I launched Tomcat by using Server Admin on Mac OS X Server 10.6 and 10.5, while IPT started up ok. But if I started Tomcat by bin/start.sh, geoserver would launch ok with a process called org.apache.catalina.startup.Bootstrap on the Dock.
Later I tried testing with a separate installation of Tomcat (in addition to the Apple shipped version). By using the plist described in this book page:
http://books.google.com/books?id=vJttHyVF0SUC&lpg=PA32&ots=i_9xrTuSd... (Tomcat: The Definitive Guide, O'Reilly, p.33)
geoserver was started up ok if I "sudo launchctl load" the plist in the Terminal, but failed to start up after I reboot the OS.
After some googling I understood the org.apache.catalina.startup.Bootstrap process is relevant to the launching of geoserver while logged in. So specifying JAVA_OPTS="-Djava.awt.headless=true" prevents the need to invoke the bootstrap process at the GUI front, which is usually not ready during the booting process.
What I didn't test, but I think it'll work, is that the variable can also be specified in the catalina.sh, which is called by launch daemon.
Hope this could be helpful.
Burke
Taiwan Biodiversity Information Facility, TaiBIF Biodiversity Research Center, Academia Sinica 128 Sec 2, Academia Rd., Nangang District Taipei 115, Taiwan Tel: +886 2 27899621 ext. 220