I ran into an issue where the catalina.sh script that is provided with TomEE (1.6.0) fails to start the server due to a path issue. The TomEE distribution attempts to add to the JAVA_OPTS the openejb agent: # Add OpenEJB javaagentif [ -r "$CATALINA_HOME"/lib/openejb-javaagent.jar ]; then JAVA_OPTS=""-javaagent:$CATALINA_HOME/lib/openejb-javaagent.jar" $JAVA_OPTS"fi But prior to this line, the script has reset the CATALINA_HOME variable using the cygpath command to Window's specific pathing: # For Cygwin, switch paths to Windows format before running javaif $cygwin; then JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"` JRE_HOME=`cygpath --absolute --windows "$JRE_HOME"` CATALINA_HOME=`cygpath --absolute --windows "$CATALINA_HOME"` CATALINA_BASE=`cygpath --absolute --windows "$CATALINA_BASE"` CATALINA_TMPDIR=`cygpath --absolute --windows "$CATALINA_TMPDIR"` CLASSPATH=`cygpath --path --windows "$CLASSPATH"` JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`fi What happens now is that if TomEE is installed in c:\apps\apache-tomee, the JAVA_OPTS argument will look like -javaagent:cappsapache-tomee/lib/openejb-javaagent.jar because the backslashes are effectively removed. So, a fix I determined was to change the --windows flag to the --mixed flag if $cygwin; then JAVA_HOME=`cygpath --absolute --mixed "$JAVA_HOME"` JRE_HOME=`cygpath --absolute --mixed "$JRE_HOME"` CATALINA_HOME=`cygpath --absolute --mixed "$CATALINA_HOME"` CATALINA_BASE=`cygpath --absolute --mixed "$CATALINA_BASE"` CATALINA_TMPDIR=`cygpath --absolute --mixed "$CATALINA_TMPDIR"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` JAVA_ENDORSED_DIRS=`cygpath --path --mixed "$JAVA_ENDORSED_DIRS"`fi This seems to fix the problem and allows the server to be started/stopped from a cygwin shell window. I looked in the JIRA list but didn't see this reported, so I thought I would mention it on this forum in case anyone else ran into it.
-- View this message in context: http://openejb.979440.n4.nabble.com/Cygwin-catalina-sh-fails-tp4666583.html Sent from the OpenEJB User mailing list archive at Nabble.com.
