Buggy code:
if ( nativeProtocolHandler ) { try { Method m = connector . getProtocolHandler ( ) . getClass ( ) . getMethod ( "setSendfileSize" , Integer . TYPE ) ; m . invoke ( connector . getProtocolHandler ( ) , maxConnections ) ; } catch ( NoSuchMethodException e ) { } } else { Method m = connector . getProtocolHandler ( ) . getClass ( ) . getMethod ( "setMaxThreads" , Integer . TYPE ) ; m . invoke ( connector . getProtocolHandler ( ) , maxConnections ) ; } } if ( ( virtualServers ) != null ) { HashSet < String > virtualServersList = new HashSet < String > ( ) ; for ( final ModelNode virtualServer : virtualServers . asList ( ) ) { virtualServersList . add ( virtualServer . asString ( ) ) ; } connector . setAllowedHosts ( virtualServersList ) ; } if ( ( ssl ) != null ) { boolean nativeSSL = false ; if ( ( connector . getProtocolHandler ( ) ) instanceof Http11AprProtocol ) { nativeSSL = true ; } else if ( ! ( ( connector . getProtocolHandler ( ) ) instanceof Http11Protocol ) ) { throw new StartException ( WebMessages . MESSAGES . noSSLWithNonHTTPConnectors ( ) ) ; } try { Method m = connector . getProtocolHandler ( ) . getClass ( ) . getMethod ( "setSSLEnabled" , Boolean . TYPE ) ; m . invoke ( connector . getProtocolHandler ( ) , true ) ; } catch ( NoSuchMethodException e ) { throw new StartException ( WebMessages . MESSAGES . failedSSLConfiguration ( ) , e ) ; } if ( nativeSSL ) { try { if ( ssl . hasDefined ( PASSWORD ) ) { Method m = connector . getProtocolHandler ( ) . getClass ( ) . getMethod ( "setSSLPassword" , String . class ) ; m . invoke ( connector . getProtocolHandler ( ) , ssl . get ( PASSWORD ) . asString ( ) ) ; } if ( ssl . hasDefined ( CERTIFICATE_KEY_FILE ) ) { Method m = connector . getProtocolHandler ( ) . getClass ( ) . getMethod ( "setSSLCertificateKeyFile" , String . class ) ; m . invoke ( connector . getProtocolHandler ( ) , ssl . get ( CERTIFICATE_KEY_FILE ) . asString ( ) ) ; } if ( ssl . hasDefined ( CIPHER_SUITE ) ) { Method m = connector . getProtocolHandler ( ) . getClass ( ) . getMethod ( "setSSLCipherSuite" , String . class ) ; m . invoke ( connector . getProtocolHandler ( ) , ssl . get ( CIPHER_SUITE ) . asString ( ) ) ; } if ( ssl . hasDefined ( PROTOCOL ) ) { Method m = connector . getProtocolHandler ( ) . getClass ( ) . getMethod ( "setSSLProtocol" , String . class ) ; m . invoke ( connector . getProtocolHandler ( ) , ssl . get ( PROTOCOL ) . asString ( ) ) ; } if ( ssl . hasDefined ( VERIFY_CLIENT ) ) { Method m = connector . getProtocolHandler ( ) . getClass ( ) . getMethod ( "setSSLVerifyClient" , String . class ) ; m . invoke ( connector . getProtocolHandler ( ) , ssl . get ( VERIFY_CLIENT ) . asString ( ) ) ; } if ( ssl . hasDefined ( VERIFY_DEPTH ) ) { Method m = connector . getProtocolHandler ( ) . getClass ( ) . getMethod ( "setSSLVerifyDepth" , Integer . TYPE ) ; m . invoke ( connector . getProtocolHandler ( ) , ssl . get ( VERIFY_DEPTH ) . asInt ( ) ) ; } if ( ssl . hasDefined ( CERTIFICATE_FILE ) ) { Method m = connector . getProtocolHandler ( ) . getClass ( ) . getMethod ( "setSSLCertificateFile" , String . class ) ; <START_BUG> m . invoke ( connector . getProtocolHandler ( ) , ssl . get ( CERTIFICATE_FILE ) ) ; <END_BUG> } if ( ssl . hasDefined ( CA_CERTIFICATE_FILE ) ) { Method m = connector . getProtocolHandler ( ) . getClass ( ) . getMethod ( "setSSLCACertificateFile" , String . class ) ; m . invoke ( connector . getProtocolHandler ( ) , ssl . get ( CA_CERTIFICATE_FILE ) . asString ( ) ) ; } if ( ssl . hasDefined ( CA_REVOCATION_URL ) ) { Method m = connector . getProtocolHandler ( ) . getClass ( ) . getMethod ( "setSSLCARevocationFile" , String . class ) ; m . invoke ( connector . getProtocolHandler ( ) , ssl . get ( CA_REVOCATION_URL ) . asString ( ) ) ; } } catch ( NoSuchMethodException e ) { throw new StartException ( WebMessages . MESSAGES . failedSSLConfiguration ( ) , e ) ; } } else { try { if ( ssl . hasDefined ( KEY_ALIAS ) ) { Method m = connector . getProtocolHandler ( ) . getClass ( ) . getMethod ( "setKeyAlias" , String . class ) ; m . invoke ( connector . getProtocolHandler ( ) , ssl . get ( KEY_ALIAS ) . asString ( ) ) ; } if ( ssl . hasDefined ( PASSWORD ) ) { Method m = connector . getProtocolHandler ( ) . getClass ( ) . getMethod ( "setKeypass" , String . class ) ; m . invoke ( connector . getProtocolHandler ( ) , ssl . get ( PASSWORD ) . asString ( ) ) ; } if ( ssl . hasDefined ( CERTIFICATE_KEY_FILE ) ) { Method m = connector . getProtocolHandler ( ) . getClass ( ) . getMethod ( "setKeystore" , String . class ) ; m . invoke ( connector . getProtocolHandler ( ) , ssl . get ( CERTIFICATE_KEY_FILE ) . asString ( ) ) ; } if ( ssl . hasDefined ( CIPHER_SUITE ) ) { Method m = connector . getProtocolHandler ( ) . getClass ( ) . getMethod ( "setCiphers" , String . class ) ;

Fix:
m . invoke ( connector . getProtocolHandler ( ) , ssl . get ( CERTIFICATE_FILE ) . asString ( ) ) ;