Search in sources :

Example 1 with ConnectorStartFailedException

use of org.springframework.boot.web.embedded.tomcat.ConnectorStartFailedException in project sofa-ark by alipay.

the class ArkTomcatWebServer method start.

@Override
public void start() throws WebServerException {
    synchronized (this.monitor) {
        if (this.started) {
            return;
        }
        try {
            addPreviouslyRemovedConnectors();
            this.tomcat.getConnector();
            checkThatConnectorsHaveStarted();
            this.started = true;
            logger.info("Tomcat started on port(s): " + getPortsDescription(true) + " with context path '" + getContextPath() + "'");
        } catch (ConnectorStartFailedException ex) {
            stopSilently();
            throw ex;
        } catch (Exception ex) {
            throw new WebServerException("Unable to start embedded Tomcat server", ex);
        } finally {
            Context context = findContext();
            ContextBindings.unbindClassLoader(context, context.getNamingToken(), getClass().getClassLoader());
        }
    }
}
Also used : Context(org.apache.catalina.Context) WebServerException(org.springframework.boot.web.server.WebServerException) LifecycleException(org.apache.catalina.LifecycleException) WebServerException(org.springframework.boot.web.server.WebServerException) NamingException(javax.naming.NamingException) ConnectorStartFailedException(org.springframework.boot.web.embedded.tomcat.ConnectorStartFailedException) ConnectorStartFailedException(org.springframework.boot.web.embedded.tomcat.ConnectorStartFailedException)

Aggregations

NamingException (javax.naming.NamingException)1 Context (org.apache.catalina.Context)1 LifecycleException (org.apache.catalina.LifecycleException)1 ConnectorStartFailedException (org.springframework.boot.web.embedded.tomcat.ConnectorStartFailedException)1 WebServerException (org.springframework.boot.web.server.WebServerException)1