All,

All you have to do is stop using APR and tcnative-1.x.

Here is a script to rip the APR connector out of your Tomcat 9.0 environment for testing. There are many ways to install tcnative 1.x so that's not really possible to script.

-chris

=== CUT ===

#!/bin/sh

usage() {
  echo "Usage: ${0} [options] [path-to-tomcat]"
  echo
  echo "Options:"
  echo "   -h    Display this help text and exit."
  echo "   -we   Actually perform the migration (write)."
  echo
  echo "If CATALINA_BASE is set, it will be used but can be overridden"
  echo "using the path-to-tomcat command-line parameter."
}

write=0

set -- $(getopt hw "$@")
if [ $? != 0 ]; then
    usage

    exit 1
fi

# Loop through the parsed options
while true; do
    case "$1" in
        -h)
            usage
            exit 0
            ;;
        -w)
            write=1
            shift
            ;;
        --)
            shift
            break
            ;;
        *)
            echo "Unrecognized option" >&2
            echo >&2
            usage >&2

            exit 1
            ;;
    esac
done

CATALINA_BASE=${1:-${CATALINA_BASE:-.}}

if [ ! -f ${CATALINA_BASE}/lib/catalina.jar ] ; then
  echo Cannot find catalina.jar in $CATALINA_BASE
  exit 1
fi

echo "Using CATALINA_BASE=$( readlink -f ${CATALINA_BASE} )"

tomcat_coyote_jar_files='
org/apache/coyote/ajp/AjpAprProtocol.class
org/apache/coyote/http11/Http11AprProtocol.class
org/apache/tomcat/util/net/AprEndpoint$1.class
org/apache/tomcat/util/net/AprEndpoint$AprSocketWrapper$AprOperationState.class
org/apache/tomcat/util/net/AprEndpoint$AprSocketWrapper.class
org/apache/tomcat/util/net/AprEndpoint$Poller.class
org/apache/tomcat/util/net/AprEndpoint$Sendfile.class
org/apache/tomcat/util/net/AprEndpoint$SendfileData.class
org/apache/tomcat/util/net/AprEndpoint$SocketInfo.class
org/apache/tomcat/util/net/AprEndpoint$SocketList.class
org/apache/tomcat/util/net/AprEndpoint$SocketProcessor.class
org/apache/tomcat/util/net/AprEndpoint$SocketTimeouts.class
org/apache/tomcat/util/net/AprEndpoint$SocketWithOptionsProcessor.class
org/apache/tomcat/util/net/AprEndpoint.class
org/apache/tomcat/util/net/AprSSLSupport.class
'

echo "Removing APR files from ${CATALINA_BASE}/lib/tomcat-coyote.jar..."

echo zip -d "${CATALINA_BASE}/lib/tomcat-coyote.jar" $tomcat_coyote_jar_files
if [ "$write" -eq 1 ] ; then
  zip -d "${CATALINA_BASE}/lib/tomcat-coyote.jar" $tomcat_coyote_jar_files
fi

exit 0



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to